Skip to content

DM-55220: add accessors for template provenance to CoaddPsf - #479

Merged
TallJimbo merged 2 commits into
mainfrom
tickets/DM-55220
Jun 30, 2026
Merged

DM-55220: add accessors for template provenance to CoaddPsf#479
TallJimbo merged 2 commits into
mainfrom
tickets/DM-55220

Conversation

@TallJimbo

Copy link
Copy Markdown
Member

No description provided.

Const accessors should be marked as such.

SkyWcs is immutable and should be passed by shared_ptr<SkyWcs> or
shared_ptr<SkyWcs const> (doesn't matter which) to avoid unnecessary
copies.
In the DIA template_detector, we already store the IDs of the tract and
patch of each template coadd in the CoaddPsf, but there is no way to
access these.
@TallJimbo
TallJimbo marked this pull request as draft June 17, 2026 18:44
@TallJimbo
TallJimbo marked this pull request as ready for review June 22, 2026 14:15

@isullivan isullivan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only one issue, which is that it looks like getTract and getPatch can't get their tract and patch values.

Comment on lines +183 to +190
int getTract(int index) const;

/**
* Get the patch ID of the component image at the given index.
*
* @throws lsst::pex::exceptions::NotFoundError There is no patch column.
*/
int getPatch(int index) const;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't see how getTract and getPatch actually get set. src/CoadPsf.cc initializes with a minimal schema, which does not include patch or tract columns, so it looks like the exposure catalog won't actually have tract or patch columns.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There are a few different constructors for CoaddPsf, and you're right about most of them. But there's one - the one we actually use in GetTemplateTask - that provides more control over the schema.

From the perspective of CoaddPsf, this usage was not expected or intentional. But it happens to be where we've stuffed a lot of useful information in all of the DP2 files. I am looking forward to being able to replace it with something more intentional in the future when we make GetTemplateTask write an lsst.images output directly.

@TallJimbo
TallJimbo merged commit c28450e into main Jun 30, 2026
3 checks passed
@TallJimbo
TallJimbo deleted the tickets/DM-55220 branch June 30, 2026 13:31
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