-
Notifications
You must be signed in to change notification settings - Fork 168
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-3566 Move pixel replace before resample/cube build #8409
JP-3566 Move pixel replace before resample/cube build #8409
Conversation
@tapastro |
@jemorrison That looks about right to me. Presumably the standard save_results=True approach will make the pix replace step write output files for test/debugging purposes? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8409 +/- ##
==========================================
- Coverage 57.97% 57.91% -0.07%
==========================================
Files 387 387
Lines 38830 38882 +52
==========================================
+ Hits 22513 22518 +5
- Misses 16317 16364 +47 ☔ View full report in Codecov by Sentry. |
@tapastro The pixel replace step assumed the input data was a single input not a model container since it was written for calspec2. Now the pixel_replacement step needs to also work over ModelContainers. In calspec2 the code it works as expected. In the cal file, bad pixels have a science value of nan. If I save the pixel_replace output then the science frame has the nans replaced (so now these files look like the old ca files). The files names are expected. In calpsec3 the code works fine. The output filenames when pixel_replace.save_results=True are not what I was expecting. I need to make the name look more like the output from outlier detection, for example: Not sure what I am doing wrong. |
@emolter @hbushouse I looked at what outlier detection was doing for file names and I can get the correct looking file name and I print it in the step (I left the print statement in the code for now - to show you where it works). But the final resulting output names are the same. Hum ? What I am missing ? Snipet of code: |
It looks like the style checks are failing: The second one of these makes me worried that there is no test coverage for the renaming, because this seems like it should cause failures. Is there a way to write a unit test that ensures the output filenames are as expected given association and non-association inputs? |
200eb35
to
6caec07
Compare
04732a7
to
ea06d9e
Compare
@hbushouse For MIRI IFU , NIRSpec IFU and FS I added new test that ran pixel_replace, since at this time pixel_replace.skip=True in the pipeline for those modes. I think that might change in the future, so I just added another test rather than changing the main test. For these new tests I uploaded all the truth files. I do not have a test for NIRSpec MOS data. I hope having all the other tests is good enough. https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1417/ There are main failures - several of them are related to Extra keyword 'S_PXREPL' in b: 'SKIPPED'. This is when pixel_replace is not run on the data. If you want me to I can go through the results and okify them. I just need a refresher on how that is done. |
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.
Code changes look fine to me. There's probably some way to refactor pixel_replace_step to avoid the long if...else chain but I don't think that's very important.
Should I be worried about the bigdata error that the regtest run can't find certain files in Artifactory? e.g. this one?
c465c30
to
ff0d5fa
Compare
Started yet another regtest run at https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1483 |
Tally from latest regtest run (1483):
All of the above are as expected and I believe confirms that this is all now working as expected. |
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 declare success!
Resolves JP-3566
Closes #8340
This PR moves the pixel replace step to right before resample/cube build in both the Spec2 and Spec3 pipelines. The *cal.fits files now do not include the replace pixel values. These replacements are occurring right before resample/cubebuild.
Checklist for maintainers
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR
as of 5/22/3:30 the latest regression tests are at
https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1470/