-
Notifications
You must be signed in to change notification settings - Fork 5
/
runRecordingProcessor.m
49 lines (40 loc) · 1.49 KB
/
runRecordingProcessor.m
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
%runRecordingProcessor GUI to perform Acquipix recording pre-processing
%
%This GUI interfaces with the outputs of "RunExperiment" (this repo),
%"runEyeTrackerOffline" (EyeTracking repo) and SpikeGLX and provides an
%easy to use interface for managing your library of Acquipix recordings.
%
% Created by Jorrit Montijn, 2021-06-17 (YYYY-MM-DD)
%Version history:
%0.0 - 17 June 2021
% Created by Jorrit Montijn
%% add subfolder to path
sWarn = warning('on');
cellPaths = strsplit(path(),';');
strPathFile=mfilename('fullpath');
cellCodePath = strsplit(strPathFile,filesep);
strCodePath = fullfile(strjoin(cellCodePath(1:(end-1)),filesep),'subfunctionsRP');
if isempty(find(contains(cellPaths,strCodePath),1))
addpath(strCodePath);
end
%% check if dependencies are present
if ~exist('uilock','file')
error([mfilename ':MissingDependency'],sprintf('This function requires the "GeneralAnalysis" repository to function. You can get it here: %s','https://github.com/JorritMontijn/GeneralAnalysis'));
end
%% define globals
global sFigRP;
global sRP;
%% load defaults
sRP = RP_populateStructure();
sFigRP = struct;
%% run
%check if instance is already running
if isstruct(sFigRP) && isfield(sFigRP,'IsRunning') && sFigRP.IsRunning == 1
error([mfilename ':SingularGUI'],'RecordingProcessorModule instance is already running; only one simultaneous GUI is allowed');
end
%clear data & disable new instance
sFigRP.IsRunning = true;
%generate gui
[sFigRP,sRP] = RP_genGUI(sFigRP,sRP);
%reset warning state
warning(sWarn);