CubeFactory
- class astrocut.CubeFactory(max_memory=50)[source]
Bases:
object
Class for creating image cubes.
This class emcompasses all of the cube making functionality. In the current version this means creating image cubes fits files from TESS full frame image sets. Future versions will include more generalized cubing functionality.
Setting up the class members
Methods Summary
make_cube
(file_list[, cube_file, sector, ...])Turns a list of fits image files into one large data-cube.
Methods Documentation
- make_cube(file_list, cube_file='img-cube.fits', sector=None, max_memory=50, verbose=True)[source]
Turns a list of fits image files into one large data-cube. Input images must all have the same footprint and resolution. The resulting datacube 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. Assumed to have the format of a TESS FFI: - A primary HDU consisting only of a primary header - An image HDU containing the image - A second image HDU containing the uncertainty image
- cube_filestring
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.