Skip to content

Commit

Permalink
add comment about spectra.extra flexibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sbailey committed Jan 3, 2024
1 parent d9f7eb0 commit f8e783d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions py/desispec/spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ def __init__(self, bands=[], wave={}, flux={}, ivar={}, mask=None,
if resolution_data[b].shape[2] != wave[b].shape[0]:
raise RuntimeError("resolution array wavelength dimension for band {} does not match grid".format(b))
if extra is not None:
# if extra[band] exists, its elements should match the shape of the flux array,
# but allow for some flexibility for missing bands or extra[band] being None.
try:
for ex in extra[b].items():
if ex[1].shape != flux[b].shape:
Expand Down

0 comments on commit f8e783d

Please sign in to comment.