Skip to content

DM-50420: Inject variable sources into the template and science images#72

Merged
BrunoSanchez merged 3 commits into
mainfrom
tickets/DM-50420
Jun 11, 2026
Merged

DM-50420: Inject variable sources into the template and science images#72
BrunoSanchez merged 3 commits into
mainfrom
tickets/DM-50420

Conversation

@BrunoSanchez

Copy link
Copy Markdown
Member

We added scaffolding and details useful for pipelines with two injection tasks and one of them specifically on DIA templates.

metadata = input_exposure.getMetadata()
input_dataset_type = self.config.connections.input_exposure.format(**self.config.connections.toDict())
metadata.set("INJECTED", input_dataset_type, "Initial source injection dataset type")
input_exposure.getInfo().setVisitInfo(input_exposure.visitInfo.copyWith(hasSimulatedContent=True))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not familiar with how this flag is used downstream. Is this something you rely on for downstream processing?

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.

I am relying on this downstream yes. I am basically tagging the visitInfo with the simulated content so we have clear distinction of dataset types. I think I added it thinking on template injection as well.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I haven't verified that these data persist in subsequent datasets, so that's something I'd be keen to learn more about. I imagine this information is almost certainly lost at the coadd phase, but I think that's less relevant for your use case.

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.

Yes, but for instance we are doing this to have visitId and detector attached to the injected template. This information is key for using selection of the fake catalog to inject to the templates as well.
I wasn't explicit, sorry.

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.

Now that I think about it, maybe it is not needed. Don't know? Do you suggest we remove this? Is this introducing significant overhead?

@leeskelvin leeskelvin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These LGTM, thanks for adding these small additions.

@BrunoSanchez BrunoSanchez merged commit db9040d into main Jun 11, 2026
11 checks passed
@BrunoSanchez BrunoSanchez deleted the tickets/DM-50420 branch June 11, 2026 22:51
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