using spm_read_vols I confirmed that the min and max of the phase difference file is indeed -4096 and 4092 respectively.
Further troubleshooting epidewarp.fsl indicates that the script is correctly branching to "# Input is phase difference and magnitude” It then executes the following commands: # Rescale the delta phase to be between -pi and pi. Starts out # at 0 - 4095. Make sure the phase is float precision with _32R set cmd = ($FSLToFloat $dph -sub 2047.5 -mul 0.00153435539 $tmpdir/dph $FSLToFloatFlag ) echo $cmd |& tee -a $LF $cmd |& tee -a $LF if($status) exit 1; what echoes to the screen is: fslmaths /Volumes/Data2/RP1/fsfastPM/../NIFTI/RPA03/5-field_map/sRPA003-0005-00001-000001-02.nii -sub 2047.5 -mul 0.00153435539 fMRI/RPA003/bold/tmp-epidewarp.90814.fsl/dph -odt float it then aborts at the next section: cp $tmpdir/dph.$ext $tmpdir/dph.preprelude.$ext set dph = $tmpdir/dph if($#epimat) cp $epimat `dirname $dph`/`basename $dph .$ext`.mat # Copy matfile # Do the phase unwrapping (-f for 3D, -v for verbose) set cmd = (prelude -p $dph -a $mag -o $dph -f -v -m $head); echo $cmd |& tee -a $LF $cmd |& tee -a $LF if($status) exit 1; So apparently this rescaling command is not doing so correctly? The script comment says it expects the values to be between 0 and 4095 whereas the file goes to -4096 so perhaps that was a bit more negative than it was expecting? Joe > On Feb 11, 2016, at 11:12, Joseph Dien <jdie...@mac.com> wrote: > > MegaJoe:fsfastPM jdien$ epidewarp.fsl --mag > /Volumes/Data2/RP1/fsfastPM/../NIFTI/RPA03/4-field_map/sRPA003-0004-00001-000001-01.nii > --dph > /Volumes/Data2/RP1/fsfastPM/../NIFTI/RPA03/5-field_map/sRPA003-0005-00001-000001-02.nii > --tediff 2.46 --esp 0.51 --epi fMRI/RPA003/bold/001/f.nii.gz --vsm > fMRI/RPA003/bold/b0dcmap.nii.gz > > > >> On Feb 10, 2016, at 22:58, Douglas Greve <gr...@nmr.mgh.harvard.edu >> <mailto:gr...@nmr.mgh.harvard.edu>> wrote: >> >> what is your command line? I think there is a rescaling in which it expcts >> the phase to be 0-2048 (or 4096) as this is how it comes of the (siemens) >> scanner. Could that be the problem? >> >> >> On 2/10/16 10:40 PM, Joseph Dien wrote: >>> I ran into the same issue: >>> >>> FSLVersion 5.0.4 >>> FSLVerMaj 5 >>> FSL Version is 5.0.4, must be 3.X or 4.X >>> >>> I downloaded the epidewarp.fsl script from the suggested ftp site and >>> replaced the existing script. It did indeed fix the version >>> incompatibility with FSL 5.x. >>> >>> I ran into a new problem where it was aborting. After some trouble >>> shooting and looking over the documentation, I realized that —-epi is a >>> required input without which the script crashes (or is it supposed to be >>> optional but there is a bug in the script?). >>> >>> After including it, it ran much further but then aborted with the following >>> error: >>> >>> ERROR: input phase image exceeds allowable phase range. >>> Allowable range is 6.283 radians. Image range is: 12.5633 radians. >>> >>> This is consistent with the documentation. I’m not sure why the phase >>> image exceeds the range though. >>> >>> It ran without problems with SPM’s FieldMap Toolbox and it is from a >>> standard Siemen’s scanner sequence (two magnitude files and one phase >>> difference file). >>> >>> Do I just divide the values by two with something like fslmaths since it >>> seems to have exactly double the required range? >>> >>> Joe >>> >>>> On Nov 26, 2014, at 21:36, Douglas Greve < >>>> <mailto:gr...@nmr.mgh.harvard.edu>gr...@nmr.mgh.harvard.edu >>>> <mailto:gr...@nmr.mgh.harvard.edu>> wrote: >>>> >>>> >>>> It is there again. I don't know what the status if it is in terms of the >>>> version. Try it and let me know >>>> doug >>>> >>>> On 11/25/14 4:34 PM, Morgan Hough wrote: >>>>> Hi Doug, >>>>> >>>>> Could you put the epidewarp.fsl script back on your ftp site? I don’t see >>>>> it at the link in the archives: >>>>> >>>>> ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/epidewarp.fsl >>>>> >>>>> <ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/epidewarp.fsl> >>>>> >>>>> BTW, is the script updated in some way for 5.x or can I can the old >>>>> script just be changed to accept 5.x version numbers. >>>>> >>>>> Cheers, >>>>> >>>>> -Morgan >>>> >>>> _______________________________________________ >>>> Freesurfer mailing list >>>> Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu> >>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer >>>> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer> >>>> >>>> >>>> The information in this e-mail is intended only for the person to whom it >>>> is >>>> addressed. If you believe this e-mail was sent to you in error and the >>>> e-mail >>>> contains patient information, please contact the Partners Compliance >>>> HelpLine at >>>> http://www.partners.org/complianceline >>>> <http://www.partners.org/complianceline> . If the e-mail was sent to you >>>> in error >>>> but does not contain patient information, please contact the sender and >>>> properly >>>> dispose of the e-mail. >>> >>> -------------------------------------------------------------------------------- >>> >>> Joseph Dien, PhD >>> Senior Research Scientist >>> Maryland Neuroimaging Center >>> University of Maryland, College Park >>> E-mail: jdie...@mac.com <mailto:jdie...@mac.com> >>> Cell Phone: 202-297-8117 >>> http://joedien.com <http://joedien.com/> >>> >>> >>> _______________________________________________ >>> Freesurfer mailing list >>> Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu> >>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer >>> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer> >> _______________________________________________ >> Freesurfer mailing list >> Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu> >> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer >> >> >> The information in this e-mail is intended only for the person to whom it is >> addressed. If you believe this e-mail was sent to you in error and the e-mail >> contains patient information, please contact the Partners Compliance >> HelpLine at >> http://www.partners.org/complianceline . If the e-mail was sent to you in >> error >> but does not contain patient information, please contact the sender and >> properly >> dispose of the e-mail. > > -------------------------------------------------------------------------------- > > Joseph Dien, PhD > Senior Research Scientist > Maryland Neuroimaging Center > University of Maryland, College Park > E-mail: jdie...@mac.com <mailto:jdie...@mac.com> > Cell Phone: 202-297-8117 > http://joedien.com <http://joedien.com/> > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the e-mail > contains patient information, please contact the Partners Compliance HelpLine > at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. -------------------------------------------------------------------------------- Joseph Dien, PhD Senior Research Scientist Maryland Neuroimaging Center University of Maryland, College Park E-mail: jdie...@mac.com Cell Phone: 202-297-8117 http://joedien.com
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.