Skip to content

Commit

Permalink
Add basic auto-flagging (#134)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Morcuende <[email protected]>
  • Loading branch information
juanep97 and morcuended authored Sep 18, 2024
1 parent 48a2669 commit c060037
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions iop4lib/iop4.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ def process_epochs(epochname_list: Iterable[str], args):
epoch.compute_relative_photometry()
epoch.compute_relative_polarimetry()

logger.info("Auto-flagging points.")

for result in PhotoPolResult.objects.filter(epoch__in=epoch_L).all():
if result.p is not None and not (0 <= result.p <= 1):
result.flags.add(PhotoPolResult.FLAGS.ERROR_POLARIMETRY)
result.save()

logger.info("Applying corrections.")

for epoch in epoch_L:
Expand Down

0 comments on commit c060037

Please sign in to comment.