Commit 36ab34db authored by Médéric Boquien's avatar Médéric Boquien

Do not return the break strengths in the bc03 module as they are not computed...

Do not return the break strengths in the bc03 module as they are not computed corrected by a convolvution.
parent a9df3124
......@@ -3,6 +3,8 @@
## Unreleased
### Added
### Changed
- We do not output the break strength from the `bc03` module anymore as these were not computed properly. (Médéric Boquien)
### Fixed
### Optimised
......
......@@ -86,25 +86,20 @@ class BC03(object):
* "m_star": Total mass in stars in Msun
* "m_gas": Mass returned to the ISM by evolved stars in Msun
* "n_ly": rate of H-ionizing photons (s-1)
* "b_4000": Amplitude of 4000 Å break (Bruzual 2003)
* "b4_vn": Amplitude of 4000 Å narrow break (Balogh et al. 1999)
* "b4_sdss": Amplitude of 4000 Å break (Stoughton et al. 2002)
* "b_912": Amplitude of Lyman break
"""
# The convolution is just a matter of reverting the SFH and computing
# the sum of the data from the SSP one to one product. This is done
# using the dot product.
info_table = self.info_table[:, :sfh.size]
# using the dot product. We take only the first three elements from the
# info_table as the others do not make sense when convolved with the
# SFH (break strength).
info_table = self.info_table[:3, :sfh.size]
spec_table = self.spec_table[:, :sfh.size]
# The 1e6 factor is because the SFH is in solar mass per year.
info = 1e6 * np.dot(info_table, sfh[::-1])
spec = 1e6 * np.dot(spec_table, sfh[::-1])
info = dict(zip(
["m_star", "m_gas", "n_ly", "b_4000", "b4_vn", "b4_sdss", "b_912"],
info
))
info = dict(zip(["m_star", "m_gas", "n_ly"], info))
return spec, info
......@@ -102,19 +102,11 @@ class BC03(SedModule):
sed.add_info("stellar.m_gas_young", info_young["m_gas"], True)
sed.add_info("stellar.n_ly_young", info_young["n_ly"], True)
sed.add_info("stellar.lum_ly_young", lum_lyc_young, True)
sed.add_info("stellar.b_400_young", info_young["b_4000"])
sed.add_info("stellar.b4_vn_young", info_young["b4_vn"])
sed.add_info("stellar.b4_sdss_young", info_young["b4_sdss"])
sed.add_info("stellar.b_912_young", info_young["b_912"])
sed.add_info("stellar.m_star_old", info_old["m_star"], True)
sed.add_info("stellar.m_gas_old", info_old["m_gas"], True)
sed.add_info("stellar.n_ly_old", info_old["n_ly"], True)
sed.add_info("stellar.lum_ly_old", lum_lyc_old, True)
sed.add_info("stellar.b_400_old", info_old["b_4000"])
sed.add_info("stellar.b4_vn_old", info_old["b4_vn"])
sed.add_info("stellar.b4_sdss_old", info_old["b4_sdss"])
sed.add_info("stellar.b_912_old", info_old["b_912"])
sed.add_info("stellar.m_star",
info_young["m_star"] + info_old["m_star"], True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment