UNU-ACROP(1)

πŸ“¦ version 1.11.0, in fedora 43, fedora 44

πŸŽ€ NAME πŸŽ€

unu-acrop β€” bestie, this is a User Command (section 1 of the manual, iykyk) that automatically crops axes based on a given measure. She trims the boring ends off your data so you don't have to. πŸ’…


✨ SYNOPSIS ✨

unu acrop [-a,--axes [<ax0 ...>]] -m,--measure <measr> [-f,--frac
<frac>] [-off,--offset <offset>] [-b,--bounds <filename>] [-i,--input
<nin>] [-o,--output <nout>]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the vibe: it automatically crops axes based on a given measure. 🫢

For the axes that are getting cropped, the slices perpendicular to that axis get projected down into a single scalar using the measure you picked. That gives you a 1-D array, and then we analyze it β€” figuring out which chunks at the beginning and the end add up to less than some portion of the cumulative array sum. Those ends? Cropped off. Gone. Bye. βœ‚οΈ

And the best part, fr fr: the cropping bounds we figure out can be saved and then applied to other arrays via the -b option. Reuse queen. πŸ‘‘

  • Uses nrrdCropAuto

πŸ’– OPTIONS πŸ’–

  • -a [<ax0 ...>] , --axes [<ax0 ...>] β€” the axes (if any) that should NOT be cropped. That's 0 or more unsigned ints, bestie. default: " " (yes, a single space, iconic)
  • -m <measr> , --measure <measr> β€” How to measure slices (along the axes to crop) as scalars, to form the 1-D array that gets analyzed to determine the cropping extent. Every single measure from unu-project(1) works here, but the ones that actually make sense for this job include:
    • "max", "mean", "median", "variance": (self-explanatory, no notes πŸ’…)
    • "stdv": standard deviation
    • "cov": coefficient of variation
    • "product", "sum": product or sum of all values
    • "L1", "L2", "NL2", "RMS", "Linf": different norms
  • -f <frac> , --frac <frac> β€” threshold of cumulative sum of the 1-D array at which to crop. Needs to be in the interval [0.0,0.5). (double); default: "0.1"
  • -off <offset> , --offset <offset> β€” how much to offset the numerically determined cropping. A positive offset means expanding the interval of kept indices (less cropping) (int); default: "1"
  • -b <filename> , --bounds <filename> β€” if a filename is given here, the automatically determined min and max bounds for cropping get saved to this file as a 2-D array; first scanline is for -min, second is for -max. 😭 Unfortunately, nothing using the "m" and "M" semantics (above) can currently be saved in the bounds file. (string)
  • -i <nin> , --input <nin> β€” input nrrd
  • -o <nout> , --output <nout> β€” output nrrd (string); default: "-"

🌈 SEE ALSO 🌈

unu(1), unu-project(1)


πŸ’€ Heads up bestie: -f must live in [0.0,0.5) β€” don't try to be different, she won't allow it.

Okay that's the whole page, mwah 🫢 this one's from August 2021, straight outta the UNU-ACROP(1) era β€” section 1, User Commands, no cap. Go crop something iconic. πŸ’–βœ¨

πŸ“¦ where this page comes from