Commit cb9e5fa9 authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Add the sfhdelayedbq module implementing a delayed SFH with a burst/quench. It...

Add the sfhdelayedbq module implementing a delayed SFH with a burst/quench. It is described in detail in Ciesla et al. (2017).
parent d356b294
......@@ -8,6 +8,7 @@
- When emission lines are not corrected for absorption lines (e.g., in the case of very low resolution spectroscopy) the previous method, which computes the theoretical line fluxes, is not optimal. Rather we offer the possibility to measure the fluxes through special filters that are used like regular filters. The idea is to define filters with a positive part on the line, a negative part on the continuum, and a zero-valued integral. In such case the integration over the spectrum directly gives the flux of the integral. So this works at all redshifts, the filter is automatically redshifted at runtime. (Médéric Boquien & David Corre)
- Two new dust attenuation modules have been added: `dustatt\_modified\_CF00` and `dustatt\_modified\_starburst`. The former implements a modified 2-component Charlot & Fall (2000) model whereas the latter implements a modified starburst law with the continuum attenuated with a Calzetti (2000) curve and the lines extincted with a Milky Way or a Magellanic Cloud law. The previous models `dustatt\_powerlaw`, `dustatt\_2powerlaws`, and `dustatt\_calzleit` are still available but are deprecated. (Médéric Boquien & David Corre)
- In addition to the physical properties, the fluxes are now also estimated through a Bayesian analysis. (Médéric Boquien)
- The module `sfhdelayedbq` has been added. It implements a delayed SFH with a burst/quench. It is fully described in Ciesla et al. (2017).
### Changed
- The `sfhdelayed` module has been extended to optionally include an exponential burst to model the latest episode of star formation. (Médéric Boquien & Barbara Lo Faro)
# -*- coding: utf-8 -*-
# Copyright (C) 2013 Centre de données Astrophysiques de Marseille
# Copyright (C) 2014 Laboratoire d'Astrophysique de Marseille
# Copyright (C) 2014 University of Cambridge
# Copyright (C) 2018 Universidad de Antofagasta
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
Delayed tau model for star formation history with an optional burst/quench
This module implements a star formation history (SFH) described as a delayed
rise of the SFR up to a maximum, followed by an exponential decrease. Optionally
a quenching or a bursting episode can be added. It is described in more detail
in Ciesla et al. (2017).
from collections import OrderedDict
import numpy as np
from . import SedModule
class SFHDelayedBQ(SedModule):
"""Delayed tau model for Star Formation History with an optional burst or
This module sets the SED star formation history (SFH) proportional to time,
with a declining exponential parametrised with a time-scale τ. Optionally
a burst/quench can be added. In that case the SFR of that episode is
constant and parametrised as a ratio of the SFR before the beginning of the
episode. See Ciesla et al. (2017).
parameter_list = OrderedDict([
("tau_main", (
"e-folding time of the main stellar population model in Myr.",
("age_main", (
"cigale_list(dtype=int, minvalue=0.)",
"Age of the main stellar population in the galaxy in Myr. The "
"precision is 1 Myr.",
("age_bq", (
"Age of the burst/quench episode. The precision is 1 Myr.",
("r_sfr", (
"Ratio of the SFR after/before age_bq.",
("sfr_A", (
"Value of SFR at t = 0 in M_sun/yr.",
("normalise", (
"Normalise the SFH to produce one solar mass.",
def _init_code(self):
self.tau_main = float(self.parameters["tau_main"])
self.age_main = int(self.parameters["age_main"])
self.age_bq = int(self.parameters["age_bq"])
self.r_sfr = float(self.parameters["r_sfr"])
sfr_A = float(self.parameters["sfr_A"])
normalise = bool(self.parameters["normalise"])
# Delayed SFH
t = np.arange(self.age_main) = t * np.exp(-t / self.tau_main) / self.tau_main**2
# Add the burst/quench
t_bq = self.age_main - self.age_bq[t>=t_bq] = self.r_sfr *[t_bq-1]
# Compute the galaxy mass and normalise the SFH to 1 solar mass
# produced if asked to.
self.sfr_integrated = np.sum( * 1e6
if normalise: /= self.sfr_integrated
self.sfr_integrated = 1.
else: *= sfr_A
self.sfr_integrated *= sfr_A
def process(self, sed):
sed : pcigale.sed.SED object
sed.add_module(, self.parameters)
# Add the sfh and the output parameters to the SED.
sed.sfh =
sed.add_info("sfh.integrated", self.sfr_integrated, True)
sed.add_info("sfh.age_main", self.age_main)
sed.add_info("sfh.tau_main", self.tau_main)
sed.add_info("sfh.age_bq", self.age_bq)
sed.add_info("sfh.r_sfr", self.r_sfr)
# CreationModule to be returned by get_module
Module = SFHDelayedBQ
......@@ -94,7 +94,8 @@ class Configuration(object):
self.config['sed_modules'] = []
self.config.comments['sed_modules'] = ([""] +
["Order of the modules use for SED creation. Available modules:"] +
["SFH: sfh2exp, sfhdelayed, sfhfromfile, sfhperiodic"] +
["SFH: sfh2exp, sfhdelayed, sfhdelayedbq, sfhfromfile, "
"sfhperiodic"] +
["SSP: bc03, m2005"] +
["Nebular emission: nebular"] +
["Dust attenuation: dustatt_calzleit, dustatt_powerlaw, "
......@@ -268,8 +269,8 @@ class Configuration(object):
unofficial module that is not in our list
modules = OrderedDict((('SFH', ['sfh2exp', 'sfhdelayed', 'sfhfromfile',
modules = OrderedDict((('SFH', ['sfh2exp', 'sfhdelayed', 'sfhdelayedbq',
'sfhfromfile', 'sfhperiodic']),
('SSP', ['bc03', 'm2005']),
('nebular', ['nebular']),
('dust attenuation', ['dustatt_calzleit',
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