Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FP hists in broker mode: don't send unsaved #287

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

Theodlz
Copy link
Collaborator

@Theodlz Theodlz commented Apr 5, 2024

We have logic here in Kowalski to only save the fp_hists of new objects. This is to deal with the fact that forced photometry in the alerts is a somewhat recent addition, and we don't want to start accumulating it for older objects, but only new objects where the forced photometry 30-day window might give us detections that pre-date the first alert (and that the prv_candidates would not have).

However, with the current logic we do not flush/empty the fp_hists variable when it's not saved to the DB, so we end up sending to SkyPortal alert-based FP that we don't save in Kowalski. Though it doesn't make the photometry we send less correct, it's confusing more than anything else.

Here, we make sure to drop the fp_hists before sending it to SkyPortal unless it is saved in Kowalski beforehand.

@Theodlz Theodlz requested a review from mcoughlin April 5, 2024 14:56
Copy link
Collaborator

@mcoughlin mcoughlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Theodlz Theodlz merged commit 74ef7fb into skyportal:main Apr 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants