ramjet.photometric_database.tess_synthetic_injected_with_negative_injection_database¶
Module Contents¶
-
class
TessSyntheticInjectedWithNegativeInjectionDatabase(data_directory='data/self_lensing_binaries')[source]¶ Bases:
ramjet.photometric_database.tess_synthetic_injected_database.TessSyntheticInjectedDatabaseA database where both negative and positive signals are injected. Specifically designed for cases where the positive injection uses a real lightcurve converted to a synthetic signal. As this can results in other statistics suggesting a positive signal (such as extra noise from the real signal being used as an injection signal), injecting a negative signal in a similar fashion can reduce the likelihood the network will train on the wrong features.
-
generate_datasets(self)[source]¶ Generates the training and validation datasets for the database.
Returns: The training and validation dataset.
-
positive_and_negative_injection_preprocessing(self, lightcurve_path_tensor: tf.Tensor, positive_synthetic_signal_path_tensor: tf.Tensor, negative_synthetic_signal_path_tensor: tf.Tensor)[source]¶ The preprocesses examples where a lightcurve is injected with a positive signal and a negative signal to produce a positive and negative pair.
Parameters: - lightcurve_path_tensor – The lightcurve’s path to be preprocessed.
- positive_synthetic_signal_path_tensor – The path of the positive synthetic signal to be injected.
- negative_synthetic_signal_path_tensor – The path of the negative synthetic signal to be injected.
Returns: Two examples, one negative, injected with the negative signal and one positive, injected with the positive signal (paired as a tuple); and the corresponding labels (paired as a tuple). Expected to have a post flat mapping to make each element of the data be an individual example and label pair.
-
load_magnifications_and_times_from_negative_synthetic_signal_path(self, negative_synthetic_signal_path: str)[source]¶ Loads the negative synthetic signals.
Parameters: negative_synthetic_signal_path – The path of the negative synthetic signal. Returns: The magnifications and the times of the negative signal.
-