Skip to content

Commit

Permalink
Add more photometry logging (skyportal#171)
Browse files Browse the repository at this point in the history
This PR adds more logging for ZTF photometry posting.
  • Loading branch information
mcoughlin authored Aug 18, 2022
1 parent b27b72c commit a1d9c4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kowalski/alert_broker_ztf.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,18 @@ def alert_put_photometry(self, alert):
):
df_photometry = self.make_photometry(alert)

log(
f"Alert {alert['objectId']} contains program_ids={df_photometry['programid']}"
)

df_photometry["stream_id"] = df_photometry["programid"].apply(
lambda programid: self.ztf_program_id_to_stream_id[programid]
)

log(
f"Posting {alert['objectId']} photometry for stream_ids={set(df_photometry.stream_id.unique())} to SkyPortal"
)

# post photometry by stream_id
for stream_id in set(df_photometry.stream_id.unique()):
stream_id_mask = df_photometry.stream_id == int(stream_id)
Expand Down

0 comments on commit a1d9c4b

Please sign in to comment.