You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When extracting spectra to perform background subtraction at the slit level NirspecPipeline.extract_spectrum for some sources the dimensions between slits seems to be off by 1 which causes extractions to fail.
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Input In [17], in <cell line: 5>()
1 ### check in nrs2
3 key_nrs2 = '2565_32130'
----> 5 _data = gratings['clear-prism'][1].extract_spectrum(key_nrs2, skip=[], yoffset=0, prof_sigma=0.6, trace_sign=-1,
6 fit_profile_params=None)
File ~/opt/anaconda3/envs/grizli39/lib/python3.9/site-packages/msaexp/pipeline.py:1356, in NirspecPipeline.extract_spectrum(self, key, slit_key, prof_sigma, fit_profile_params, pstep, show_sn, flux_unit, vmax, yoffset, skip, bad_dq_bits, clip_sigma, ntrim, get_slit_data, verbose, center2d, trace_sign, min_dyoffset, **kwargs)
1354 _dq = (_sbg.dq & bad_dq_bits) == 0
1355 try:
-> 1356 _bkg[_dq] += _sbg.data[_dq]
1357 _bkgn[_dq] += 1
1359 except ValueError:
1360 #print('background failed', j)
IndexError: boolean index did not match indexed array along dimension 1; dimension is 142 but corresponding boolean dimension is 143
ipdb> np.shape(_dq)
(30, 143)
ipdb> np.shape(_sbg.data)
(30, 143)
ipdb> np.shape(_bkg)
(30, 142)
When extracting spectra to perform background subtraction at the slit level
NirspecPipeline.extract_spectrum
for some sources the dimensions between slits seems to be off by 1 which causes extractions to fail.This is coming because
using
grizli version = 1.8.4.dev4+ga5d2ece
msaexp version = 0.6.8.dev8+gf5c84b2.d20230403
jwst version = 1.10.0
The text was updated successfully, but these errors were encountered: