make_casa_mask

spectral_cube.io.casa_masks.make_casa_mask(SpecCube, outname, append_to_image=True, img=None, add_stokes=True, stokes_posn=None, overwrite=False)[source]

Outputs the mask attached to the SpectralCube object as a CASA image, or optionally appends the mask to a preexisting CASA image.

Parameters:
SpecCubeSpectralCube

SpectralCube object containing mask.

outnamestr

Name of the outputted mask file.

append_to_imagebool, optional

Appends the mask to a given image.

imgstr, optional

Image to be appended to. Must be specified if append_to_image is enabled.

add_stokes: bool, optional

Adds a Stokes axis onto the wcs from SpecCube.

stokes_posnint, optional

Sets the position of the new Stokes axis. Defaults to the last axis.

overwritebool, optional

Overwrite the image and mask files if they exist?