From f8e783d44b74920e1d3ee78e89103f5f370e224d Mon Sep 17 00:00:00 2001 From: Stephen Bailey Date: Wed, 3 Jan 2024 10:43:23 -0800 Subject: [PATCH] add comment about spectra.extra flexibility --- py/desispec/spectra.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/py/desispec/spectra.py b/py/desispec/spectra.py index 5db269cd0..44b3b1aa0 100644 --- a/py/desispec/spectra.py +++ b/py/desispec/spectra.py @@ -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: