FITRANS(1)

πŸ’« fitrans β€” the spatial-transformation glow-up page πŸ’«

okay bestie, welcome to FITRANS(1), part of the User Commands crew πŸŽ€ this is the manual for fitrans, and no cap, it's the tool you want when your image needs to be moved, squished, stretched, smoothed, sliced or exploded into a million little stamps. yes, exploded. we'll get there. 🌸


✨ NAME ✨

fitrans β€” performing spatial transformations on the input image πŸ¦‹


🌈 SYNOPSIS 🌈

fitrans [transformation and options] <input> [-o|--output <output>]

πŸ’– DESCRIPTION πŸ’–

So the main purpose of this program, like its whole ~main character energy~, is to perform specific or generic geometric transformations on the input image. that's it. that's the vibe. you feed it an image, you tell it how to warp it, it hands you back a warped image. periodt. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

πŸ’… General options:

  • -h, --help β€” gives you a general summary about the command line options. the lil' quickie version. ✨
  • --long-help, --help-long β€” gives a detailed list of command line options. the full tea. β˜•
  • --wiki-help, --help-wiki, --mediawiki-help, --help-mediawiki β€” gives a detailed list of command line options in Mediawiki format. wiki girlies rise 🫢
  • --version, --version-short, --short-version β€” gives some version information about the program.
  • -i, --input <image file> β€” name of the input FITS image file. your source material πŸ’–
  • -o, --output <image file> β€” name of the output FITS image file. where the glow-up lands.
  • -b, --bitpix <bitpix> β€” standard FITS output bitpix value.
  • -D, --data <spec> β€” output pixel data format specification.

πŸ¦‹ Spatial transformations:

  • -T, --input-transformation <transformation file> β€” name of the file which contains the transformation description. such a file can be created e.g. by the programs grtrans or grmatch. this file contains basically the same set of <keyword> = <value> pairs as it is used after the -t|--transformation option (see there). πŸ‘€
  • -t, --transformation <transformation> β€” comma-separated list of parameters for the spatial transformation, see the section "Parameters for spatial transformations" below. 🧚
  • -e, --shift <dx>,<dy> β€” imply a transformation that shifts the image by <dx>,<dy>.
  • --reverse, --inverse β€” apply the inverse transformation to the image rather than the original one. plot twist πŸ’€
  • -m β€” simple linear interpolation between pixels, with no exact flux conservation (just a multiplication by the Jacobian of the transformation).
  • -l β€” linear interpolation between the pixels involving exact flux conservation by integrating on the image surface.
  • -c β€” bicubic spline interpolation between pixels, with no exact flux conservation (just a multiplication by the Jacobian of the transformation).
  • -k β€” interpolation by integrationg the flux on a biquadratic interpolation surface, yielding exact flux conservation.
  • -s, --size <sx>,<sy> β€” the size of the output image if it should differ from the original image size.
  • -f, --offset <x>,<y> β€” zero-point coordinate of the output image in the input image.

πŸ’œ Parameters for spatial transformations:

  • type=<type> β€” type of the transformation. in the actual implementation, the only supported type for a transformation is "polynomial". one type only, she's exclusive πŸ’…
  • order=<order> β€” polynomial order for the transformation.
  • dxfit=<coefficients> β€” comma-separated list of the polynomial coefficients for the X coordinate. the number of coefficients must be 1, 3, 6, ... for the orders 0, 1, 2, ... respectively. math said triangle numbers only, bestie πŸ”Ί
  • dyfit=<coefficients> β€” comma-separated list of the polynomial coefficients for the Y coordinate.

🌸 Other simple spatial geometric transformations:

  • -z, --zoom <factor>, --zoom-xy <x>,<y> β€” zoom the image by the given (integer) factor, involving a biquadratic subpixel-level interpolation and therefore exact flux conservation.
  • -r, --shrink <factor>, --shrink-xy <x>,<y> β€” shrink the image by the given (integer) factor(s).
  • -d, --median β€” use a median-based averaging during the shrinking operation.
  • -v, --truncated-mean <Nr> β€” compute a truncated mean during the shrinking operation by rejecting the <Nr> number of lower and upper points. bye bye outliers πŸ‘‹
  • --optimistic-masking β€” imply some optimism during the shrinking operation: masked pixels are ignored during the averaging process and the final mask will be computed in a complement manner. manifesting good pixels ✨
  • -g, --magnify <factor>, --magnify-xy <x>,<y> β€” same as zooming the image but there is no subpixel-level interpolation.

πŸ“ Large-scale image smoothing:

  • -a, --smooth <parameters> β€” perform a smoothing on the image. the parameters of the smoothing are the following:
    • spline β€” do a spline interpolation smoothing.
    • polynomial β€” do a polynomial interpolation smoothing.
    • [xy]order=<order> β€” spatial order of the smoothing function. the order in the X and Y coordinates can be set independently, by setting "xorder=..." or "yorder=...".
    • unity β€” scale the resulting smoothed image to have a mean of 1.
    • detrend β€” the resulting image will be the original image divided by the best fit smoothed surface.
    • [xy]hsize=<halfsize> β€” do a box filtering with the given halfsize.
    • mean β€” use the mean value of the pixels for the box filtering.
    • median β€” use the median value of the pixels for the box filtering.
    • iterations=<iterations> β€” number of iterations to reject outlier pixels from the box.
    • lower, upper, sigma=<sigma> β€” lower, upper or symmetric rejection level in the units of standard deviation.

πŸ”₯ Noise estimation:

  • -n, --noise β€” derive an image which reflects the "noise level" of the image. ✨

🌈 Slicing or exploding data cube images:

  • -y, --layer <layer> β€” layer (z-axis index) of the desired image slice.
  • -x, --explode <basename> β€” explode the input image into individual planar (two dimensional) FITS image. the basename must contain at least one printf-like tag of %d, %i, %o, %x or %X that is replaced by the appropriate layer number index. πŸ’₯
  • -y, --first-layer <n> β€” use the specified value for the first layer index. the subsequent layer indices are incremented normally. by default, the index of the first data cube layer is 0.

πŸ‘‘ Multiple stamp extraction:

  • -c, --cut <basename> β€” extract stamps with a size defined by the -s|--size argument. the stamps are extracted on a grid, defined by the -p|--step and -w|--count arguments where the stamp grid offset is defined by the -f|--offset argument. the <basename> should contain two spefic printf-like elements of %x and %y which are replaced by the corresponding stamp indices in the X and Y directions. in order to have some sort of pretty-printing in the file names, the %x and %y parts may have the form of %.<N>x and %.<N>y. note that despite of the %x convention, both %x and %y are printed in decimal system. πŸŽ€
  • -w, --count <count_x>,<count_y> β€” number of stamps to be extracted in X and Y directions, respectively.
  • -s, --size <sx>,<sy> β€” the size of the output image stamps.
  • -p, --step <step_x>,<step_y> β€” step size between the stamps in the units of pixels and in the X and Y directions, respectively. note that if <step_x> is smaller than <sx> (or similarly, if <step_y> is smaller than <sy>), then the output stamps will overlap. this might also be intentional for various applications. overlapping stamps are a choice and honestly, valid πŸ’…
  • -f, --offset <x>,<y> β€” zero-point coordinate of the lower-left pixel of the lower-left output stamp (having an index of %x=0 and %y=0) in the frame of the input image.

😭 REPORTING BUGS 😭

report bugs to <apal@szofi.net>, see also https://fitsh.net/. bestie if it's broken, tell the devs, they wanna know 🫢


Copyright Β© 1996, 2002, 2004-2008, 2010-2016, 2018-2020; Pal, Andras <apal@szofi.net>


and that's the whole page, bestie πŸ’– this was fitrans version 0.9.4 (2021.01.24), from January 2021, page FITRANS(1) β€” go transform something iconic, ily, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from