cwi_crop

cwitools.scripts.crop.crop(clist, ctype=None, wcrop=None, xcrop=None, ycrop=None, plot=None, ext='.c.fits', outdir=None, log=None, silent=None)

Crops a data cube (FITS) along spatial of wavelength axes.

Parameters:
  • clist (str) – Input cubes specified in one of three ways: 1) As a CWITools .list file 2) As a file path to a single FITS file 3) As a list of file paths
  • ctype (str) – The type(s) of cube to crop, specified as a string or list of strings (e.g. ‘icubes.fits’ or [‘icubes.fits’, ‘vcubes.fits’]). Only used in combination with a CWITools .list file.
  • wcrop (int tuple) – Wavelength range (Angstrom) to crop z-axis (axis 0) to. Use (-1, -1) to automatically trim to “WAVGOOD” range.
  • ycrop (int tuple) – Range to crop y-axis (axis 1) to. Use (-1, -1) to trim empty rows. See get_crop_params for more complete method.
  • xcrop (int tuple) – Range to crop x-axis (axis 2) to. Use (-1, -1) to trim empty rows. See get_crop_params for more complete method.
  • plot (bool) – Set to True to show diagnostic plots.
  • ext (str) – File extension to use for masked FITS (“.M.fits”)
  • outdir (str) – Output directory for files. Default is the same directory as input.
  • log (str) – Path to log file to save output to.
  • silent (bool) – Set to TRUE to suppress standard output.
Returns:

None