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

jp-1690 calspec3 cube_build clean up #5347

Merged
merged 5 commits into from Sep 21, 2020

Conversation

jemorrison
Copy link
Contributor

@jemorrison jemorrison commented Sep 17, 2020

Clean up of making single cubes and blotted cubes.

  1. If making SINGLE type check the input file sent to cube_build and only use those of the correct channel/grating.
  2. When blotting a median IFUcube back to the detector look at the channel or grating and only blot those files that cover the same channel/grating.
  3. If all the data on the input file has been flagged as DO_NOT_USE (a by product of outlier rejection) skip the file in creating the ifucube.

@codecov
Copy link

codecov bot commented Sep 17, 2020

Codecov Report

Merging #5347 into master will increase coverage by 0.10%.
The diff coverage is 1.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5347      +/-   ##
==========================================
+ Coverage   52.67%   52.78%   +0.10%     
==========================================
  Files         407      409       +2     
  Lines       36907    37027     +120     
  Branches     5725     5745      +20     
==========================================
+ Hits        19442    19545     +103     
- Misses      16227    16239      +12     
- Partials     1238     1243       +5     
Flag Coverage Δ
#unit 52.78% <1.61%> (+0.10%) ⬆️

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

Impacted Files Coverage Δ
jwst/cube_build/blot_cube_build.py 7.96% <0.00%> (-0.38%) ⬇️
jwst/cube_build/cube_build_step.py 25.59% <ø> (+0.24%) ⬆️
jwst/outlier_detection/outlier_detection_ifu.py 21.90% <0.00%> (ø)
jwst/cube_build/ifu_cube.py 22.57% <2.08%> (-0.20%) ⬇️
jwst/datamodels/util.py 81.55% <0.00%> (-0.08%) ⬇️
jwst/lib/pointing_summary.py 94.87% <0.00%> (ø)
jwst/lib/v1_calculate.py 100.00% <0.00%> (ø)
jwst/lib/set_telescope_pointing.py 83.33% <0.00%> (+0.08%) ⬆️
jwst/datamodels/model_base.py 85.17% <0.00%> (+0.09%) ⬆️
jwst/regtest/conftest.py 64.28% <0.00%> (+2.70%) ⬆️

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 e9c472e...dce22b9. Read the comment docs.

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.

Looks OK overall, just a couple minor comments. Oh, and of course it needs a change log entry eventually.

# **********************************************************************

def blot_info(self):
""" Prints the basic paramters of the blot image and median sky cube
"""
log.info('Information on Blotting')
log.info('Working with instrument %s %s', self.instrument,
self.detector)
log.info('Working with instrument %s ', self.instrument)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor nit, but could remove unused white space after %s

# If all the data is flagged as DO_NOT_USE - not common then log warning and skip data
nn = wave.size
no_data = False
if nn == 0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is nn used anywhere else? If not, why not just consolidate these lines into:

if wave.size == 0:
    no_data = True
else:
    no_data = False

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.

Looks OK to me. Still needs a change log entry before merging.

@jemorrison jemorrison merged commit 0d85e66 into spacetelescope:master Sep 21, 2020
@jemorrison jemorrison deleted the JP-1690_calspec3 branch October 16, 2020 16:25
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.

None yet

2 participants