Navigation

Operators and Keywords

Function List:

C++ API

Function File: save_fits_image(filename, image, bit_per_pixel)

Write IMAGE to FITS file filename.

Datacubes will be saved with NAXIS=3.

The optional parameter bit_per_pixel specifies the data type of the pixel values. Accepted string values are BYTE_IMG, SHORT_IMG, LONG_IMG, LONGLONG_IMG, FLOAT_IMG, and DOUBLE_IMG (default). Alternatively, corresponding numbers may be passed, i.e. 8, 16, 32, 64, -32, and -64.

Use a preceding exclamation mark (!) in the filename to overwirte an existing file.

Lossless file compression can be used by adding the suffix ’.gz’ to the filename.

See also: save_fits_image_multi_ext, read_fits_image.

Package: fits