-
Couldn't load subscription status.
- Fork 58
Description
CRDS NIRISS specwcs references don't load and will cause an error.
Take, for example, the latest F200W GR150R configuration:
from grizli.model import GrismDisperser
from grizli.grismconf import load_grism_config
conf = load_grism_config('jwst_niriss_specwcs_0065.asdf')
beam = GrismDisperser(beam='B', conf=conf)results in
IndexError Traceback (most recent call last)
File test.py:6
4 from grizli.grismconf import load_grism_config
5 conf = load_grism_config('jwst_niriss_specwcs_0065.asdf')
----> 6 beam = GrismDisperser(beam='B', conf=conf)
7 exit()
8 id = 0File grizli/model.py:316, in GrismDisperser.init(self, id, direct, segmentation, origin, xcenter, ycenter, pad, grow, beam, conf, scale, fwcpos, MW_EBV, yoffset, xoffset)
313 # Get Pixel area map (xxx need to add test for WFC3)
314 self.PAM_value = self.get_PAM_value(verbose=False)
--> 316 self.process_config()
318 self.yoffset = yoffset
320 if xoffset is not None:File grizli/model.py:459, in GrismDisperser.process_config(self)
456 self.flat_index = self.idx[dyc + self.x0[0], self.dxpix]
457 except IndexError:
458 # print('Index Error', id, dyc.dtype, self.dxpix.dtype, self.x0[0], self.xc, self.yc, self.beam, self.ytrace_beam.max(), self.ytrace_beam.min())
--> 459 raise IndexError
461 # Trace, wavelength, sensitivity across entire 2D array
462 self.dxfull = np.arange(self.sh_beam[1], dtype=int)IndexError:
This causes an error for any specwcs file, not just the latest calibrations, and also, weirdly, only for the 'B' beam. I think all beams are giving incorrect results, but only the 'B' beam is failing in this fashion. Perhaps this has to do how the polynomials are loaded in or how the transform is applied?
We would really appreciate any feedback on what could be causing this, it appears to be related to how the beam traces are computed, but most come from how the specwcs polynomials for NIRISS are transformed to grizli.