-
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
NRC_WFSS background subtraction error: index -1 is out of bounds for axis 0 with size 0 #8061
Comments
Comment by Howard Bushouse on JIRA: Tyler Pauly Do we know if this might've been fixed by any WFSS updates that were included in B10.0.x? |
Comment by Tyler Pauly on JIRA: It looks related to JP-3234 but that should be present for this run. I can take a look. |
Comment by Tyler Pauly on JIRA: Disregard previous comment, I can reproduce the error. |
Comment by Tyler Pauly on JIRA: Issue caused by complete coverage of frame with source bounding boxes, leaving no pixels from which to define a background region. This should be skipped, but the background subtraction code sees the reference pixel border as valid pixels, only causing an error once the mask is applied to the data array, where the reference pixels have NaN values. Will have a PR in with a fix shortly. |
Comment by Howard Bushouse on JIRA: Fixed by #8070 |
all l2b asns for 1187 have been dropped per DMSOPS-1045, so we can't test the fix for the datasets in this ticket, but repro of program 1076 with b11.0.2 showed this same error in ops, so it appears this may still be an issue? see jw01076-o124_20241013t063610_spec2_00001; Directory Path: /ifs/archive/ops/jwst/info/owl/logs/owlmgr_jw01076-o124_20241013t063610_spec2_00001_1728831053.822951. the alog.out is attached. |
Comment by Tyler Pauly on JIRA: Prior fix needs an edit - oops! |
Comment by Tyler Pauly on JIRA: Second fix implemented in #8916 |
also affected jw05398-c1048_20241211t150815_spec2_00008 |
Issue JP-3426 was created on JIRA by John Scott:
Using build 9.3.1, we saw some reprocessing level 2b errors for NRC_WFSS processing in the background subtraction step for
jw01187-o013_20230917t104234_spec2_00013
and
jw01187-o024_20230917t104234_spec2_00013
Traceback (most recent call last):
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/jwst/pipeline/calwebb_spec2.py", line 122, in process
result = self.process_exposure_product(
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/jwst/pipeline/calwebb_spec2.py", line 257, in process_exposure_product
calibrated = self.bkg_subtract(calibrated, members_by_type['background'])
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/stpipe/step.py", line 478, in run
step_result = self.process(*args)
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/jwst/background/background_step.py", line 63, in process
result = background_sub.subtract_wfss_bkg(
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/jwst/background/background_sub.py", line 192, in subtract_wfss_bkg
sci_mean = robust_mean(input_model.data[bkg_mask],
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/jwst/background/background_sub.py", line 312, in robust_mean
limits = np.percentile(cleaned_x, (lowlim, highlim))
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4283, in percentile
return _quantile_unchecked(
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4555, in _quantile_unchecked
return _ureduce(a,
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/numpy/lib/function_base.py", line 3823, in _ureduce
r = func(a, **kwargs)
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4721, in _quantile_ureduce_func
result = _quantile(arr,
File "/dms/local/jwst/pipeline/pkgs/miniconda3/envs/jwstdp-1.11.4.20230814-py3.9/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4830, in _quantile
slices_having_nans = np.isnan(arr[-1, ...])
IndexError: index -1 is out of bounds for axis 0 with size 0
reprocessing in the past has been successful.
The text was updated successfully, but these errors were encountered: