Skip to content

Commit

Permalink
finished first version of checkAnalysisParamFile, fixed return variab…
Browse files Browse the repository at this point in the history
…le name in preprocessPhotodiodeStrobe, updated buildAnalysisParamFile to remove stale code and improve variable names, added no-presentations checker for analysisGroups but not debugged yet so currently commented out.
  • Loading branch information
sserene committed Oct 25, 2017
1 parent 157b039 commit f4fc1f1
Show file tree
Hide file tree
Showing 6 changed files with 542 additions and 256 deletions.
29 changes: 9 additions & 20 deletions buildAnalysisParamFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@


%%%%%%% USER PARAMETERS, EDIT ROUTINELY %%%%%%%%
runNum = '009';
dateSubject = '171021ALAN';
runNum = '010';
dateSubject = '171024ALAN';
machine = 'rig';

switch machine
Expand All @@ -32,9 +32,8 @@
stimParamsFilename = '/Freiwald/sserene/ephys/AnalysisSerene/StimParamsFullFOB3.mat'; %#ok
end
analysisLabel = 'Basic';
analysisParamsFilenameStem = 'AnalysisParams.mat'; %change name should be 'leaf'
analysisParamFilenameStem = 'AnalysisParams.mat'; %change name should be 'leaf'
preprocessedDataFilenameStem = 'preprocessedData.mat';
%categoryListSlim = {'humanFace','monkeyFace','place','fruit','humanBody','monkeyBody','techno'}; %minimal cat list for clean plots
saveFig = 1; %#ok
closeFig = 0; %#ok
exportFig = 0; %#ok
Expand Down Expand Up @@ -85,7 +84,7 @@
butter200Hz_v1 = designfilt('lowpassiir', 'PassbandFrequency', 120, 'StopbandFrequency', 480, 'PassbandRipple', 1,...
'StopbandAttenuation', 60, 'SampleRate', 1000, 'MatchExactly', 'passband'); %this returns a 3rd order iir filter
analogInParams.filters = {0,0,0};%{butter200Hz_v1;butter200Hz_v1;butter200Hz_v1}; %filter channel i if filters{i} is digital filter or 1x2 numeric array
analogInParams.plotFilteredSignal = 1; %#ok
analogInParams.plotFilterResult = 1; %#ok

photodiodeParams.needPhotodiode = 0;
photodiodeParams.channels = [1;2]; %#ok
Expand Down Expand Up @@ -184,14 +183,6 @@
{60, 260}; ...
{260, @(stimDur) stimDur+60}}; %#ok


% Boolean variables to specify which computations to perform; TODO: read
% from config file, eventually with conditional on log file info
calcCoherenceRFcpt = 0; %#ok
calcCoherenceRFcc = 0; %#ok
calcCoherenceRFptpt = 0; %#ok
calcGrangerRF = 0; %#ok

plotSwitch.imagePsth = 1;
plotSwitch.categoryPsth = 1;
plotSwitch.prefImRaster = 0;
Expand Down Expand Up @@ -293,10 +284,7 @@
analysisGroups.coherenceByCategory.colors = {{'r';'b'}}; %{'r';'g';'b'};{'b';'c';'y';'g';'m';'r';'k';'k'}
analysisGroups.coherenceByCategory.names = {'faceVnon'}; %'fob';'slimCats'
%
analysisGroups.tfCouplingByCategory.groups = {{'face'};{'nonface'};{'object'};{'body'}};

analysisGroups.byImage = {}; %#ok
analysisGroupColors.byImage = {}; %#ok
analysisGroups.tfCouplingByCategory.groups = {{'face'};{'nonface'};{'object'};{'body'}}; %#ok
%%%%%

calcSwitch.categoryPSTH = 1;
Expand All @@ -323,11 +311,12 @@

%%% set paths and directories, EDIT RARELY %%%
analogInFilename = sprintf('%s/%s/%s%s.ns2',ephysVolume,dateSubject,dateSubject,runNum); %#ok
lfpFilename = sprintf('%s/%s/%s%s.ns5',ephysVolume,dateSubject,dateSubject,runNum); %#ok
lfpFilename = sprintf('%s/%s/%s%s.ns5',ephysVolume,dateSubject,dateSubject,runNum);
spikeFilename = sprintf('%s/%s/%s%s.nev',ephysVolume,dateSubject,dateSubject,runNum); %note that this file also contains blackrock digital in events
taskFilename = sprintf('%s/%s/%s0%s.log',stimulusLogVolume,dateSubject,dateSubject,runNum); %information on stimuli and performance
photodiodeFilename = lfpFilename; %#ok
outDir = sprintf('%s/%s/%s/%s/',outputVolume,dateSubject,analysisLabel,runNum);
analysisParamsFilename = strcat(outDir,analysisParamsFilenameStem);
analysisParamFilename = strcat(outDir,analysisParamFilenameStem);
preprocessedDataFilename = strcat(outDir,preprocessedDataFilenameStem); %#ok
%
load('cocode2.mat');
Expand All @@ -336,6 +325,6 @@
if ~exist(outDir,'dir')
mkdir(outDir);
end
save(analysisParamsFilename);
save(analysisParamFilename);
end

Loading

0 comments on commit f4fc1f1

Please sign in to comment.