DM-50420: Inject variable sources into the template and science images#72
Conversation
fd14da5 to
a62a635
Compare
| 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)) |
There was a problem hiding this comment.
I'm not familiar with how this flag is used downstream. Is this something you rely on for downstream processing?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
These LGTM, thanks for adding these small additions.
a62a635 to
345e1ec
Compare
We added scaffolding and details useful for pipelines with two injection tasks and one of them specifically on DIA templates.