-
Notifications
You must be signed in to change notification settings - Fork 167
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-3588: Use Pastasoss datamodel for NIRISS SOSS transform solution #8763
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8763 +/- ##
==========================================
+ Coverage 61.76% 61.79% +0.02%
==========================================
Files 377 377
Lines 38743 38748 +5
==========================================
+ Hits 23929 23943 +14
+ Misses 14814 14805 -9 ☔ View full report in Codecov by Sentry. |
31f44bd
to
b26075c
Compare
Started a run against CRDS-TEST only for |
fc6378a
to
6ff7824
Compare
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.
Thanks for doing all this hard work Tyler! I know how challenging it is to spearhead merging someone else's code into our repo, and it looks excellent already!
Most of the comments are requests to remove unused things, plus a request to either fix the type hints to the satisfaction of mypy, or just remove them if that's easier. IMO it's better to have no type hints than ones that may not be correct.
Looking at the regression test failures, I am not surprised to see failures, but I was a bit surprised that there are 10 fewer HDUs in the output x1dints files than the truth files. Is that expected, and what is causing it? Is someone on the team tasked with ensuring that the output files look reasonable?
Because of the CRDS lookup errors with the pastasoss model, I couldn't check if the log messages look good/normal, but I didn't see anything that made me suspicious in the code itself, so that's probably fine.
This is beyond the scope of the PR, but it makes me vaguely uncomfortable that there are no unit tests for the entire suite. Do you think there are people we can push on in the SOSS team to make that happen in the future?
This is beyond the scope of the PR, but it makes me vaguely uncomfortable that there is no specific documentation page for the soss extraction, even though it's quite involved. Do you think there are people we can push on in the SOSS team to make that happen in the future?
if hasattr(pastasoss_ref.traces[0], "padding"): | ||
pad = pastasoss_ref.traces[0].padding |
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.
perhaps replace hasattr
with getattr
to condense these lines
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.
Nice!
6ff7824
to
f81c0f4
Compare
ca81324
to
b4b3d20
Compare
Requesting re-reviews after addressing comments! On the topic of unit tests and documentation: I requested these of the IDT members when they supplied the code, and it never came to fruition. I think it's reasonable to request a paragraph or two of documentation from the NIRISS team, with appropriate links to the pastasoss repo and to the ATOCA paper: https://iopscience.iop.org/article/10.1088/1538-3873/ac8a77. I can file a ticket requesting this. I have a feeling that NIRISS will not be interested in supplying unit tests, though we can ask. |
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.
Still two unresolved comments from my last review. Otherwise this looks good to me and I'll hit the approve button once those are commented on or otherwise resolved
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 looks like there's a failure in the unit tests - a doctest for jwst.extract_1d.soss_extract.pastasoss.get_soss_traces
.
I know the team is keen to get this change in this build, so I don't want to hold it up here, but I agree with Ned that this change could use some unit tests and documentation. I think some more code clean up will probably also be warranted, when the dust settles. Can we file a ticket for follow up in the next build?
Yes, this bit of code is chock full of technical debt. I can file the ticket. I had left some machinery 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.
Works for me, since the NIRISS SOSS team is happy with their testing.
Resolves JP-3588
Closes #8398
This PR modifies the algorithm for NIRISS SOSS data transforms, used to align the data with the expected spectral trace positions. Previously, the ATOCA algorithm derived a 3 parameter rotation/offset transform that struggled to deal with certain atypical scenarios; this has been removed, and the https://github.com/spacetelescope/pastasoss team has provided an adapted version of their algorithm for use in the pipeline.
The pastasoss algorithm has introduced a new reference file type, aptly named
pastasoss
holding aPastasossModel
. These files are not yet on the CRDS OPS server - regression testing to be done using CRDS TEST for now, with the expectation that any okify'ed results will need updating once OPS is mirrored to TEST and/or OPS' CRDS server code is updated to handle the new reftype.Checklist for PR authors (skip items if you don't have permissions or they are not applicable)
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR