TicaCubeFactory

class astrocut.TicaCubeFactory(max_memory: int = 50)[source]

Bases: CubeFactory

Deprecated since version 1.1.0: The TicaCubeFactory class is deprecated and will be removed in a future version. Use the CubeFactory class for creating image cubes from SPOC product files.

Class for creating TICA image cubes.

The TESS Image CAlibrator (TICA) products are high level science products (HLSPs) developed by the MIT Quick Look Pipeline (https://github.com/mmfausnaugh/tica). These images are produced and delivered up to 4x sooner than their SPOC counterparts (as of TESS EM2), and can therefore be used to produce the most up-to-date cutouts of a target. More information on TICA can be found here: https://archive.stsci.edu/hlsp/tica

Parameters
max_memoryint

The maximum amount of memory to make available for building the data cube in GB. Note, this is the maximum amount of space to be used for the cube array only, so should not be set to the full amount of memory on the system.

Deprecated since version 1.1.0: The TicaCubeFactory class is deprecated and will be removed in a future version. Use the CubeFactory class for creating image cubes from SPOC product files.

Setting up the class members.

Attributes Summary

ERROR_MSG

Methods Summary

make_cube(file_list[, cube_file, sector, ...])

Turns a list of FITS image files into one large data cube.

update_cube(file_list, cube_file[, sector, ...])

Updates an existing cube file with new FITS images.

Attributes Documentation

ERROR_MSG = 'One or more incorrect file types were input. Please input only SPOC FFI files when using ``CubeFactory``.'

Methods Documentation

make_cube(file_list: List[str], cube_file: str = 'img-cube.fits', sector: Optional[int] = None, max_memory: int = 50, verbose: bool = True)

Turns a list of FITS image files into one large data cube. Input images must all have the same footprint and resolution. The resulting data cube is transposed for quicker cutouts. This function can take some time to run, exactly how much time will depend on the number of input files and the maximum allowed memory. The runtime will be fastest if the entire data cube can be held in memory, however that can be quite large (~40GB for a full TESS main mission sector, 3 times that for a TESS extended mission sector).

Parameters
file_listarray

The list of FITS image files to cube.

cube_filestr

Optional. The filename/path to save the output cube in.

sectorint

Optional. TESS sector to add as header keyword (not present in FFI files).

max_memoryfloat

Optional, default is 50. The maximum amount of memory to make available for building the data cube in GB. Note, this is the maximum amount of space to be used for the cube array only, so should not be set to the full amount of memory on the system.

verbosebool

Optional. If True, intermediate information is printed.

Returns
response: string or None

If successful, returns the path to the cube FITS file, if unsuccessful returns None.

update_cube(file_list: List[str], cube_file: str, sector: Optional[int] = None, max_memory: int = 50, verbose: bool = True)

Updates an existing cube file with new FITS images. Same functionality as CutoutFactory.make_cube, but working on an already existing file rather than building a new one. This function will:

  1. Create a new cube consisting of the new images that will be appended to the existing cube

  2. Update primary header keywords to reflect the update to the file

  3. Expand the file size of the FITS file containing the cube, to accomodate for the updated one

Parameters
file_listlist

The list of FITS image files to add to the cube.

cube_filestr

The filename/path to the existing cube FITS file.

sectorint

Optional. TESS sector to add as header keyword (not present in FFI files).

max_memoryfloat

Optional, default is 50. The maximum amount of memory to make available for building the data cube in GB. Note, this is the maximum amount of space to be used for the cube array only, so should not be set to the full amount of memory on the system.

verbosebool

Optional. If True, intermediate information is printed.

Returns
response: string or None

If successful, returns the path to the updated cube FITS file, if unsuccessful returns None.