Time series diagnostics
These started life as tsdiffana.m - see http://imaging.mrc-cbu.cam.ac.uk/imaging/DataDiagnostics
Oliver Josephs (FIL) gave me (MB) 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 more 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, optional
slice_axis : None or int, optional
|
---|---|
Returns: | results : dict
|
Raises: | ValueError : if time_axis refers to same axis as slice_axis |
Time-point to time-point differences over volumes and slices of image
Parameters: | img : Image
time_axis : str or int, optional
slice_axis : str or int, optional
|
---|---|
Returns: | results : dict
|