Skip to content

topup error when running prisma_preproc.py on BIDS subjects with extra fmap data #5

@noahbenson

Description

@noahbenson

Details below all assume that you have the winawerlab server mounted in /Volumes/server.

Command:

> cd /Volumes/server/Projects/Retinotopy/CMag/data/BIDS
> python prisma_preproc.py -dir_structure bids -bids_task prf -datadir $PWD/sub-wlsubj090/ses-nyu3t01 -subject wlsubj90

This produces a topup error reported to stdout as:

RuntimeError: Command:
topup --config=b02b0.cnf --datain=/Volumes/server/Projects/Retinotopy/CMag/data/BIDS/derivatives/preprocessed/sub-wlsubj090/ses-nyu3t01/workflow/unwarp_distort/distortion_merged_encfile.txt --fwhm=0.000000 --imain=/Volumes/server/Projects/Retinotopy/CMag/data/BIDS/derivatives/preprocessed/sub-wlsubj090/ses-nyu3t01/workflow/merge_distort/distortion_merged.nii.gz --out=distortion_merged_base --iout=distortion_merged_corrected.nii.gz --fout=distortion_merged_field.nii.gz --jacout=jac --logout=distortion_merged_topup.log --rbmout=xfm --dfout=warpfield
Standard output:

Standard error:

Part of FSL (ID: 5.0.10)
topup

Usage: 
topup --imain=<some 4D image> --datain=<text file> --config=<text file with parameters> --out=my_topup_results


Compulsory arguments (You MUST set one or more of):
        --imain         name of 4D file with images
        --datain        name of text file with PE directions/times

Optional arguments (You may optionally specify one or more of):
        --out           base-name of output files (spline coefficients (Hz) and movement parameters)
        --fout          name of image file with field (Hz)
        --iout          name of 4D image file with unwarped images
        --logout        Name of log-file
        --warpres       (approximate) resolution (in mm) of warp basis for the different sub-sampling levels, default 10
        --subsamp       sub-sampling scheme, default 1
        --fwhm          FWHM (in mm) of gaussian smoothing kernel, default 8
        --config        Name of config file specifying command line arguments
        --miter         Max # of non-linear iterations, default 5
        --lambda        Weight of regularisation, default depending on --ssqlambda and --regmod switches. See user documetation.
        --ssqlambda     If set (=1), lambda is weighted by current ssq, default 1
        --regmod        Model for regularisation of warp-field [membrane_energy bending_energy], default bending_energy
        --estmov        Estimate movements if set, default 1 (true)
        --minmet        Minimisation method 0=Levenberg-Marquardt, 1=Scaled Conjugate Gradient, default 0 (LM)
        --splineorder   Order of spline, 2->Qadratic spline, 3->Cubic spline. Default=3
        --numprec       Precision for representing Hessian, double or float. Default double
        --interp        Image interpolation model, linear or spline. Default spline
        --scale         If set (=1), the images are individually scaled to a common mean, default 0 (false)
        --regrid                If set (=1), the calculations are done in a different grid, default 1 (true)
        -h,--help       display help info
        -v,--verbose    Print diagonostic information while running
        -h,--help       display help info

This error does not happen for other subjects in the directory (e.g., wlsubj092). As far as I can tell, the differentiating factor between subjects that work and subjects that don't is the contents of the subject's fmap directory:

> ls sub-wlsubj090/ses-nyu3t01/fmap
sub-wlsubj090_ses-nyu3t01_acq-dwi_dir-AP_run-01_epi.json
sub-wlsubj090_ses-nyu3t01_acq-dwi_dir-AP_run-01_epi.nii.gz
sub-wlsubj090_ses-nyu3t01_acq-dwi_dir-PA_run-01_epi.json
sub-wlsubj090_ses-nyu3t01_acq-dwi_dir-PA_run-01_epi.nii.gz
sub-wlsubj090_ses-nyu3t01_acq-fMRI_dir-AP_run-01_epi.json
sub-wlsubj090_ses-nyu3t01_acq-fMRI_dir-AP_run-01_epi.nii.gz
sub-wlsubj090_ses-nyu3t01_acq-fMRI_dir-AP_run-02_epi.json
sub-wlsubj090_ses-nyu3t01_acq-fMRI_dir-AP_run-02_epi.nii.gz
sub-wlsubj090_ses-nyu3t01_acq-fMRI_dir-PA_run-01_epi.json
sub-wlsubj090_ses-nyu3t01_acq-fMRI_dir-PA_run-01_epi.nii.gz
sub-wlsubj090_ses-nyu3t01_acq-fMRI_dir-PA_run-02_epi.json
sub-wlsubj090_ses-nyu3t01_acq-fMRI_dir-PA_run-02_epi.nii.gz
> ls sub-wlsubj092/ses-nyu3t01/fmap
sub-wlsubj092_ses-nyu3t01_acq-fMRI_dir-AP_run-01_epi.json
sub-wlsubj092_ses-nyu3t01_acq-fMRI_dir-AP_run-01_epi.nii.gz
sub-wlsubj092_ses-nyu3t01_acq-fMRI_dir-PA_run-01_epi.json
sub-wlsubj092_ses-nyu3t01_acq-fMRI_dir-PA_run-01_epi.nii.gz

I'm assuming that the issue is related to the extra distortion scans and the diffusion scans. Is there a way to tell prisma_preproc to use a specific run of the distortion scans? (The second run of distrotion scans, in this case, was for the diffusion scan.)

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