Skip to content

Commit

Permalink
Merge pull request #1825 from pypeit/empty_2dwvcal
Browse files Browse the repository at this point in the history
Allow for empty 2D wavecal solution in HDU extension of WaveCalib file
  • Loading branch information
kbwestfall authored Jul 22, 2024
2 parents c60cb03 + b9baa54 commit b9dd4ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/releases/1.16.1dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ Under-the-hood Improvements
Bug Fixes
---------

- None
- Allow for empty 2D wavecal solution in HDU extension of WaveCalib file

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 b9dd4ce

Please sign in to comment.