Skip to content

processBIDS for MEG #231

Description

@ethanknights

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions