diff --git a/doc/releases/1.16.1dev.rst b/doc/releases/1.16.1dev.rst index fe68fc7496..7a37b14fd2 100644 --- a/doc/releases/1.16.1dev.rst +++ b/doc/releases/1.16.1dev.rst @@ -42,5 +42,5 @@ Under-the-hood Improvements Bug Fixes --------- -- None +- Allow for empty 2D wavecal solution in HDU extension of WaveCalib file diff --git a/pypeit/wavecalib.py b/pypeit/wavecalib.py index d297afa160..4e576ee53f 100644 --- a/pypeit/wavecalib.py +++ b/pypeit/wavecalib.py @@ -217,7 +217,8 @@ def from_hdu(cls, hdu, chk_version=True, **kwargs): # Parse all the WAVE2DFIT extensions # TODO: It would be good to have the WAVE2DFIT extensions follow the # same naming convention as the WAVEFIT extensions... - wave2d_fits = [fitting.PypeItFit.from_hdu(hdu[e], chk_version=chk_version) + wave2d_fits = [fitting.PypeItFit() if len(hdu[e].data) == 0 + else fitting.PypeItFit.from_hdu(hdu[e], chk_version=chk_version) for e in ext if 'WAVE2DFIT' in e] if len(wave2d_fits) > 0: d['wv_fit2d'] = np.asarray(wave2d_fits)