8000 extract_1d style; readability updates by jwhite3 · Pull Request #5079 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 10 commits into from
Jul 17, 2020
Merged

extract_1d style; readability updates #5079

merged 10 commits into from
Jul 17, 2020

Conversation

jwhite3
Copy link
@jwhite3 jwhite3 commented Jun 18, 2020

This PR provides style/readability updates to extract.py. Some minor refactoring was included.

@hbushouse hbushouse changed the title Style; readability updates extract_1d style; readability updates Jun 26, 2020
@hbushouse hbushouse added this to the Build 7.6 milestone Jun 26, 2020
Copy link
Collaborator
@hbushouse hbushouse left a 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 = (
Copy link
Collaborator

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.

Copy link
Author

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

@jwhite3
Copy link
Author
jwhite3 commented Jun 29, 2020

@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
Copy link
codecov bot commented Jul 16, 2020

Codecov Report

Merging #5079 into master will increase coverage by 0.06%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            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     
Flag Coverage Δ
#unit 52.59% <90.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jwst/extract_1d/extract.py 9.55% <ø> (+1.12%) ⬆️
jwst/extract_1d/extract_1d_step.py 9.09% <ø> (ø)
jwst/cube_build/ifu_cube.py 23.48% <90.00%> (+0.22%) ⬆️
jwst/datamodels/fits_support.py 80.21% <0.00%> (-3.21%) ⬇️
jwst/datamodels/properties.py 79.65% <0.00%> (-0.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46679a8...1008608. Read the comment docs.

@hbushouse hbushouse requested a review from jdavies-st July 16, 2020 19:42
@hbushouse hbushouse merged commit a790211 into spacetelescope:master Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0