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-21308: Replace doApplyUberCal with doApplyExternal configs #245

Merged
merged 1 commit into from Jan 25, 2020

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented Jan 17, 2020

Also update default configs.

@mrawls mrawls changed the title DM-21308: Replace doAppleUberCal with doApplyExternal configs DM-21308: Replace doApplyUberCal with doApplyExternal configs Jan 23, 2020
retrieved from the `calexp`. When `config.doApplyExternalSkyWcs` is `True`,
the astrometric calibration is taken from `config.externalSkyWcsName` with
the `name_wcs` dataset. Otherwise, the astrometric calibration is taken
from the `calexp`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please say "processed visit image" or "processed exposure" or something other than "calexp."

else:
photoCalib = exposure.getPhotoCalib()

if self.config.doApplyExternalSkyWcs:
skyWcs = dataRef.get(f"{self.config.externalSkyWcsName}_wcs")
exposure.setWcs(skyWcs)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great - the exposure already has a WCS from the calexp (heh) if this doesn't happen, so it makes sense to only setWcs if we are overriding it.
Similarly, isn't it true that the exposure already has a photoCalib from the calexp? If so, then this can be simplified even further by removing the the else above (which retrieves the photoCalib from the exposure if there's no external one) and only calls setPhotoCalib if there is a new one.

@jdswinbank
Copy link
Contributor

jdswinbank commented Jan 23, 2020

I haven't looked carefully at what's going on here, so apologies if I've missed the point, but...

While I'm seeing review comments on changes to SubaruMakeCoaddTempExpTask here, I'm seeing that whole task being removed on #224. At least at first glance, this seems ... unnecessary.

@mrawls
Copy link
Contributor

mrawls commented Jan 23, 2020

That's actually delightful! It turns out the comments here should apply instead to the parallel PR for pipe_tasks for DM-21308, so I will leave them for easy reference. (I looked at this PR before that one and got very confused about code duplication, so I'm thrilled it is going away)

@erykoff
Copy link
Contributor Author

erykoff commented Jan 24, 2020

@jdswinbank It is going away, yes. And originally that other ticket (DM-20074) was a blocker for this one, but that has proved challenging so we decided to just get this one done in spite of the slight overhead of updating a mostly redundant function that is going to be removed soon.

@erykoff erykoff merged commit f055baa into master Jan 25, 2020
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