Skip to content

Commit 88b42ba

Browse files
committed
Add filter to only collect flags that are questionable or junk.
1 parent 4c541af commit 88b42ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/lsst/ts/logging_and_reporting/web_app/services/exposurelog_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ def get_exposure_flags(
5050
verbose and logger.debug("No messages for this instrument.")
5151
return []
5252

53-
# Can we avoid looping through all records?
53+
flags = {"questionable", "junk"}
5454
flagged = [
5555
{"obs_id": rec["obs_id"], "exposure_flag": rec["exposure_flag"]}
5656
for rec in records
57-
if rec.get("exposure_flag")
57+
if rec.get("exposure_flag") and rec["exposure_flag"] in flags
5858
]
5959

6060
if verbose:

0 commit comments

Comments
 (0)