Skip to content

Conversation

@hbushouse
Copy link
Collaborator

Update all of the datamodels schemas that contain a "pathloss" array to now contain both a "pathloss_ps" and "pathloss_un" (point source and uniform, respectively). Update the pathloss step to always compute both 2D versions, apply the appropriate one, and store both versions in the output. For NIRISS SOSS, which only has one version of the pathloss correction, store as "pathloss_ps", because it's assumed that only point sources will be observed with that mode.

Fixes #5103 / JP-1556

pathloss_un : numpy float32 array
pathloss correction for uniform source
area : numpy float32 array
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note to reviewers: the area object just moved in the order, so that it shows up after all the other extensions in the actual FITS files (that's just my OCD kicking in).

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think names like pathloss_point and pathloss_uniform would be a bit more descriptive.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. I wanted to keep the EXTNAME values short, but the data array names could be spelled out more fully.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in latest commit.

if init.hasattr('var_rnoise'):
self.var_rnoise = init.var_rnoise
if init.hasattr('area'):
self.area = init.area
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same OCD mod here. Nothing substantive.



# There are 30 slices in the NIRSPEC IFU, numbered from 0 to 29
# There are 30 slices in the NIRSpec IFU, numbered from 0 to 29
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A LOT of mods in this module are purely cosmetic, just for readability, flake8, etc. Only substantive changes directly involve pathloss_ps and pathloss_un.

@codecov
Copy link

codecov bot commented Jun 30, 2020

Codecov Report

Merging #5112 into master will decrease coverage by 0.01%.
The diff coverage is 20.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5112      +/-   ##
==========================================
- Coverage   53.02%   53.01%   -0.02%     
==========================================
  Files         401      401              
  Lines       35608    35625      +17     
  Branches     5520     5521       +1     
==========================================
+ Hits        18882    18885       +3     
- Misses      15586    15600      +14     
  Partials     1140     1140              
Flag Coverage Δ
#unit 53.01% <20.89%> (-0.02%) ⬇️
Impacted Files Coverage Δ
jwst/assign_wcs/util.py 52.15% <0.00%> (-0.15%) ⬇️
jwst/datamodels/ifuimage.py 72.72% <0.00%> (ø)
jwst/datamodels/image.py 100.00% <ø> (ø)
jwst/datamodels/multiexposure.py 60.37% <0.00%> (-1.17%) ⬇️
jwst/datamodels/multislit.py 73.52% <ø> (ø)
jwst/datamodels/slit.py 65.38% <0.00%> (ø)
jwst/outlier_detection/outlier_detection.py 40.27% <0.00%> (-0.19%) ⬇️
jwst/pathloss/pathloss_step.py 38.09% <0.00%> (ø)
jwst/pipeline/calwebb_spec2.py 34.21% <0.00%> (-0.89%) ⬇️
jwst/source_catalog/source_catalog.py 27.22% <0.00%> (-0.05%) ⬇️
... and 2 more

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 8e5b573...ef1ec87. Read the comment docs.

Copy link
Collaborator

@jdavies-st jdavies-st left a comment

Choose a reason for hiding this comment

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

It would be nice to add a check to the unit tests that both vectors are included in all the modes that we currently unit test.

pathloss_un : numpy float32 array
pathloss correction for uniform source
area : numpy float32 array
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think names like pathloss_point and pathloss_uniform would be a bit more descriptive.

@hbushouse
Copy link
Collaborator Author

Also added some units tests in datamodels.

@hbushouse hbushouse requested a review from jdavies-st July 1, 2020 13:46
@hbushouse hbushouse merged commit 45aef30 into spacetelescope:master Jul 1, 2020
@hbushouse hbushouse deleted the jp1556 branch July 1, 2020 14:52
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.

Save both pathloss point source and uniform source correction arrays

2 participants