RAMjET

ramjet.photometric_database.tess_two_minute_cadence_light_curve

Code to for a class to represent a TESS two minute cadence light curve.

Module Contents

Classes

TessTwoMinuteCadenceColumnName An enum to represent the column names of the TESS two minute cadence data.
TessTwoMinuteCadenceMastFitsIndex An enum to represent the indexes of the TESS two minute cadence data in MAST FITS files.
TessTwoMinuteCadenceLightCurve A class to represent a TESS two minute cadence light curve.
class TessTwoMinuteCadenceColumnName[source]

Bases: enum.Enum

An enum to represent the column names of the TESS two minute cadence data.

TIME__BTJD = time__btjd
SAP_FLUX = sap_flux
PDCSAP_FLUX = pdcsap_flux
SAP_FLUX_ERROR = sap_flux_error
PDCSAP_FLUX_ERROR = pdcsap_flux_error
class TessTwoMinuteCadenceMastFitsIndex[source]

Bases: enum.Enum

An enum to represent the indexes of the TESS two minute cadence data in MAST FITS files.

TIME__BTJD = TIME
SAP_FLUX = SAP_FLUX
PDCSAP_FLUX = PDCSAP_FLUX
SAP_FLUX_ERROR = SAP_FLUX_ERR
PDCSAP_FLUX_ERROR = PDCSAP_FLUX_ERR
class TessTwoMinuteCadenceLightCurve[source]

Bases: ramjet.photometric_database.tess_light_curve.TessLightCurve

A class to represent a TESS two minute cadence light curve.

mast_tess_data_interface
__init__(self)[source]

Initialize self. See help(type(self)) for accurate signature.

classmethod from_path(cls, path: Path, fits_indexes_to_load: Union[List[TessTwoMinuteCadenceMastFitsIndex], None] = None)[source]

Creates a TESS two minute light curve from a path to the MAST FITS file.

Parameters:
  • path – The path to the FITS file to load.
  • fits_indexes_to_load – The indexes to load from the FITS file. By default, all will be loaded. Selecting specific ones may speed the process when loading many light curves.
Returns:

The light curve.

classmethod from_mast(cls, tic_id: int, sector: int, fits_indexes_to_load: Union[List[TessTwoMinuteCadenceMastFitsIndex], None] = None)[source]

Downloads a FITS file from MAST and creates a TESS two minute light curve from it.

Parameters:
  • tic_id – The TIC ID of the target.
  • sector – The sector of the observation.
  • fits_indexes_to_load – The indexes to load from the FITS file. By default, all will be loaded. Selecting specific ones may speed the process when loading many light curves.
Returns:

The light curve.

classmethod from_identifier(cls, identifier: Any)[source]

Loads the light curve in a generalized way, attempting to infer the light curve based on the passed identifier.

Parameters:identifier – The identifier of the light curve. Could come in various forms.
Returns:The light curve.
static get_tic_id_and_sector_from_file_path(file_path: Path)[source]

Gets the TIC ID and sector from commonly encountered file name patterns.

Parameters:file_path – The path of the file to extract the TIC ID and sector.
Returns:The TIC ID and sector. The sector might be omitted (as None).
static get_tic_id_and_sector_from_identifier_string(identifier_string: str)[source]

Gets the TIC ID and sector from commonly encountered identifier string patterns.

Parameters:identifier_string – The string to extract the TIC ID and sector.
Returns:The TIC ID and sector. The sector might be omitted (as None).