-
Notifications
You must be signed in to change notification settings - Fork 28
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
ramp_fitting using stcal and roman_datamodels #276
Conversation
Codecov Report
@@ Coverage Diff @@
## main #276 +/- ##
===========================================
- Coverage 52.11% 35.53% -16.59%
===========================================
Files 24 24
Lines 662 667 +5
===========================================
- Hits 345 237 -108
- Misses 317 430 +113
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
with rdd.open(input, mode='rw') as input_model: | ||
input_model.data = input_model.data[np.newaxis, :] | ||
input_model.data.dtype=np.float32 | ||
input_model.groupdq = input_model.groupdq[np.newaxis, :] |
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.
Shouldn't the err array also be 'redimensionalized' here ? ( and refout, even though it is not currently used ?)
# load the gain ref file again in that step. | ||
if gain_model.meta.exposure.gain_factor is not None: | ||
input_model.meta.exposure.gain_factor = \ | ||
gain_model.meta.exposure.gain_factor |
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 assume this is no longer needed due to DataModel refactoring ?
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 was wondering - there is no gain_factor
in the gain schema. Did we miss it or is it somewhere else? @ddavis-stsci ?
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.
Adding our conversation from slack for reference:
dencheva:
gain models in jwst have meta.exposure.gain_factor attribute. This is missing from the roman one. Is this supposed to be in the data array for Roman? The documentation for gain reference file does not mention gain_factor.
phuwe 2:30 PM
gain_factor is in exposure in RAD
ddavis:house_with_garden: 2:35 PM
I don’t think we have gain_factors in Roman. If I recall correctly this is to account for non-standard gain factors when used in certain JWST modes. I suppose Roman can use them but so far we have no use case for a gain_factor
perry 2:36 PM
If it is needed by the existing JWST code, we can just generate a value of 1 in the converter.
ddavis:house_with_garden: 2:37 PM
The value of 1 should be fine if we need it. (edited)
dencheva:house_with_garden: 2:48 PM
There's no need for that, it's used within the pipeline code (i.e. it's mission specific) and in this case can be ignored. I just wanted to confirm we did not miss anything.
2:50
In jwst it's used in gain_scale. AFAIK we are not going to run gain_scale for roman but it's still listed in the docs as one of the steps
2:51
Or perhaps I misunderstand its use. @Grumm may not better
grumm:slightly_smiling_face: 3:29 PM
Back in February we thought this was needed (GH PR 120: Create gain factor keyword schema; Gain factor keyword needed. RCAL#91) . I am not aware of any more recent changes regarding whether it is needed.
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.
Looks Good.
Closes #279
Closes #277
Resolves RCAL-191
Resolves RCAL-189
Description
This PR implements ramp_fitting using
stcal
,roman_datamodels
andromancal.stpipe
.It needs spacetelescope/stcal#43, spacetelescope/rad#66 and spacetelescope/rad#86 .
Fixed the formatting of
CHANGES.rst
.Checklist
Tests
Documentation
[x ] Change log
[ x] Milestone
[x ] Label(s)