Main_Plot_Figures.m 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. %% Close all figures, clear variables and command window
  2. close all
  3. clear
  4. clc
  5. %% Directory of the repository and the NIX library
  6. strMainPath = 'human_amygdala_mua_seeg_fearvideo';
  7. strMainPath = 'Human_Amygdala_MUA_sEEG_FearVideo';
  8. strNIXLibraryPath = 'nix-mx_Win64_1.4.1'; % For Mac: 'nix_mx_macOS_1.4.2_Matlab2020a'
  9. strFieldTripPath = 'fieldtrip-20200315';
  10. strGrammPath = 'gramm-master'; % https://github.com/piermorel/gramm
  11. %% Add necessary folders to the MATLAB path
  12. addpath([strMainPath filesep 'code_MATLAB'])
  13. addpath(genpath(strNIXLibraryPath))
  14. addpath(strFieldTripPath)
  15. addpath(strGrammPath)
  16. ft_defaults
  17. warning('strMainPath should be the full path of the folder Human_Amygdala_MUA_sEEG_FearVideo')
  18. warning('strNIXLibraryPath should be the full path of the NIX library ''nix-mx_Win64_1.4.1''')
  19. warning('strFieldTripPath should be the full path of the FieldTrip toolbox ''fieldtrip-2020xxxx''')
  20. warning('strGrammPath should be the full path of the Gramm toolbox ''gramm-master''')
  21. %% NIX data files
  22. strNIXFileNames = dir([strMainPath filesep 'data_NIX' filesep '*.h5']);
  23. strNIXFileNames = {strNIXFileNames.name}';
  24. assert(~isempty(strNIXFileNames),'strMainPath should be the full path of the folder Human_Amygdala_MUA_sEEG_FearVideo')
  25. %% Figure 1
  26. nExampleNeuron = 32; % neuron 30 reproduces the publication figure
  27. fig1 = Figure_1([strMainPath filesep 'data_NIX' filesep],nExampleNeuron);
  28. %% Figure 2
  29. fig2 = Figure_2([strMainPath filesep 'data_NIX' filesep]);