These commands look just fine.
You may want to see if the resulting fieldmap_rads is noisy at the  
edge of
the brain and mask it with a tighter mask (one produced by BET) to get
rid of any noisy voxels there.

You want the phase range to be 2*pi.  It doesn't matter if it is 0 to  
or -pi to pi.

As for the fugue line, I would advise doing things using the FEAT GUI
(in pre-stats mode) as this applies the registration steps for you,  
using fugue at the command line assumes that you have already done the
registration.  Using the FEAT GUI is the way we general recommend
performing undistortion.

All the best,

On 25 Jun 2008, at 21:04, Stamatis Sotiropoulos wrote:

> Hi all,
>   I am using prelude and fugue to correct for EPI distortion. I have  
> two
> modulus and two phase images corresponding to two gradient echo's with
> different TE, and I am using the following command line scripts:
>  prelude -a modulus_echo01 -p phase_echo01 -u phase01
>  prelude -a modulus_echo02 -p phase_echo02 -u phase02
>  fslmaths phase02 -sub phase01 -div 0.0031 fieldmap_rads -odt float
>  fugue -i EPI_image --loadfmap=fieldmap_rads --dwell=0.000767 -u out
> where TE=0.0031 sec and dwell_time=0.000767 sec.
> a) Is the above sequence correct?
> b) The phase_echo images that are used as input to prelude, should be
> scaled in the range 0 to 2*pi or -pi to pi?
> c) Should the modulus and phase images be registered first to the EPI
> image? They are acquired just after the EPI acquisition with exactly  
> the
> same field of view and resolution. Or fugue performs this  
> registration?
> Thank you in advance,
> Stamatis
> Stamatios N Sotiropoulos
> Clinical Neurology
> University of Nottingham, UK