nipy.SpaceTimeRealigner problem

Hi guys,

we are using using nipy.SpaceTimeRealigner as a node in our nipype workflow before applying melodic.
Without using the realigner the 9th IC clearly resembles the stimulus induced activity as follows (upper figure).
Whereas, if we do use the SpaceTimeRealigner method, the temporal dependency on the stimulus gets lost and also does not occur in any of the other ICs (lower figure). If we just use the spm.realign method, this does not happen and stimulus reflecting activity is preserved.

Does anybody know why this is or how to fix it?

Thanks a lot in advance and all the best!

realigner = pe.Node(interface=nipy.SpaceTimeRealigner(), name="realigner") realigner.inputs.slice_times = "asc_alt_2" = tr realigner.inputs.slice_info = 3 #3 for coronal slices (2 for horizontal, 1 for sagittal)

1 Like

This is very interesting (and scary). A couple of things worth trying:

  • Are you sure slice_info should be set to 3 not 2?
  • Are your getting the same effect when disabling the time realignement (by not setting the slice_times, tr and slice_info parameters)?
1 Like

Scary indeed!

This is mouse fMRI, and the slice selection is done axially - meaning that the slices are coronal (not horizontal). this is due to the mouse brain not being bent at 90° in the middle (as e.g. the human brain is).

We should definitely try disabling the time realignment; I was unaware that this can be done by omitting inputs. However, since our mice are well fixed and anesthetized, spatial realignment is of less concern to us than slice timing correction. So we definitely want to be able to do slice timing correction (preferably via a python tool) - it’s spatial realignment which we could forego.

Not least of all, our stimulus evoked activation is quite strong, and spread across much of the cortex. I was afraid, that it might get categorized and filtered out as “motion” - do you know if SpaceTimeRealign does motion correction behind the scenes? We had trouble actually understanding the code.

Thanks Chris for the quick response. Indeed, I just tried without time realignment and still the IC of interest vanishes. Any idea what could be the problem?

Thanks again!

is there a reason why you would consider the ICs to be the same? i.e. is there another IC that is strongly correlated with the original IC9?

the spacetimerealigner does indeed do motion correction.

Nope, the effect can no longer be picked up by melodic :-/

Is there any way to tell SpaceTimeRealigner to forego motion correction (or reduce the aggressiveness of the correction)?

I assume the motion correction is done as an integral part of the spatial realignment - if so is there any tool for slice timing correction only in python?

here are the routines that were implemented in pypreprocess:

(btw - can the data be shared from a single run?)

Hi Satra,

thanks for the reply. Here is a link to what we’ve used (the one mentioned earlier):

in diagnose, using realign == “spacetime” will ‘break’ relevant ICA components, while realign == "space doesn’t).

A link with example data will follow shortly.

All the best and thanks again.

And here the promised link to the data (better late than never :wink: )

if somebody could have a look what the exact problem is, that would be highly appreciated.

Thanks and best!

1 Like