Ingest ssSource designation data from the LSST alert stream#497
Open
thomasculino wants to merge 1 commit into
Open
Ingest ssSource designation data from the LSST alert stream#497thomasculino wants to merge 1 commit into
thomasculino wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds end-to-end support for Rubin/LSST Solar System Object (SSO) per-detection metadata by introducing an SsSource record, propagating it through alert ingestion/enrichment/filtering, and persisting SSO designations for queryability.
Changes:
- Introduces
SsSourceand wires it intoLsstRawAvroAlert,LsstAlert, and the enrichment/filter pipelines. - Persists MPC designation to the LSST aux collection and adds an index to support designation lookups.
- Updates tests/fixtures to account for new LSST fields (
ss_source,designation).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_babamul.rs | Updates test alert/object construction for new LSST fields. |
| tests/api/test_babamul.rs | Updates API test expectations for the new designation field. |
| src/utils/db.rs | Adds LSST-specific indexes, including new designation index. |
| src/filter/lsst.rs | Projects ss_source in the LSST filter pipeline output. |
| src/enrichment/lsst.rs | Projects/deserializes ss_source for enrichment worker processing. |
| src/alert/mod.rs | Re-exports SsSource from the alert module. |
| src/alert/lsst.rs | Defines SsSource, parses ssSource, persists designation, and adds tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+106
to
113
| // if survey is LSST, create an index on the ss_object_id field of the alerts collection, | ||
| // and on the designation field of the aux collection (used to look up a moving object by | ||
| // its MPC designation, independent of any cross-survey position match) | ||
| if survey == &Survey::Lsst { | ||
| let index = doc! { | ||
| "ss_object_id": 1, | ||
| }; | ||
| create_index(&alerts_collection, index, false).await?; |
Comment on lines
+1409
to
+1420
| // The designation is only known once a diaSource is linked to an ssObject; keep it | ||
| // current on the aux doc independent of whichever branch above ran, and regardless of | ||
| // any ZTF cross-match (an LSST-only or ZTF-only ssObject is a normal outcome). | ||
| if let Some(designation) = &designation { | ||
| self.alert_aux_collection | ||
| .update_one( | ||
| doc! { "_id": &object_id }, | ||
| doc! { "$set": { "designation": designation } }, | ||
| ) | ||
| .await | ||
| .inspect_err(as_error!())?; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for Rubin/LSST Solar System object (SSO) metadata in alert handling, specifically by introducing the
SsSourcestruct to represent per-detection SSO ephemeris and designation information. The changes ensure that SSO data is parsed, stored, indexed, and exposed throughout the alert ingestion, enrichment, and filtering pipelines, and are accompanied by new tests for correct deserialization and handling of SSO fields.Support for Solar System Object metadata:
SsSourcestruct to represent Solar System object ephemeris and designation data, with full parsing and (de)serialization support insrc/alert/lsst.rs. This struct is now included in theLsstRawAvroAlert,LsstAlert, andLsstObjecttypes, and is handled during alert ingestion and enrichment.Pipeline and API changes:
ss_sourcefield, making SSO metadata available for downstream consumers and APIs.Testing and validation:
SsSourcestruct, including edge cases where the field is absent. Existing tests and fixtures were updated to include or expect the new fields where appropriate.These changes collectively enable robust handling and querying of Solar System object information in LSST alert data, paving the way for more advanced moving object science use cases.
The idea behind this PR is to query by
ssObjectIdin the future