ramjet.photometric_database.lightcurve_database¶
Code for a base generalized database for photometric data to be subclassed.
Module Contents¶
-
class
LightcurveDatabase(data_directory='data')[source]¶ Bases:
abc.ABCA base generalized database for photometric data to be subclassed.
-
log_dataset_file_names(self, dataset: tf.data.Dataset, dataset_name: str)[source]¶ Saves the names of the files used in a dataset to a CSV file in the trail directory.
-
static
normalize(lightcurve: np.ndarray)[source]¶ Normalizes from 0 to 1 on the logarithm of the lightcurve.
-
static
remove_random_values(lightcurve: np.ndarray)[source]¶ Removes random values from the lightcurve.
-
get_ratio_enforced_dataset(self, positive_training_dataset: tf.data.Dataset, negative_training_dataset: tf.data.Dataset, positive_to_negative_data_ratio: float)[source]¶ Generates a dataset with an enforced data ratio.
-
static
repeat_dataset_to_size(dataset: tf.data.Dataset, size: int)[source]¶ Repeats a dataset to make it a desired length.
-
is_positive(self, example_path)[source]¶ Checks if an example contains a microlensing event or not.
Parameters: example_path – The path to the example to check. Returns: Whether or not the example contains a microlensing event.
-