Basic arithmetic

imath

This script performs basic arithmetic operations with 2D FITS images (addition, subtraction, multiplication, division) from the terminal command line.

(venv_numina) $ numina-imath --help
Usage: numina-imath [-h] [--extname1 EXTNAME1] [--extname2 EXTNAME2]
                    [--overwrite]
                    [--dtype {uint8,int8,uint16,int16,uint32,int32,uint64,int64,float32,float64}]
                    [--display {all,result,none}] [--z1z2 Z1Z2] [--bbox BBOX]
                    [--keystitle KEYSTITLE] [--geometry GEOMETRY] [--echo]
                    file1 {+,-,x,/,=} file2 output

description: binary image arithmetic

Positional Arguments:
  file1                 First FITS image
  {+,-,x,/,=}           Arithmetic operation
  file2                 Second FITS image or number
  output                Output FITS image

Options:
  -h, --help            show this help message and exit
  --extname1 EXTNAME1   Extension name of the first FITS file (default:
                        'PRIMARY').
  --extname2 EXTNAME2   Extension name of the second FITS file (default:
                        'PRIMARY').
  --overwrite           Overwrite output file if already exists
  --dtype {uint8,int8,uint16,int16,uint32,int32,uint64,int64,float32,float64}
                        Data type of the output image (default: float32)
  --display {all,result,none}
                        Display images: all, result, none (default)
  --z1z2 Z1Z2           tuple z1,z2, minmax or None (use zscale)
  --bbox BBOX           bounding box tuple: nc1,nc2,ns1,ns2
  --keystitle KEYSTITLE
                        tuple of FITS keywords.format:
                        key1,key2,...keyn.'format'
  --geometry GEOMETRY   Tuple x,y,dx,dy indicating window geometry
  --echo                Display full command line

imath3d

This script performs basic arithmetic operations with 3D FITS data cubes (addition, subtraction, multiplication, division) from the terminal command line.

(venv_numina) $ numina-imath3d --help
Usage: numina-imath3d [-h] [--extname1 EXTNAME1] [--extname2 EXTNAME2]
                      [--overwrite]
                      [--dtype {uint8,int8,uint16,int16,uint32,int32,uint64,int64,float32,float64}]
                      [--echo]
                      file1 {+,-,x,/,=} file2 output

description: binary image arithmetic

Positional Arguments:
  file1                 First FITS image
  {+,-,x,/,=}           Arithmetic operation
  file2                 Second FITS image or number
  output                Output FITS image

Options:
  -h, --help            show this help message and exit
  --extname1 EXTNAME1   Extension name of the first FITS file (default:
                        'PRIMARY').
  --extname2 EXTNAME2   Extension name of the second FITS file (default:
                        'PRIMARY').
  --overwrite           Overwrite output file if already exists
  --dtype {uint8,int8,uint16,int16,uint32,int32,uint64,int64,float32,float64}
                        Data type of the output image (default: float32)
  --echo                Display full command line