- fiarith [options] "<expression>" [-o|--output <output.fits>]
- The purpose of this program is to evaluate <expression> which is intented to contain arithmetic operations and functions on FITS images (of the same size). See the section "Examples" below for examples on the syntax of <expression>
- -h, --help
- Gives general summary about the command line options.
- Gives a detailed list of command line options.
- Gives some version information about the program.
- -o, --output <fits>
- The name of the output file (omitting or specifing '-' yields the output to be written to stdout).
- -s, --size <sx>,<sy>
- Horizontal and vertical size of the output image (meaningless if <expression> contains any existing FITS image).
- -M, --input-mask <fits>
- Input mask file to co-add to output image.
- --output-mask <fits>
- Name of output mask file to create.
- -D, --data <spec>
- Output pixel data format specification.
- -b, --bitpix <bitpix>
- Standard FITS output bitpix value.
- -a, --apply-mask
- Resets pixel values to zero if masked.
- -e, --header <fits>
- Inherit output header from the specified FITS file.
Available arithmetic operators:
- Division. Dividing by zero yields zero automatically.
Available arithmetic functions:
- sin(.), cos(.), tan(.)
- Trigonometric functions.
- asin(.), acos(.), atan(.), atan2(.,.), arg(.,.)
- Inverse trigonometric functions.
- abs(.), sq(.), sqrt(.), exp(.), log(.)
- Absolute value, square, Square root, exponential and natural logarithm functions.
Available image functions:
- The per pixel minimal value of pixel intensities of the images listed (separated by comma) in the argument of the function.
- The per pixel maximal value of pixel intensities of the images listed (separated by comma) in the argument of the function.
- The per pixel mean value of pixel intensities of the images listed (separated by comma) in the argument of the function.
- The mean of the pixel values on the image.
- The per pixel sign function.
- The per pixel Heaviside step function.
- The Laplace transform of the image.
- Noise level estimation for the image.
- Correlation between two images.
- The smoothed variant of the first argument (threated as an image), which is yielded by the convolution with a Gaussian profile with a standard deviation of <sigma>, evaluated on a kernel stamp with the size of <size>.
- fiarith 'img1.fits'-'orig.fits' -o diff.fits
- Calculates the per pixel difference between images img1.fits and orig.fits and stores the result in diff.fits.
- fiarith -s 512,512 137.42 -o constant.fits
- Creates a new image with the size of 512 by 512 pixels with the constant value of 137.42.
- fiarith '-'*26 -o -
- Multiplies the pixel intensities of the image read from the standard input by 26 and writes the result to the standard output. The -o - can either be omitted, since by default the output is written to stdout.
- fiarith -s 512,512 ['input.fits'](a/(1-0.3*(X^2-Y^2))) -o flattened.fits
- This invocation evaluates the a/(1-0.3*(X^2+Y^2)) expression on each pixel of the image input.fits, where a referes to the pixel value itself and X and Y are the normalized spatial coordinates. The normalization is always done as X=(2*x-SX)/(SX) and Y=(2*y-SY)/SX, i.e. the X and Y coordinates are zero at the center of the images, X has a unity absolute value at the left and right edges and Y is scaled properly to X.
- fiarith ('raw.fits'-'bias.fits'-0.5*'dark.fits')*(norm('flat.fits')/'flat.fits') -o calibrated.fits
- This operation performs a simple bias, dark and flat calibration on the input raw image raw.fits, expecting bias.fits, dark.fits and flat.fits to be the master bias, dark and flat calibration frames, respectively; and assuming an exposure time for the raw image which is the half of the exposure time of the master dark frame. Due to the norm(...) function, the mean intensity level of the image is kept to be the same as it is in the raw image.