diff --git a/prospect/models/sedmodel.py b/prospect/models/sedmodel.py index 8f15d9c2..851229e1 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["mask"][None, :] self._valid_eline = pixel_mask.any(axis=1) & self._use_eline # --- wavelengths corresponding to valid lines --- diff --git a/prospect/sources/ssp_basis.py b/prospect/sources/ssp_basis.py index 156a2b80..06272e8f 100644 --- a/prospect/sources/ssp_basis.py +++ b/prospect/sources/ssp_basis.py @@ -5,11 +5,14 @@ from ..utils.smoothing import smoothspec from .constants import cosmo, lightspeed, jansky_cgs, to_cgs_at_10pc -try: - import fsps - from sedpy.observate import getSED -except(ImportError, RuntimeError): - pass +#try: +# import fsps +# from sedpy.observate import getSED +#except(ImportError, RuntimeError): +# pass + +import fsps +from sedpy.observate import getSED __all__ = ["SSPBasis", "FastSSPBasis", "FastStepBasis", "MultiSSPBasis"] @@ -78,6 +81,8 @@ def __init__(self, zcontinuous=1, reserved_params=['tage', 'sigma_smooth'], self.flux_interp = flux_interp self.ssp = fsps.StellarPopulation(compute_vega_mags=compute_vega_mags, zcontinuous=zcontinuous) + print('FSPS libs:', self.ssp.libraries) + self.ssp.params['sfh'] = 0 self.reserved_params = reserved_params self.params = {}