mConvert

montage_wrapper.commands.mConvert(in_image, out_image, debug_level=None, status_file=None, bitpix=None, min_val=None, max_val=None, blank_value=None)[source]

mConvert changes the datatype of an image. When converting to floating point, no additional information is needed. However, when converting from higher precision (e.g. 64-bit floating point) to lower (e.g. 16-bit integer), scaling information is necessary. This can be given explicitly by the user or guessed by the program.

Parameters :

in_image : str

Input image filename

out_image : str

Output image filename.

debug_level : int, optional

Turns on debugging to the specified level (1-3).

status_file : str, optional

mBgModel output and errors are written to status_file instead of to stdout.

bitpix : int, optional

BITPIX value for the ouput FITS file (default is -64). Possible values are: 8 (character or unsigned binary integer), 16 (16-bit integer), 32 (32-bit integer), -32 (single precision floating point), -64 (double precision floating point).

min_val : int, optional

Pixel data value in the input image which should be treated as a minimum (value of 0) in the output image when converting from floating point to integer (default for BITPIX 8: 0; BITPIX 16: -32767; BITPIX 32: -2147483647

max_val : int, optional

Pixel data value in the input image which should be treated as a maximum (value of 255 or 32768) in the output image when converting from floating point to integer (Default for BITPIX 8: 255; BITPIX 16: 32768; BITPIX 32: 2147483648)

blank_value : int, optional

If converting down to an integer scale: value to be used in the output image to represent blank pixels (NaN) from the input image. Default value is min_val.

Page Contents