Skip to content

Commit

Permalink
Skip more bad light curves
Browse files Browse the repository at this point in the history
  • Loading branch information
golmschenk committed Jul 26, 2024
1 parent 7bb66ea commit e97dd94
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/qusi/internal/light_curve_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,15 @@ def __iter__(self):
# TODO: Preprocessing step should be here. Or maybe that should all be on the light curve collection
# as well? Or passed in somewhere else?
standard_light_curve = next(base_collection_iter)
transformed_standard_light_curve = self.post_injection_transform(
standard_light_curve
)
try:
transformed_standard_light_curve = self.post_injection_transform(
standard_light_curve
)
except ValueError as error:
with Path('problem_light_curves.txt').open('a') as problem_files_list_file:
print(f'#############################', flush=True)
print(f'{standard_light_curve.path}', file=problem_files_list_file, flush=True)
continue
yield transformed_standard_light_curve
if collection_type in [
LightCurveCollectionType.INJECTEE,
Expand Down

0 comments on commit e97dd94

Please sign in to comment.