World to/from pixel

pixel_solid_angle_arcsec2

This script calculates the solid angle subtended by a pixel in a 2D FITS image (in arcsec^2).

(venv_numina) $ numina-pixel_solid_angle_arcsec2 --help
usage: numina-pixel_solid_angle_arcsec2 [-h] [--extname EXTNAME]
                                        [--method METHOD]
                                        [--kernel_size KERNEL_SIZE]
                                        [--verbose] [--echo]
                                        input_file output_file

Compute the solid angle in arcsec^2 for each pixel in a 2D image.

positional arguments:
  input_file            FITS file containing the image data.
  output_file           Output FITS file to save the solid angle data.

options:
  -h, --help            show this help message and exit
  --extname EXTNAME     Extension name of the input HDU (default: 'PRIMARY').
  --method METHOD       Method to compute the solid angle:
                        1: Use spherical polygons (slow)
                           (not recommended for very small pixel sizes)
                        2: Use spherical polygons (different approach, slow)
                           (recommended for small pixel sizes)
                        3: Use spherical coordinates and distances (fast)
                           (default, not recommended for very small pixel sizes)
  --kernel_size KERNEL_SIZE
                        Kernel size for smoothing the result using a median
                        filter. If not specified, no smoothing is applied.
  --verbose             Display intermediate information
  --echo                Display full command line

pixel_to_world

Auxiliary script to convert from pixel coordinates to celestial coordinates and wavelength. There is also the script numina-world_to_pixel, which performs the inverse transformation.

(venv_numina) $ numina-pixel_to_world --help
Usage: numina-pixel_to_world [-h] [--pixel PIXEL] [--extnum EXTNUM]
                             [--verbose] [--echo]
                             inputfile

Convert pixel to world coordinates.

Positional Arguments:
  inputfile        Input FITS file

Options:
  -h, --help       show this help message and exit
  --pixel PIXEL    WCS pixel coordinate (comma separated values)
  --extnum EXTNUM  Extension number (default 0=PRIMARY)
  --verbose        Display intermediate information
  --echo           Display full command line

world_to_pixel

Auxiliary script to convert from celestial coordinates and wavelength to pixel coordinates. There is also the script numina-pixel_to_world, which performs the inverse transformation.

(venv_numina) $ numina-world_to_pixel --help
usage: numina-world_to_pixel [-h] [--sky SKY] [--wave WAVE] [--extnum EXTNUM]
                             [--verbose] [--echo]
                             inputfile

Convert world to pixel coordinates.

positional arguments:
  inputfile        Input FITS file

options:
  -h, --help       show this help message and exit
  --sky SKY        Celestial coordinate (string)
                   e.g. 'SkyCoord(0*u.arcsec, 0*u.arcsec)'
  --wave WAVE      Spectral wavelength (string)
                   e.g. '1.9344e-06*u.m'
  --extnum EXTNUM  Extension number (default 0=PRIMARY)
  --verbose        Display intermediate information
  --echo           Display full command line