-
Notifications
You must be signed in to change notification settings - Fork 174
JP-1729: Assign int_num to extensions in extract_1d #6369
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-1729: Assign int_num to extensions in extract_1d #6369
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6369 +/- ##
==========================================
- Coverage 77.60% 77.32% -0.28%
==========================================
Files 408 408
Lines 34881 35076 +195
==========================================
+ Hits 27068 27124 +56
- Misses 7813 7952 +139
*This pull request uses carry forward flags. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Wow, now that was straight-forward.
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.
This obviously fixes the problem, but would it be more appropriate to just call populate_time_keywords
for this instrument mode? Of course you'd have to make sure there are hooks in that function to handle the case where INT_TIMES doesn't exist (e.g. still go ahead and populate INT_NUM without the times).
Yes, the issue posed by this ticket at its core is the lack of INT_NUM assignment for a dataset with an empty INT_TIMES table. The pipeline does run populate_time_keywords, but it doesn't populate without a complete INT_TIMES table present in the input. An argument could be made that INT_NUM isn't really a "time keyword", and any extraction input with multiple integrations will get covered by the new code. However the old code will work for any code with a proper INT_TIMES table. I could see many avenues here, including a (likely over-engineered for the result) change to populate_time_keywords that would fill INT_NUM even with an empty INT_TIMES table. I'm not sure what the best course of action is. |
It may also end up being confusing for future maintenance to have the INT_NUM keyword populated in two different places in the code, depending on whether the INT_TIMES table has data. So even though it may be more work right now, I think that it'd be better in the long run if the |
The forced assignment of INT_NUM even with an empty INT_TIMES table is now in populate_time_keywords - requesting another pass over the code before I merge. |
Closes #5360
Resolves JP-1729
Description
This PR utilizes the dormant 'INT_NUM' extension keyword in the MultiSpecModel datamodel to track the integration number of each extraction.
Note (to self?) : One regtest will need okify-ing, test_nirspec_brightobj_spec2 -> x1dints.
Checklist