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-30284: Accommodations towards Gen2/Gen3 parity and determinism in coaddition #100

Merged
merged 2 commits into from Jan 11, 2022

Conversation

laurenam
Copy link
Contributor

@laurenam laurenam commented Nov 8, 2021

No description provided.

expId = getGen3CoaddExposureId(
patchRef, coaddName=self.detectCoaddSources.config.coaddName, log=self.log)
except Exception as e:
self.log.warn("Setting exposureId to match Gen3 failed with: %s. Falling back to "
Copy link
Contributor

Choose a reason for hiding this comment

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

This log message was really helpful, so please add it to the try: getGen3CoaddExposureId blocks you have in pipe_tasks and meas_base too. I wish I looked at this repo first.

Copy link
Member

Choose a reason for hiding this comment

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

log.warning

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry again...the try/except/log.warning are all now in the getGen3CoaddExposureId function itself, so removed it here.

This is temporary functionality to aid with the Gen2 to Gen3 middleware
migration.  In particular, the ID integer associated with a particular
coadd exposure was computed differently between the two middlewares.
This number is used in places a seed for random number generation used
in certain algorithms (e.g. dynamic detection).  This seed value must
match in both middlewares if parity is to be achieved, so here we update
the expId evaluation in Gen2 to match that of Gen3.
Order of inputs is not guaranteed, and the weighting per detector to the
full focal plane sky model can depend (very weakly) on the order of inputs,
so sort them by detector to guarantee reproducible results for the same set
of inputs.
@laurenam laurenam merged commit ef6abdc into main Jan 11, 2022
@laurenam laurenam deleted the tickets/DM-30284 branch January 11, 2022 21:21
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.

None yet

3 participants