Commit 100465d6 authored by Brad Kennedy's avatar Brad Kennedy
Browse files

Make ef_s* files more robust to non .set files

parent 95cb4ad2
......@@ -170,10 +170,14 @@ if ~isempty(batch_config.qsub_options)
end
end
dimensions = ef_get_eegdims(g.datapath,g.datafname);
% These variables are eval'd so they will show up as a warning
c = dimensions.channels; %#ok<NASGU> % channels
s = dimensions.samples; %#ok<NASGU> % samples
%% Verify we are dealing with .set files otherwise skip this section
[~, ~, ext] = fileparts(g.datafname);
if strcmp(ext, '.set')
dimensions = ef_get_eegdims(g.datapath,g.datafname);
% These variables are eval'd so they will show up as a warning
c = dimensions.channels; %#ok<NASGU> % channels
s = dimensions.samples; %#ok<NASGU> % samples
end
% memory_allocation...
if ~isempty(batch_config.memory)
......@@ -216,7 +220,7 @@ if ~isempty(batch_config.num_processors)
qsubstr_tmp=sprintf('%s %s', qsubstr_tmp,num_proc);
end
%program_options...
% program_options...
program_options='';
if ~isempty(batch_config.program_options);
for i = 1:length(batch_config.program_options)
......@@ -224,9 +228,9 @@ if ~isempty(batch_config.program_options);
batch_config.program_options{i}];
end
end
%software...
% TODO(brad) make this not hardcoded
wrappername = 'analysis/support/dependencies/eeglab_asr_amica/plugins/batch_context/batch/exec_func/octave_exit_wrapper.m';
% software...
[dir, ~, ~] = fileparts(mfilename());
wrappername = [dir filesep 'octave_exit_wrapper.m'];
if strcmp(batch_config.mpi, 'true')
......
......@@ -168,10 +168,15 @@ if ~isempty(batch_config.qsub_options);
end
end
dimensions = ef_get_eegdims(g.datapath,g.datafname);
% These variables are eval'd so they will show up as a warning
c = dimensions.channels; %#ok<NASGU> % channels
s = dimensions.samples; %#ok<NASGU> % samples
%% Verify we are dealing with .set files otherwise skip this section
[~, ~, ext] = fileparts(g.datafname);
if strcmp(ext, '.set')
dimensions = ef_get_eegdims(g.datapath,g.datafname);
% These variables are eval'd so they will show up as a warning
c = dimensions.channels; %#ok<NASGU> % channels
s = dimensions.samples; %#ok<NASGU> % samples
end
% memory_allocation...
if ~isempty(batch_config.memory);
......@@ -212,7 +217,8 @@ if ~isempty(batch_config.program_options);
end
% software...
wrappername = 'analysis/support/dependencies/eeglab_asr_amica/plugins/batch_context/batch/exec_func/octave_exit_wrapper.m';
[dir, ~, ~] = fileparts(mfilename());
wrappername = [dir filesep 'octave_exit_wrapper.m'];
switch batch_config.software
case 'none'
while g.execstr(end)==10 || g.execstr(end)==13;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment