Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add obs['mask'] in the pixel_mask of the eline_marginalization model #299

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions prospect/models/sedmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---
Expand Down
15 changes: 10 additions & 5 deletions prospect/sources/ssp_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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 = {}
Expand Down
Loading