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-15862: Reduce ISR code duplication between ip_isr, obs_subaru, and obs_decam #167

Merged
merged 1 commit into from Jan 4, 2019

Conversation

czwa
Copy link
Contributor

@czwa czwa commented Nov 29, 2018

The Subaru specific ISR task classes have been removed in favor of the
one in ip_isr. The majority of the methods have been migrated to
ip_isr, reducing the impact of the change on Subaru processing.

The ISR metadata is now included in the HscMapper to allow this to be
persisted.

Copy link
Contributor

@SimonKrughoff SimonKrughoff left a comment

Choose a reason for hiding this comment

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

OK I got tired of doing it everywhere, but commented out code should really not make it to master. If it's commented, it's not needed. A plain english comment could be left if something really needs to be explained, but leaving commented code in is more confusing than anything else. Just take a pass through this diff and remove commented code where ever it exists.

Other than that, things look pretty good.

bin.src/genDefectRegistry.py Outdated Show resolved Hide resolved
config/hsc/isr.py Outdated Show resolved Hide resolved
config/hsc/isr.py Outdated Show resolved Hide resolved
config/hsc/processCcd.py Outdated Show resolved Hide resolved
config/hsc/processCcd.py Outdated Show resolved Hide resolved
python/lsst/obs/subaru/isr.py Outdated Show resolved Hide resolved
python/lsst/obs/subaru/masking.py Outdated Show resolved Hide resolved
# Nothing to mask!
return

if False:
Copy link
Contributor

Choose a reason for hiding this comment

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

if False statements are generally frowned upon in code on master as it's essentially a block of commented out code. I suppose this could be ok if it is associated with ticketed work that will remove the if False, but if not, it really should be removed. You can leave a comment with a SHA1 for where the code was removed so someone could look it up, if you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added ticket DM-16806 to address this issue as well. I'm hesitant to change inherited code that I don't have readily available test data for.

python/lsst/obs/subaru/strayLight/rotatorAngle.py Outdated Show resolved Hide resolved
@@ -120,6 +115,7 @@ def run(self, sensorRef, exposure):

model *= exposure.getInfo().getVisitInfo().getExposureTime()
exposure.image.array -= model
# CZW: Should these methods be moved into the class? They're not useful outside it, right?
Copy link
Contributor

Choose a reason for hiding this comment

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

Did this get resolved? If so, what's the answer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed the comment and left the methods independent of the class. This is probably overly conservative, but working through the straylight correction is a bit out of the scope of the ticket. I've added a new ticket DM-16805 to handle a future examination and rewrite of the subaru straylight code.

@czwa czwa force-pushed the tickets/DM-15862 branch 4 times, most recently from 59945dd to 30ddabf Compare December 14, 2018 21:40
The ISR code was split between ip_isr and the obs_ packages, with the
ip_isr and obs_subaru containing parallel ISR reduction pathways.
This ticket merges those pathways into a single set of ISR functions
in the ip_isr package, removing the duplication of code.  The merged
codebase also makes additional useful functions from the obs_subaru
ISR available to other cameras, and the new ISR code now profiles
debug points, thumbnail images, and post-correction statistics to
check processing quality.

The Subaru specific ISR task classes have been removed in favor of the
one in ip_isr.  The majority of the methods have been migrated to
ip_isr, reducing the impact of the change on Subaru processing.
Ticket pointers for still unresolved issues/code style issues are
included in comments.

The ISR metadata is now included in the HscMapper to allow this to be
persisted.
@czwa czwa merged commit a9ca040 into master Jan 4, 2019
@timj timj deleted the tickets/DM-15862 branch February 25, 2021 17:44
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

2 participants