Skip to content

fmap undefined in aas_processBIDS.m #186

Description

@jpeelle

I've run into an error on line 248 with Undefined function or variable 'fmap'. When I look at the code, I don't see fmap defined earlier in the function, so I think this may be the issue. Could it be that on 248 we need f and not fmap (looking up to the loop, for which f is looping through the files)? @jooh and @tiborauer I think you may be the most recent people to look at this code (although I'm surprised no one else has run into this).

for f = fmaps'
if skipnext
skipnext = false;
continue;
end
jfname = spm_file(f{1},'basename');
ind = find(jfname=='_',1,'last');
ftype = jfname(ind+1:end);
switch ftype
case 'phasediff'
fmap.hdr = loadjson(f{1});
if isfield(fmap.hdr,'IntendedFor')
fmap.hdr.session = get_taskname(sesspath,subjname,fmap.hdr.IntendedFor);
else
fmap.hdr.session = '*';
end
fmap.fname = cellstr(spm_select('FPList',fullfile(sesspath,fieldmapDIR),[strrep(jfname,ftype,'') '.*.nii.gz']));
case 'phase1'
skipnext = true;
case 'fieldmap'
end
fieldmapimages = horzcat(fieldmapimages,fmap);
end

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