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

DM-48826 : add SSO association to drpAssociationPipe #1040

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Gerenjie
Copy link
Contributor

No description provided.

@TallJimbo TallJimbo changed the title tickets/DM-48826 : add SSO association to drpAssociationPipe DM-48826 : add SSO association to drpAssociationPipe Feb 14, 2025
@@ -193,3 +193,71 @@ def query_disc(nside, ra, dec, max_rad, min_rad=0):
pixels = pixels[match]

return pixels


def objID_to_ssObjectID(objID, flags=0):
Copy link
Member

Choose a reason for hiding this comment

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

Our naming conventions would write this as

obj_id_to_ss_object_id

or

objIdToSsObjectId

(same for other symbols in this file)

dimensions=("instrument", "visit", "detector"),
deferLoad=True,
multiple=True
)
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer for these (visitInfo, bbox, wcs) to all be replaced by a single finalVisitSummary input, as I think that'll be a lot less I/O overall and pull in the best WCS instead of one we would not normally use at this stage (and in the future, might not want to keep on disk at this point in the processing).

Another possibility would be to use pvi.<component> instead of calexp.<component>, as pvi will be available and will have the final WCS, but I think using finalVisitSummary is still slightly better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's better. I hadn't realized finalVisitSummary contained all those.


if not config.doSolarSystemAssociation:
self.inputs.remove("solarSystemObjectTables")
self.outputs.remove("associatedSsSources")
Copy link
Member

Choose a reason for hiding this comment

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

Should unassociatedSsObjects be removed here, too?

I'd also recommend slightly different syntax for this, just because it's a bit easier to read (what you have is not incorrect):

Suggested change
self.outputs.remove("associatedSsSources")
del self.associatedSsSources

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had I used your syntax, I would have noticed that I renamed solarSystemObjectTables into ssObjectTableRefs. Changed!

name="preloaded_DRP_SsObjects",
storageClass="ArrowAstropy",
dimensions=("instrument", "visit", "detector"),
minimum=0,
Copy link
Member

Choose a reason for hiding this comment

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

I like this solution, if it means what I think it means; if you run this task, with doSolarSystemAssociation=True, but in a repo with no ephemerides for some or all of the visits, it just skips doing the solar system associations, and does regular DIAObject association only? Does it warn?

Copy link
Contributor

@ebellm ebellm left a comment

Choose a reason for hiding this comment

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

A couple of small things. I don't see any tests for SolarSystemAssociationTask--it would be valuable to have some, although I think it would be okay with me to implement them on another ticket.

objID : `str`
Minor Planet Center packed provisional designation for a small solar
system object. Must be fewer than eight characters.
flags : `int`, optional
Copy link
Contributor

@ebellm ebellm Feb 18, 2025

Choose a reason for hiding this comment

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

I think a name other than flags would be preferable here; elsewhere in pipelines flags correspond to errors, whereas this is more similar to a set of release or version bits.

@Gerenjie Gerenjie force-pushed the tickets/DM-48826 branch 3 times, most recently from 0506c10 to 58d2e36 Compare February 19, 2025 22:53
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.

3 participants