Sponsor:

Your company here — click to reach over 10,000 unique daily visitors

unu-acrop - Man Page

automatically crop axes based on given measure

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

Automatically crop axes based on given measure. For the axes that are to be cropped, the slices perpendicular to that axis are projected down to a scalar with the specified measure. The resulting 1-D array is analyzed by determining what portions at the beginning and end constitute less than some portion of the cumulative array sum; these ends are cropped off. The cropping bounds determined here can be saved and applied to other arrays via the “-b” option.

Options

-a [<ax0 ...>] , --axes [<ax0 ...>]

the axes (if any) that should NOT be cropped (0 or more unsigned ints); default: “ ”

-m <measr> , --measure <measr>

How to measure slices (along axes to crop) as scalars, to form 1-D array analyzed to determine cropping extent. All the measures from unu-project(1) can be used, but those that make more sense here include:

  • max”, “mean”, “median”, “variance”: (self-explanatory)
  • 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 1-D array at which to crop. Needs to be in interval [0.0,0.5). (double); default: “0.1

-off <offset> , --offset <offset>

how much to offset the numerically determined cropping; positive offsets 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 are 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)

Referenced By

unu(1).

August 2021