Hi
I was trying to add an option to autoidentify BIDS meg data, to support:
aap.directory_conventions.rawdatadir = 'BIDSDir';
aap = aas_processBIDS(aap);
My approach so far was to define megimages (i.e. meg filepaths from spm_select()) in aa_engine/aas_processBIDS.m: Branch here
Note this is very basic (i.e. I'm not trying to add events, skip/order series etc).
But I get the impression I am going about this the wrong way - megimages etc. are used as input to aap = aas_addsubject():
if toAddData
aap = aas_addsubject(aap,subjname,mriname,...
'structural',structuralimages,...
'functional',functionalimages,...
'fieldmaps',fieldmapimages,...
'diffusion',diffusionimages,...
'specialseries',specialimages,...
'meg',megimages);
end
aas_addsubject.m expects MEG data in a 1x2 cell array (ie. mri and meg filenames).
Whereas input to aas_addsubject.m from processBIDS.m is a larger cell array whose number of columns is determined by all potential modalities e.g.:
varargin =
1×12 cell array
Columns 1 through 4
{'structural'} {0×0 cell} {'functional'} {0×0 cell}
Columns 5 through 8
{'fieldmaps'} {0×0 cell} {'diffusion'} {0×0 cell}
Columns 9 through 12
{'specialseries'} {0×0 cell} {'meg'} {1×1 cell}
).
I guess I could make an ugly solution (e.g. if the meg filename cell ~isempty, then read those filenames for meg data) but that's not ideal.
I'll look again later, but wanted to ask if anyone could steer me at all?
Hi
I was trying to add an option to autoidentify BIDS meg data, to support:
My approach so far was to define
megimages(i.e. meg filepaths fromspm_select()) inaa_engine/aas_processBIDS.m: Branch hereNote this is very basic (i.e. I'm not trying to add events, skip/order series etc).
But I get the impression I am going about this the wrong way -
megimagesetc. are used as input to aap = aas_addsubject():aas_addsubject.mexpects MEG data in a 1x2 cell array (ie. mri and meg filenames).Whereas input to aas_addsubject.m from processBIDS.m is a larger cell array whose number of columns is determined by all potential modalities e.g.:
I guess I could make an ugly solution (e.g. if the meg filename cell ~isempty, then read those filenames for meg data) but that's not ideal.
I'll look again later, but wanted to ask if anyone could steer me at all?