Skip to content

Commit

Permalink
allow for empty 2d wavecal hdu extension
Browse files Browse the repository at this point in the history
  • Loading branch information
kbwestfall committed Jul 1, 2024
1 parent db63cc0 commit 2e9c757
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pypeit/wavecalib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2e9c757

Please sign in to comment.