8000 JP-2969: Fix MOS handling of source IDs by hbushouse · Pull Request #7379 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-2969: Fix MOS handling of source IDs #7379

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

Merged
merged 2 commits into from
Dec 8, 2022

Conversation

hbushouse
Copy link
Collaborator
@hbushouse hbushouse commented Dec 6, 2022

Resolves JP-2969

Closes #7227

This PR makes a simple update to the function in the assign_wcs step that does all the parsing of info from the MSA metadata file for NIRSpec MOS exposures. There are now instances where the source_id in the meta data is only set to a non-zero value for the one shutter that contains the primary source, rather than having the same source_id entry for all shutters contained in the slitlet. So this changes the code that retrieves the source_id for a given slitlet to use the value from the primary shutter, rather than just taking it from the first shutter in the slitlet (which can now be zero).

Checklist for maintainers

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • Make sure the JIRA ticket is resolved properly

@hbushouse
Copy link
Collaborator Author
hbushouse commented Dec 6, 2022

Regression test run started: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/481/

Results are clean. Only failures are unrelated.

@codecov
Copy link
codecov bot commented Dec 6, 2022

Codecov Report

Base: 79.67% // Head: 79.67% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (3fd47a1) compared to base (69eb52a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7379   +/-   ##
=======================================
  Coverage   79.67%   79.67%           
=======================================
  Files         412      412           
  Lines       37585    37587    +2     
=======================================
+ Hits        29945    29947    +2     
  Misses       7640     7640           
8000
Flag Coverage Δ *Carryforward flag
nightly 79.65% <100.00%> (+<0.01%) ⬆️ Carriedforward from fbae32a
unit 52.22% <100.00%> (+<0.01%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
jwst/assign_wcs/nirspec.py 94.14% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hbushouse
Copy link
Collaborator Author

Testing on the original datasets listed in JP-2969, which errored during the outlier_detection step in calwebb_spec3, now complete all stages of processing successfully.

Copy link
Contributor
@tapastro tapastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though I'm curious if those shutters with source_id = 0 have repercussions on background subtraction methods. You tested that the data runs without error - curious if they run through master_background okay too?

@hbushouse
Copy link
Collaborator Author

Looks good, though I'm curious if those shutters with source_id = 0 have repercussions on background subtraction methods. You tested that the data runs without error - curious if they run through master_background okay too?

Yes, it still works OK relative to "real" bkg shutters/slitlets. The same function in assign_wcs identifies dedicated background slitlets as those that have all of their shutters set with source_id=0 and/or primary_source=N (No). So these instances of slitlets that only have 1 shutter with source_id>0 and/or primary_source=Y do not get labeled as background. Meanwhile the true background slitlets still get marked as such and used for master background subtraction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spec3 crashes with "operands could not be broadcast together with shapes "
3 participants
0