# use BET to get a brain mask from mag bet mag mag_stripped -m # prepare phase map by subtracting out mean, and converting to radians # that odt flag on the end is important, otherwise you get integer output # and a useless phase map fslmaths ph -sub 2048 -mul 3.1415927 -div 2048 ph_rad -odt float # use PRELUDE to unwrap phase map, with mag_stripped as a mask prelude -p ph_rad -a mag_stripped -m mag_stripped_mask -o ph_rad_unwrapped # convert to freq. map (rad / ms, for convenience) # delta TE for the fieldmap sequence is 2.46 ms fslmaths ph_rad_unwrapped -div 1.02 ph_rad_per_ms # now apply field map to data. Need to know echo spacing # (time for one read-out line). FSl calls this dwell time # which is a decidedly odd use of the term. Also need to know # phase encode direction, which in this case was posterior -> anterior fugue -i run01_wedge --loadfmap=ph_rad_per_ms --dwell=0.28 --nocheck --unwarpdir=y -u run01_unwarped