You can provide `eddy`

the prepared aligned fieldmap via commandline parameter `--field`

https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/eddy/UsersGuide#A--field

which enables to do eddy-current and distortion correction simultaneously. However, the caveat is that the fieldmap has to be invertible (`topup`

fieldmaps are guaranteed invertible, which is not the case of gradient fieldmaps), because if it not the case, the distortion correction will fail.

I have discussed this matter with Jesper Andersson, I attach his comment in case you are interested:

I have had a look at your data and I have figured out what the problem is. As part of the internal calculations eddy will invert the total field (the sum of the susceptibility field and the eddy current field). That means that the field must be invertible, and in practice this means that the field must be reasonably smooth and not have discontinuities along the PE-direction.

The way you have created your fieldmaps means that this is not true. If you for example look at the top or bottom slice of the fieldmap for the data you sent me you can see that at some point the field goes sharply to zero. This is because of the way you have registered your fieldmaps to the diffusion data, and where this â€śjumpâ€ť is caused by missing data in these slices. The same is true at the very edges of the other slices.

The recommended way of avoiding things like this would be to always acquire your GE-based fieldmap with a more generous FOV than the data you intend to correct, so that the field is defined in all parts of the images you want to correct.

If that is not an option you can try to apply a little bit of smoothing (using fslmaths) to the registered fieldmaps such that the field becomes invertible. It is not ideal since it means you end up with a less faithful (smoothed) representation of the field, but it might help you save data that you have already acquired. I tried that trick myself on your data and the results looks alright to the eye. And all the strange distortions are gone.

Antonin