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

New ZTF alert schema - Forced photometry #258

Merged
merged 5 commits into from
Oct 17, 2023
Merged

Conversation

Theodlz
Copy link
Collaborator

@Theodlz Theodlz commented Oct 16, 2023

THe latest ZTF alert schema will now include forced photometry, not included in the prv_candidates array, but in it's own fp_hists array field.

This PR adds the necessary support to ingest that data, and a unit test to verify it.

TODO:

  • Compared to prv_candidates, the content of fp_hists changes with time, so it's unclear to me how to best deduplicate that data. For the prv_candidates, we can just use MongoDB's $set operator as the data points are identical (except new ones of course). Here, past data points might not be identical, so that might not work perfectly. Unfortunately, IPAC provides tarballed alert packets for only a night, so hard to test that behavior with little data.

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

kowalski/alert_brokers/alert_broker.py Outdated Show resolved Hide resolved
@Theodlz
Copy link
Collaborator Author

Theodlz commented Oct 16, 2023

@mcoughlin for this first PR I settled for the simpler logic:

  • update datapoints to use the newer ones when there's any overlap with existing points (as suggested by Russ).

I think this is fine, and easy to implement until we know what most users agree with. Will discuss it this week during multiple meetings with different working groups.

@Theodlz
Copy link
Collaborator Author

Theodlz commented Oct 16, 2023

Don't mind the +4k lines, it's just the avro files

@Theodlz
Copy link
Collaborator Author

Theodlz commented Oct 16, 2023

@mcoughlin sorry to bug you again. Got Mansi's input.

She thinks that for now, what is really valuable is mostly forced photometry that comes with the first ever alert for a given object, as it gives us potential detections that pre-date the alert pipeline's discovery of the object. And therefore, updating it is not as important as the prv_candidates, and we can just ingest it for the very first alert and stop there (ignore new forced photometry).

At least until everyone agrees on what is best.

@mcoughlin
Copy link
Collaborator

Ok @Theodlz !

@Theodlz Theodlz merged commit c672826 into skyportal:main Oct 17, 2023
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