NIPY_TSDIFFANA(1)

๐Ÿ“ฆ
version 0.6.1 ยท 2 versions
, in fedora 43

๐Ÿ’– 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-results flag. The generated filenames come from the results of the --write-results, --out-path and --out-fname-label options (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 of DV2[0] (slice S) through DV2[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 all DV2 volumes DV2[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-path option, 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 .png for 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 to OUT_PATH. Mutually incompatible with OUT_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