-
Notifications
You must be signed in to change notification settings - Fork 174
extract_1d style; readability updates #5079
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
extract_1d style; readability updates #5079
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so after a while this all becomes incredibly mind numbing and my eyes just glaze over. I've managed to make a few comments, but overall I guess the style updates look fine to me.
(instrument == 'NIRSPEC' or | ||
exp_type == 'NIS_SOSS')) | ||
|
||
input_units_are_megajanskys = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic seems dangerous. If at some point it's decided to change the calibrated units for one of these modes, someone has to make sure to update this code. Wouldn't it be better to just rely on the BUNIT keyword value? Of course if we're only making style updates here, I guess that's not an appropriate change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to ot 8000 hers. Learn more.
I agree, there's quite a lot of refactoring that needs to be done, this included. But, yes, I think that that should go in a separate "refactor extract 1d" PR
@hbushouse I noticed that a few of your comments seemed to be in light of the impending APCORR implementation. I'll be sure to address those comment and log changes in that PR |
Codecov Report
@@ Coverage Diff @@
## master #5079 +/- ##
==========================================
+ Coverage 52.52% 52.59% +0.06%
==========================================
Files 403 403
Lines 36227 36188 -39
Branches 5616 5602 -14
==========================================
+ Hits 19030 19032 +2
+ Misses 16022 15974 -48
- Partials 1175 1182 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This PR provides style/readability updates to
extract.py
. Some minor refactoring was included.