-
Notifications
You must be signed in to change notification settings - Fork 181
JP-1556: Store both versions of pathloss correction #5112
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
Conversation
| pathloss_un : numpy float32 array | ||
| pathloss correction for uniform source | ||
| area : numpy float32 array |
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.
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).
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.
I think names like pathloss_point and pathloss_uniform would be a bit more descriptive.
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.
Agreed. I wanted to keep the EXTNAME values short, but the data array names could be spelled out more fully.
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.
Fixed in latest commit.
| if init.hasattr('var_rnoise'): | ||
| self.var_rnoise = init.var_rnoise | ||
| if init.hasattr('area'): | ||
| self.area = init.area |
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.
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 |
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.
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 Report
@@ 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
Continue to review full report at Codecov.
|
jdavies-st
left a comment
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.
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 |
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.
I think names like pathloss_point and pathloss_uniform would be a bit more descriptive.
|
Also added some units tests in |
Update all of the
datamodelsschemas that contain a "pathloss" array to now contain both a "pathloss_ps" and "pathloss_un" (point source and uniform, respectively). Update thepathlossstep 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