Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bucanl_eeglab_extensions
Batch Context
Commits
35d81f2b
Commit
35d81f2b
authored
Apr 19, 2018
by
James Desjardins
Browse files
Updates the parsing of files with -'s in their name.
parent
0575e08e
Changes
2
Hide whitespace changes
Inline
Side-by-side
batch/exec_func/ef_gen_m.m
View file @
35d81f2b
...
...
@@ -94,6 +94,10 @@ if ~strcmp(job_struct.batch_config.software, 'none') ...
'mount_archive'
,
job_struct
.
context_config
.
mount_archive
,
...
'mount_work'
,
job_struct
.
context_config
.
mount_work
,
...
'scheduler'
,
job_struct
.
batch_config
.
exec_func
(
4
:
end
));
%BIDS standard file names have "-" characters... these need to be
%changed to "_" in order for the m file to be executable.
job_struct
.
batch_config
.
mfile_name
(
strfind
(
job_struct
.
batch_config
.
mfile_name
,
'-'
))
=
'_'
;
if
strcmp
(
job_struct
.
batch_config
.
software
,
'none'
);
batchStr
=
[
'system(
''
'
,
strtrim
(
batchStr
),
'
''
)'
];
...
...
@@ -127,6 +131,12 @@ if ~strcmp(job_struct.batch_config.software, 'none') ...
if
length
(
c_mfn
)
>=
64
error
(
'Script name too long! Please change your job name config.'
)
end
%BIDS standard file names have "-" characters... these need to be
%changed to "_" in order for the m file to be executable.
c_mfn
(
strfind
(
c_mfn
,
'-'
))
=
'_'
;
%job_struct.m_fname{bfni}=c_mfn;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%WRITE M FILE TO LOG PATH...
fidM
=
fopen
(
fullfile
(
job_struct
.
context_config
.
log
,
...
...
...
batch/exec_func/ef_get_eegdims.m
View file @
35d81f2b
...
...
@@ -37,6 +37,10 @@ function dimensions = ef_get_eegdims(dfpath, dfname)
allDims
=
struct
();
end
[
~
,
name
,
~
]
=
fileparts
(
dfname
);
% remove extension so filename can be used as a field (no '.' allowed)
%BIDS standard file names have "-" characters... these need to be
%changed to "_" in order for the m file to be executable.
name
(
strfind
(
name
,
'-'
))
=
'_'
;
if
~
isfield
(
allDims
,
name
)
EEG_temp
=
pop_loadset
(
'filename'
,
dfname
,
'filepath'
,
dfpath
,
'loadmode'
,
'info'
);
allDims
.
(
name
)
=
struct
(
'channels'
,
EEG_temp
.
nbchan
,
'samples'
,
EEG_temp
.
pnts
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment