Time series diagnostics
These started life as tsdiffana.m - see http://imaging.mrc-cbu.cam.ac.uk/imaging/DataDiagnostics
Oliver Josephs (FIL) gave me the idea of time-point to time-point subtraction as a diagnostic for motion and other sudden image changes.
Time-point to time-point differences over volumes and slices
We think of the passed array as an image. The image has a “time” dimension given by time_axis and a “slice” dimension, given by slice_axis, and one or other dimensions. In the case of imaging there will usually be two more dimensions (the dimensions defining the size of an image slice). A single slice in the time dimension we call a “volume”. A single entry in arr is a “voxel”. For example, if time_axis == 0, then v = arr[0] would be the first volume in the series. The volume v above has v.size voxels. If, in addition, slice_axis == 1, then for the volume v (above) s = v[0] would be a “slice”, with s.size voxels. These are obviously terms from neuroimaging.
Parameters : | arr : array_like
time_axis : int
slice_axis : int
|
---|---|
Returns : | results : dict
|