From f46ca4e76d95d356b01a4e2ba8b6ad5f5d50ee7d Mon Sep 17 00:00:00 2001 From: Benjamin Johnson Date: Mon, 23 Oct 2023 15:05:09 -0400 Subject: [PATCH] propogate the data mask to the eline fitting mask. --- prospect/models/sedmodel.py | 1 + 1 file changed, 1 insertion(+) diff --git a/prospect/models/sedmodel.py b/prospect/models/sedmodel.py index 8f15d9c2..9dc5980b 100644 --- a/prospect/models/sedmodel.py +++ b/prospect/models/sedmodel.py @@ -378,6 +378,7 @@ def cache_eline_parameters(self, obs, nsigma=5, forcelines=False): # This part has to go in every call linewidth = nsigma * self._ewave_obs / ckms * self._eline_sigma_kms pixel_mask = (np.abs(self._outwave - self._ewave_obs[:, None]) < linewidth[:, None]) + pixel_mask = pixel_mask & obs.get("mask")[None, :] self._valid_eline = pixel_mask.any(axis=1) & self._use_eline # --- wavelengths corresponding to valid lines ---