NIPY_TSDIFFANA(1)
๐ nipy_tsdiffana ๐
okay bestie, welcome to nipy_tsdiffana from the User Commands section of the manual โ it's the girlie that analyzes and plots time series difference metrics โจ and honestly? she ate.
โจ NAME โจ
nipy_tsdiffana โ analyze, plot time series difference metrics ๐ฆ
๐ธ SYNOPSIS ๐ธ
nipy_tsdiffana [-h] [--out-file OUT_FILE] [--write-results]
[--out-path OUT_PATH] [--out-fname-label OUT_FNAME_LABEL]
[--time-axis TIME_AXIS] [--slice-axis SLICE_AXIS] filename
๐ DESCRIPTION ๐
So basically? She runs the time series difference algorithm over a 4D image volume, which is very often an FMRI volume. No cap.
And she works in one of three modes, pick your fighter:
- interactive : the time series difference plot just appears on screen. This is the default mode ๐
- non-interactive, plot only : she writes the time series difference plot to a graphic file. Activate this mode with the
--out-file=<myfilename>option ๐พ - non-interactive, write plot, images and variables : she writes the plot to a file, and writes the generated diagnostic images and variables to files too. Activate this with the
--write-resultsflag. The generated filenames come from the results of the--write-results,--out-pathand--out-fname-labeloptions (scroll to OPTIONS, bestie ๐)
๐ WRITE-RESULTS OPTION, GENERATED FILES ๐
So when she's doing the time point analysis, she makes a difference volume between each time point and the next time point in the series. If we have T volumes then there will be (T-1) difference volumes. Let's call the vector of difference volumes DV and the first difference volume DV[0]. So DV[0] results from subtraction of the second volume in the 4D input image from the first volume in the 4D input image. And the element-wise squared values from DV[0] is DV2[0]. Math queen behavior fr fr ๐งฎโจ
The following images will be generated. <ext> is the input filename extension (e.g. .nii):
dv2_max_<label><ext>: 3D image volume, where each slice S is the slice from all ofDV2[0](slice S) throughDV2[T-1](slice S) that has the maximum summed squared values. This volume gives you an idea of the worst (highest difference) slices across the whole time series. It's giving "who is the problem slice" ๐dv2_mean_<label><ext>: the mean of allDV2volumesDV2[0]..DV[T-1]across the volume (time) dimension. Higher voxel values in this volume mean that time-point to time-point differences tended to be high in this voxel. Obsessed with a voxel that's always going through it ๐ญ
She also writes the mean signal at each time point, and the mean squared difference between each slice in time, as variables to an npz file named tsdiff_<label>.npz ๐ซถ
The filenames for the outputs are of the form <out-path>/<some_prefix><label><file-ext> where:
<out-path>is the path specified by the--out-pathoption, or the path of the input filename<some_prefix>is one of the standard prefixes above<label>is given by--out-label, or by the filename of the input image (with path and extension removed)<file-ext>is.pngfor graphics, or the extension of the input filename for volume images
For example, specifying only the input filename /some/path/fname.img will generate filenames of the form /some/path/tsdiff_fname.png, /some/path/dv2_max_fname.img etc. ๐
๐ OPTIONS ๐
๐ POSITIONAL ARGUMENTS ๐
filenameโ 4D image filename ๐ธ
๐ฆ OPTIONAL ARGUMENTS ๐ฆ
-h,--helpโ show a help message and exit. Your bestie when you're lost ๐--out-file OUT_FILEโ graphics file to write to instead of leaving the image on screen--write-resultsโ graphics file to write to instead of leaving image on screen. If specified, write diagnostic images and analysis variables, plot toOUT_PATH. Mutually incompatible withOUT_FILEโ ๏ธ pick one, babe, you cannot have both--out-path OUT_PATHโ path for output image files (default from filename path) ๐๏ธ--out-fname-label OUT_FNAME_LABELโ mid part of output image / plot filenames ๐ท๏ธ--time-axis TIME_AXISโ image axis for time โฐ--slice-axis SLICE_AXISโ (that's it, that's the whole description in the original, and I'm not gonna make stuff up about it, iykyk ๐)
๐ SEE ALSO ๐
okay that's the whole page bestie, go forth and diff those time series ๐ โจ this was nipy_tsdiffana, February 2023 edition, mwah ๐๐๐ซถ
๐ฆ where this page comes from
- fedora 43: python3-nipy 1:0.6.1-5.fc43 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms