# SpaceTimeRealigner output rotation in radians or degree?

Hi,

I was trying to find out if the nipy’s SpaceTimeRealigner as used in the respective nipype interface (http://nipype.readthedocs.io/en/latest/interfaces/generated/nipype.interfaces.nipy.preprocess.html#spacetimerealigner) outputs rotation parameters in radians or degree?

Thanks!
Julia

If you look at nipype/algorithms/rapidart.py line 49ff you see that nipy is not using euler angles. You can uses this code to convert the output to what you expect to get.

Joerg

Hi Joerg,

thanks for your reply! I’m a little confused, but you are only saying it does not output euler angles – what does it output then?

Thanks!
Julia

Sorry, I have no idea. I only saw the comment from @Satra in the rapidart code.

@juhuntenburg - The nipy code uses the euler-rodrigues formulation https://en.wikipedia.org/wiki/Rodrigues’_rotation_formula and is converted to a standard rotation matrix using this code, which can then be decomposed into euler angles using this formulation.

1 Like

Hi @satra – thanks! But I think i don’t understand enough about rotations to be sure about what this means for my specific question (which I should have probably stated more directly to begin with):

If i want to calculate framewise displacement from the translation and rotation parameters of motion correction, i would usually transform the rotation into displacement on a sphere of a given radius. To do that, it is important to know if the rotations are given in radians or degree.

Now if i want to do the same for the output parameters of SpaceTimeRealigner, how would i go about it?

Thanks!
Julia

1 Like

@juhuntenburg - this is the conversion i was talking about:

and that’s needed to transfer things back to something the framewise displacement code understands.

Great, thank you so much for clarification @satra!