CutoutFactory¶
- class astrocut.CutoutFactory[source]¶
Bases:
object
Class for creating image cutouts.
This class emcompasses all of the cutout functionality. In the current version this means creating cutout target pixel files from TESS full frame image cubes. Future versions will include more generalized cutout functionality.
Initiazation function.
Methods Summary
cube_cut
(cube_file, coordinates, cutout_size)Takes a cube file (as created by
CubeFactory
), and makes a cutout target pixel file of the given size around the given coordinates.Methods Documentation
- cube_cut(cube_file, coordinates, cutout_size, target_pixel_file=None, output_path='.', verbose=False)[source]¶
Takes a cube file (as created by
CubeFactory
), and makes a cutout target pixel file of the given size around the given coordinates. The target pixel file is formatted like a TESS pipeline target pixel file.- Parameters
- cube_filestr
The cube file containing all the images to be cutout. Must be in the format returned by ~astrocut.make_cube.
- coordinatesstr or
astropy.coordinates.SkyCoord
object The position around which to cutout. It may be specified as a string (“ra dec” in degrees) or as the appropriate
SkyCoord
object.- cutout_sizeint, array-like,
Quantity
The size of the cutout array. If
cutout_size
is a scalar number or a scalarQuantity
, then a square cutout ofcutout_size
will be created. Ifcutout_size
has two elements, they should be in(ny, nx)
order. Scalar numbers incutout_size
are assumed to be in units of pixels.Quantity
objects must be in pixel or angular units.- target_pixel_filestr
Optional. The name for the output target pixel file. If no name is supplied, the file will be named:
<cube_file_base>_<ra>_<dec>_<cutout_size>_astrocut.fits
- output_pathstr
Optional. The path where the output file is saved. The current directory is default.
- verbosebool
Optional. If true intermediate information is printed.
- Returns
- response: string or None
If successfull, returns the path to the target pixel file, if unsuccessful returns None.