ramjet.data_interface.tess_ffi_lightcurve_metadata_manager

Code for managing the TESS FFI metadata SQL table.

Module Contents

Classes

TessFfiLightcurveMetadata(*args, **kwargs) A model for the TESS FFI lightcurve metadatabase table.
TessFfiLightcurveMetadataManager() A class for managing the TESS FFI metadata SQL table.
class TessFfiLightcurveMetadata(*args, **kwargs)[source]

Bases: ramjet.data_interface.metadatabase.MetadatabaseModel

A model for the TESS FFI lightcurve metadatabase table.

class Meta

Schema meta data for the model.

indexes = [[['tic_id', 'sector'], True], [['dataset_split', 'random_order_uuid'], False], [['magnitude', 'dataset_split', 'random_order_uuid'], False], [['dataset_split', 'tic_id', 'random_order_uuid'], False], [['magnitude', 'dataset_split', 'tic_id', 'random_order_uuid'], False]]
tic_id
sector
path
dataset_split
magnitude
random_order_uuid
class TessFfiLightcurveMetadataManager[source]

A class for managing the TESS FFI metadata SQL table.

tess_ffi_data_interface
__init__(self)[source]

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

insert_multiple_rows_from_paths_into_database(self, lightcurve_paths: List[Path], dataset_splits: List[int])[source]

Inserts sets of lightcurve paths into the table.

Parameters:
  • lightcurve_paths – The list of paths to insert.
  • dataset_splits – The dataset splits to assign to each path.
populate_sql_database(self)[source]

Populates the SQL database based on the lightcurve files.

build_table(self)[source]

Builds the SQL table.

create_paths_generator(self, magnitude_range: (Union[float, None], Union[float, None]) = (None, None), dataset_splits: Union[List[int], None] = None)[source]

Creates a generator for all the paths from the SQL table, with optional filters.

Parameters:
  • magnitude_range – The range of magnitudes to consider.
  • dataset_splits – The dataset splits to filter on. For splitting training, testing, etc.
  • repeat – Whether or not the generator should repeat indefinitely.
Returns:

The generator.

manager