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 programsgrtransorgrmatch. this file contains basically the same set of<keyword> = <value>pairs as it is used after the-t|--transformationoption (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 be1, 3, 6, ...for the orders0, 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,%xor%Xthat 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 is0.
π Multiple stamp extraction:
-c,--cut <basename>β extract stamps with a size defined by the-s|--sizeargument. the stamps are extracted on a grid, defined by the-p|--stepand-w|--countarguments where the stamp grid offset is defined by the-f|--offsetargument. the<basename>should contain two spefic printf-like elements of%xand%ywhich 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%xand%yparts may have the form of%.<N>xand%.<N>y. note that despite of the%xconvention, both%xand%yare 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=0and%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 β
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
- debian bookworm: fitsh 0.9.4-1 Β· GPL-3.0-or-later
- debian trixie: fitsh 0.9.4-1 Β· GPL-3.0-or-later
- ubuntu jammy: fitsh 0.9.4-1 Β· GPL-3.0-or-later
- ubuntu noble: fitsh 0.9.4-1 Β· GPL-3.0-or-later
- ubuntu resolute: fitsh 0.9.4-2 Β· GPL-3.0-or-later
- ubuntu stonking: fitsh 0.9.4-2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms