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.2.33-8a3b. 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 image are expected as options (starting with `hdu') listed below. Please note that 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 a.fits b.fits average). Please see the manual for more information.

The operators/functions recognized by Arithmetic are: +, -, *, /, abs, pow, sqrt, log, log10, minvalue, maxvalue, min, max, average, median, lt, le, gt, ge, eq, neq, and, or, not, isblank. Please run `info gnuastro "Arithmetic operators"' for detailed information on each operator. Note that multiplication should be quoted (like "*", or '*') to avoid shell expansion.

For more information, please run any of the following commands. They will respectively show you the `Invoking Arithmetic' subsection, the complete `Arithmetic' section, or the full GNU Astronomy Utilities manual. In particular the first contains a very complete explanation of each option.

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:
-h, --hdu=STR
Nth call of this option, used for Nth input FITS.
-H, --mhdu=STR
Mask image header name.
-M, --mask=STR
Mask image file name.
Output:
-D, --dontdelete
Don't delete output if it exists.
-K, --keepinputdir
Do not remove input's dir info for output.
-o, --output=STR
Output file or directory name.
-T, --type=STR
byte, short, long, longlong, float, double.
Operating modes:
-?, --help
give this help list
--cite
BibTeX citation for Arithmetic.
--nolog
No log file for programs which make one.
-N, --numthreads=INT
Number of CPU threads to use.
--onlydirconf
Only read current directory configuration file.
--onlyversion=STR
Only run if the program version is this.
-P, --printparams
Print parameter values to be used and abort.
-q, --quiet
Only report errors, remain quiet about steps.
-S, --setdirconf
Set default values for this directory and abort.
--usage
give a short usage message
-U, --setusrconf
Set default values for this user and abort.
-V, --version
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/

AUTHOR

Written by Mohammad Akhlaghi

REPORTING BUGS

Report bugs to bug-gnuastro@gnu.org.

COPYRIGHT

Copyright © 2015-2016, 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.

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.

October 2016 GNU Astronomy Utilities 0.2.33-8a3b