Scroll to navigation

ARITHMETIC(1) User Commands ARITHMETIC(1)

NAME

Arithmetic - arithmetic operations on images and numbers

SYNOPSIS

astarithmetic [OPTION...] ASTRdata or number [ASTRdata] OPERATOR ...

DESCRIPTION

Arithmetic is part of GNU Astronomy Utilities 0.22. Arithmetic will do arithmetic operations on one or multiple images and numbers. Simply put, the name of the image along with the arithmetic operators and possible numbers are given as arguments. The extensions of each input are specified with (possibly multiple) calls to the '--hdu' option.

Currently Arithmetic only supports postfix or reverse polish notation. For example to get the result of '5+6', you should write '5 6 +', or to get the average of two images, you should write 'a.fits b.fits + 2 /' (or more simply use the 'average' operator with 'a.fits b.fits average'). Please see the manual for more information.

Arithmetic recognizes a large collection of standard operators, including basic arithmetic (e.g., +, -, x, /), mathematical (e.g., abs, pow, sqrt, log), statistical (minvalue, min, max, average), comparison (e.g., lt, le, gt), logical (e.g., and, or, not), the full set of bitwise operators, and numeric type conversion operators to all known types. Please run the command below for a complete list describing all operators (press the 'SPACE' keyboard key, or arrow keys, to go down and 'q' to return to the command-line):

$ info gnuastro "Arithmetic operators"

For more information, please run any of the following commands. In particular the second contains a very comprehensive explanation of Arithmetic's invocation: expected input(s), output(s), and a full description of all the options.

$ astarithmetic -P
$ info astarithmetic
$ info Arithmetic
$ info gnuastro

If you couldn't find your answer in the manual, you can get direct help from experienced Gnuastro users and developers. For more information, please run:

$ info help-gnuastro

Arithmetic options:

Input:
Plain-text file with command-line arguments.
Use GSL_RNG_SEED env. for mknoise operator.
Use this HDU for all inputs, ignore '--hdu'.
Nth call, used for HDU of Nth input FITS.
Ignore case in matching/searching columns.
Select column(s): 'name', 'unit', 'comment'.
File to use for output's WCS.
HDU/extension to use for output's WCS.
Tessellation (tile grid):
Interpolation metric (radial, manhattan).
Output:
Write all remaining data in the output.
Internal comments (FITS images: COMMENT keyword).
Don't delete output if it exists.
Keep input directory for automatic output.
Internal name (FITS images: EXTNAME keyword).
No Git commit in 0-th HDU of output FITS.
No metadata in 0-th HDU of output FITS.
No 'DATE' in 0-th HDU of output FITS.
No versions in 0-th HDU of output FITS.
Output file name.
Write 1D outputs as an image, not a table.
Write 1D output on stdout, not in a table.
Table fmt: 'fits-ascii', 'fits-binary', 'txt'.
Internal units (FITS images: BUNIT keyword).
WCS linear matrix of output ('pc' or 'cd').
Operating modes:
-?, --help
give this help list
List all config files and variables read.
BibTeX citation for this program.
Read configuration file STR immediately.
Custom prefix of option names config files.
Do not parse any more configuration files.
Information about output(s) in a log file.
Min. bytes to avoid RAM automatically.
Number of CPU threads to use.
Only run if the program version is STR.
Print parameter values to be used and abort.
Don't print mmap'd file's name and size.
Only report errors, remain quiet about steps.
Set default values for this directory and abort.
give a short usage message
Set default values for this user and abort.
print program version

Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.

GNU Astronomy Utilities home page: http://www.gnu.org/software/gnuastro/

REPORTING BUGS

Report bugs to bug-gnuastro@gnu.org.

COPYRIGHT

Copyright © 2015-2024 Free Software Foundation, Inc. License GPLv3+: GNU General public license version 3 or later.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Written/developed by Mohammad Akhlaghi

SEE ALSO

The full documentation for Arithmetic is maintained as a Texinfo manual. If the info and Arithmetic programs are properly installed at your site, the command

info Arithmetic

should give you access to the complete manual.

February 2024 GNU Astronomy Utilities 0.22