-
Notifications
You must be signed in to change notification settings - Fork 171
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-3848 MIRI LRS s_region and resample WCS #9193
JP-3848 MIRI LRS s_region and resample WCS #9193
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9193 +/- ##
==========================================
+ Coverage 72.51% 72.56% +0.05%
==========================================
Files 371 371
Lines 37092 37165 +73
==========================================
+ Hits 26896 26970 +74
+ Misses 10196 10195 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@jemorrison This is looking much better, but a few thoughts:
|
@drlaw1558 are you supplying the new reference file when you run assign_wcs (spec2) in the override method ? |
@jemorrison Hm, I thought I had been but it looks like the new ref file wasn't getting picked up properly. With that fixed the assign_wcs indeed runs and results look good. |
1eae471
to
1743b60
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.
Looks good from the science side.
@jemorrison - there are some unit test failures that need attention when the code structure has settled. In particular, it looks like some of the tests I wrote to make sure flux is conserved are failing with the updates to the MIRI WCS. |
3280f74
to
7c4c40f
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.
This looks much cleaner now from an overall code design standpoint - this is exactly the flow I had in mind. I made a few additional small comments, but overall this looks great and I'm happy for it to be merged
120fc50
to
d6ff2d5
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.
Almost there!
Regression test changes look as expected, but this regression test needs a code change for the S_REGION comparison: test_miri_lrs_slit_wcs, in test_miri_lrs_slit_spec2.py.
I spotted a couple typos on reading through, noted below.
@melanieclarke I noticed the regression test failure in the test_miri_lrs_slit_wcs, in test_miri_lrs_slit_spec2.py. |
Oh, I think I read it wrong - it looked like it was doing a direct assertion test that would not be okify-able from the failed run. If you were able to get it to pass with an updated truth file, then that should be fine. |
3e1c9be
to
8a43968
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.
All good, thanks for the hard work on this one!
This PR replaces: #9104
MIRI LRS specwcs reference file PR has been merged:spacetelescope/stdatamodels#393
Resolves JP-3848
Closes #9072
This PR corrects the s_region for MIRI LRS output from assign_wcs and resample. In addition an error was found in the WCS of resampled MIRI LRS data.
In assign_wcs the s_region is determined using the V2,V3 corners of the slit. These values are provided by a new
reference file.
I added https://jira.stsci.edu/browse/JP-3910 to add a unit test for resample_spec to test the new function find_miri_lrs_sregion. I need some time to get this correct set the wcs in the unit test. My first attempts failed so I put it off into another JP ticket to get this PR in for the next delivery
Tasks
Build 11.3
(use the latest build if not sure)no-changelog-entry-needed
)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types)docs/
pagehttps://github.com/spacetelescope/RegressionTests/actions/runs/13705291758
(https://github.com/spacetelescope/RegressionTests/blob/main/docs/running_regression_tests.md))
okify_regtests
to update the truth filesnews fragment change types...
changes/<PR#>.general.rst
: infrastructure or miscellaneous changechanges/<PR#>.docs.rst
changes/<PR#>.stpipe.rst
changes/<PR#>.datamodels.rst
changes/<PR#>.scripts.rst
changes/<PR#>.set_telescope_pointing.rst
changes/<PR#>.pipeline.rst
stage 1
changes/<PR#>.group_scale.rst
changes/<PR#>.dq_init.rst
changes/<PR#>.emicorr.rst
changes/<PR#>.saturation.rst
changes/<PR#>.ipc.rst
changes/<PR#>.firstframe.rst
changes/<PR#>.lastframe.rst
changes/<PR#>.reset.rst
changes/<PR#>.superbias.rst
changes/<PR#>.refpix.rst
changes/<PR#>.linearity.rst
changes/<PR#>.rscd.rst
changes/<PR#>.persistence.rst
changes/<PR#>.dark_current.rst
changes/<PR#>.charge_migration.rst
changes/<PR#>.jump.rst
changes/<PR#>.clean_flicker_noise.rst
changes/<PR#>.ramp_fitting.rst
changes/<PR#>.gain_scale.rst
stage 2
changes/<PR#>.assign_wcs.rst
changes/<PR#>.badpix_selfcal.rst
changes/<PR#>.msaflagopen.rst
changes/<PR#>.nsclean.rst
changes/<PR#>.imprint.rst
changes/<PR#>.background.rst
changes/<PR#>.extract_2d.rst
changes/<PR#>.master_background.rst
changes/<PR#>.wavecorr.rst
changes/<PR#>.srctype.rst
changes/<PR#>.straylight.rst
changes/<PR#>.wfss_contam.rst
changes/<PR#>.flatfield.rst
changes/<PR#>.fringe.rst
changes/<PR#>.pathloss.rst
changes/<PR#>.barshadow.rst
changes/<PR#>.photom.rst
changes/<PR#>.pixel_replace.rst
changes/<PR#>.resample_spec.rst
changes/<PR#>.residual_fringe.rst
changes/<PR#>.cube_build.rst
changes/<PR#>.extract_1d.rst
changes/<PR#>.resample.rst
stage 3
changes/<PR#>.assign_mtwcs.rst
changes/<PR#>.mrs_imatch.rst
changes/<PR#>.tweakreg.rst
changes/<PR#>.skymatch.rst
changes/<PR#>.exp_to_source.rst
changes/<PR#>.outlier_detection.rst
changes/<PR#>.tso_photometry.rst
changes/<PR#>.stack_refs.rst
changes/<PR#>.align_refs.rst
changes/<PR#>.klip.rst
changes/<PR#>.spectral_leak.rst
changes/<PR#>.source_catalog.rst
changes/<PR#>.combine_1d.rst
changes/<PR#>.ami.rst
other
changes/<PR#>.wfs_combine.rst
changes/<PR#>.white_light.rst
changes/<PR#>.cube_skymatch.rst
changes/<PR#>.engdb_tools.rst
changes/<PR#>.guider_cds.rst