NIPY_4D_REALIGN(1)

πŸ“¦
version 0.6.1 Β· 2 versions
, in fedora 43

πŸ’– NIPY_4D_REALIGN πŸ’–

okay bestie, gather round, because this one is the <pink>nipy_4d_realign</pink> manual page β€” a User Commands classic β€” and it is literally the command-line wrapper for <purple>SpaceTimeRealign</purple>. yes, that's the whole vibe. motion correction but make it a one-liner. πŸŽ€


✨ NAME ✨

nipy_4d_realign β€” command-line wrapper for SpaceTimeRealign


🌸 SYNOPSIS 🌸

nipy_4d_realign [-h] [--slice_order String] [--slice_dim Int]
[--slice_dir Int] [--make_figure Bool] [--save_path String]
[--save_params Bool] Float File

πŸ¦‹ OPTIONS πŸ¦‹

πŸ“ POSITIONAL ARGUMENTS

  • Float β€” the TR of the measurement. that's it, that's the number. the repetition time. give it here. 🫢
  • File β€” path to a <lavender>nifti file</lavender>, or to a folder containing nifti files. If you hand it a folder instead of a file, the order of motion correction will be np.sort(list_of_files) β€” so yeah, sorted, not vibes-based, no cap. The outputs will be β€˜*_mc.par’ (which holds 3 translation and three rotation parameters) and β€˜*_mc.nii.gz’ which holds the motion corrected data β€” unless β€˜apply’ is set to False, in which case bestie, you're not getting the corrected data. πŸ’…

🧚 OPTIONAL ARGUMENTS

  • -h, --help β€” show a help message and exit. the classic. the icon. the moment you type this when everything is on fire. πŸ”₯
  • --slice_order String β€” the order of slice aquisition: {β€˜ascending’, β€˜descending’ (default), or the name of a function from nipy.algorithms.slicetiming.timefuncs}. so you can name a function from that module, main character energy. πŸ‘‘
  • --slice_dim Int β€” integer denoting the axis in images that is the slice axis. In a 4D image, this will often be axis = 2 (default). lowkey it's usually 2. πŸŒ€
  • --slice_dir Int β€” 1 if the slices were acquired slice 0 first (default), slice -1 last, or -1 if acquire slice -1 first, slice 0 last. direction matters, ok?? which end came first is literally the whole point. 😭
  • --make_figure Bool β€” whether to generate a β€˜.png’ figure with the motion parameters across runs. {True, False}. Default: False. so if you want the little picture of your motion suffering, you gotta ask for it. ✨
  • --save_path String β€” full path to a file-system location for the output files. Defaults to the same location as the input files. it'll just dump stuff next to your inputs unless you tell it otherwise. 🏠
  • --save_params Bool β€” whether to save the motion corrections parameters (3 rotations, 3 translations). {True, False}. Default: False.
NOTE: The rotations are not Euler angles, but a rotation vector. Use nipy.algorithms.registration.to_matrix44 to convert to a 4-by-4 affine matrix. ⚠️ do NOT come for me saying "but my Euler angles" β€” they are NOT Euler angles, they are a rotation vector, and to_matrix44 is your bestie for turning them into a 4-by-4 affine matrix. periodt. πŸ’€

🌈 SEE ALSO 🌈

the whole little friend group, all in one place. go say hi. 🫢


and that's the page, bestie!! this one's from February 2023 and it lives in the NIPY_4D_REALIGN(1) section of the manual, so like, that's the version + date, consider yourself signed off on. now go correct some motion. mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from