BC_mainUniformSpot.m 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. %Guide for the uniform spot analysis
  2. %Check out the Documentation_Data.pdf, which contains relevant information
  3. %for analysing the uniform stimulus
  4. clear;
  5. close all;
  6. %% Set the general variable (the same for all spot versions)
  7. loadData='Z:\Spot\'; %path of the BC files for uniform spot (has to be adapted to your own path)
  8. spotDuration=500; % given in the excel file LogInfo_UniformSpot.xlsx
  9. grayDuration=1000; % given in the excel file LogInfo_UniformSpot.xlsx for the corresponding file
  10. %% run spot analysis for stimulus version 1 and 2
  11. %path for the stimulus signal for verion 1 or 2 -> here the black and white
  12. %spots are recorded in different files
  13. filename='172030015Comp.mat'; %BC file to analyse (black spot): for example here we use file 172030015Comp from cell 1, recorded in retina 1 on 170203
  14. filename2='172030016Comp.mat'; %BC file to analyse (white spot): for example here we use file 172030016Comp from cell 1, recorded in retina 1 on 170203
  15. spotVersion=2;% uniform spot version given in excel file LogInfo_UniformSpot.xlsx
  16. %get the path for loading the stimulus signal: stimulusVersion1.mat or
  17. %stimulusVersion2.mat
  18. if spotVersion==1
  19. % Path for loading the stimulus version 1: stimulusVersion1.mat
  20. pathStimSignal='Z:\Manuscript\BC_XY_LN\Puplishing\DataAvailable\Spot\stimulusVersion1.mat'; %has to be adapted to your own structure
  21. elseif spotVersion==2
  22. % Path for loading the stimulus signal version 2: stimulusVersion2.mat
  23. pathStimSignal='Z:\Manuscript\BC_XY_LN\Puplishing\DataAvailable\Spot\stimulusVersion2.mat';
  24. end
  25. [patternedSpot_output]=BC_uniformSpot(loadData,filename,filename2,spotDuration,...
  26. grayDuration,spotVersion,pathStimSignal);%example code to analyze the responses to the uniform spots
  27. %% run spot analysis for stimulus version 3
  28. filename='18d130037Comp.mat'; %BC file to analyse, here you only have one file: 18d130037Comp for cell1 in retina 3 on 181213
  29. pathStimSignal='Z:\Manuscript\BC_XY_LN\Puplishing\DataAvailable\Spot\stimulusVersion3.mat'; %to get the path for loading the stimulus signal
  30. start_blackSpot=1; end_blackSpot=111;
  31. start_whiteSpot=112; end_whiteSpot=222;
  32. inputFrames=[start_blackSpot,end_blackSpot,start_whiteSpot,end_whiteSpot];
  33. [patternedSpot_output3]=BC_uniformSpot3(loadData,filename,spotDuration,grayDuration, ...
  34. inputFrames,pathStimSignal);%example code to analyze the responses to uniform spots
  35. %% run spot analysis for stimulus version 4
  36. filename='15o160046Comp.mat'; %BC file to analyse, here you only have one file: 15o160046Comp for cell 3 in retina 2 on the 151016
  37. grayDuration=4000; % given in the excel file LogInfo_UniformSpot.xlsx for the corresponding file
  38. [patternedSpot_output4]=BC_uniformSpot4(loadData,filename,spotDuration,grayDuration);%example code to preprocess the reversing uniform spots