-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunAll.m
More file actions
61 lines (56 loc) · 2.07 KB
/
RunAll.m
File metadata and controls
61 lines (56 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
clear
%% Paths
if ~exist('pathSet','var') || pathSet == 0 % only set path if unset
addpath(genpath(pwd)) % all folders in utils added, including semedo code
if ispc
paths = " C:\Users\BrainMaker\commsubspace\SingleDayExpt";
elseif ismac
paths(1) = "/Volumes/sharespace-commsub/data";
paths(2) = "~/Data/commsubspace";
end
arrayfun(@(path) addpath(genpath(path)), paths);
pathSet = 1;
end
% %%
% FIELD = [];
% numToRun = numel(FIELD);
%% Script parameters
% -----------------------------------------------------------------
Option = struct();
% Option.animal =
% Option.generateFromRipTimes = true;
% Option.generateH = "fromFilteredEEG "+" fromRipTimes";
% Option.samplingRate = "empty" ; % For spikes.getSpikeTrain
% Option.spikeBinSize = 0.1; % 100 milliseconds
% Option.timesPerTrial = 10; % 10 times per trial
% Option.winSize = {[-0.15, 0.15]}; % size of the window
% Option.sourceArea = "PFC";
% Option.equalWindowsAcrossPatterns = true; % whether all three patterns have the same #windows
% Option.singleControl = true; % whether to use just one control column
% Option.numPartition = 10; % ways to split source and target
% usingSingleprediction = true;
%
% winSize = Option.winSize{1};
%animal_list = ["JS21","JS15","JS14","JS13", "JS17"];
animal_list = ["ER1"];
pickup_where_left_off = true;
for genH_= progress(["fromWpli fromRipTime",],'Title','genH method')
for iAnimal = progress(1:numel(animal_list),'Title','Animal')
Option.animal = animal_list(iAnimal);
Option.generateH = genH_;
%if isequal([Option.animal, Option.generateH], ...
% ["JS13", "fromCoherence fromRipTime"])
% pickup_where_left_off = true;
%else
% disp("Skipping previous run");
%end
if pickup_where_left_off == false
continue
end
%try
TheScript
%catch MatlabException
%warning('Failed to run %s %s', Option.animal, Option.generateH);
%end
end
end