Commit 63b0aa1d authored by Médéric Boquien's avatar Médéric Boquien

Implement the computation of <U> in the dl2007 and dl2014 modules.

parent 629de61d
Pipeline #1628 skipped with stage
......@@ -5,6 +5,7 @@
- The (1+z1)/(1+z2) factor between observed and grid flux densities caused by the differential redshifting is now taken into account. With a default grid redshift rounding of two decimals this yields a difference of at most 0.5% in the estimated physical properties at z=0 and even less at higher z. (Médéric Boquien)
- The list of bands for which to carry out a Bayesian flux estimate is now configurable. By default this corresponds to the fitted bands but it also supports bands that are not included in the fit. This can be set in the `fluxes` parameter of the `pdf\_analysis` module. (Médéric Boquien)
- Implementation of the auto-detection of lines in the input flux file so they are automatically added to the list of bands in `pcigale.ini`. (Médéric Boquien)
- The `dl2007` and `dl2014` modules now provide <U>. (Médéric Boquien)
### Changed
- Python 3.6 is now the minimum required version. (Médéric Boquien)
- The logo has now been moved to the lower-right corner of the figure so that it does not overlap with any information and it has been updated for a less pixelated version. (Médéric Boquien & Rodrigo González Castillo)
......
......@@ -71,6 +71,11 @@ class DL2007(SedModule):
self.umax = float(self.parameters["umax"])
self.gamma = float(self.parameters["gamma"])
# We also compute <U>
self.umean = (1. - self.gamma) * self.umin + \
self.gamma * np.log(self.umax / self.umin) / \
(1. / self.umin - 1. / self.umax)
with Database() as database:
self.model_minmin = database.get_dl2007(self.qpah, self.umin,
self.umin)
......@@ -110,6 +115,7 @@ class DL2007(SedModule):
sed.add_info('dust.qpah', self.qpah)
sed.add_info('dust.umin', self.umin)
sed.add_info('dust.umax', self.umax)
sed.add_info('dust.umean', self.umean)
sed.add_info('dust.gamma', self.gamma)
# To compute the dust mass we simply divide the luminosity in W by the
# emissivity in W/kg of dust.
......
......@@ -77,7 +77,24 @@ class DL2014(SedModule):
self.umin = float(self.parameters["umin"])
self.alpha = float(self.parameters["alpha"])
self.gamma = float(self.parameters["gamma"])
# We also compute <U>. For this we consider Eq. 6 and 15 of Draine & Li
# (2007) taking into account that α can be different from 2. We then
# just compute the integral. We have two specific cases, α=1 and α=2.
self.umax = 1e7
self.umean = (1. - self.gamma) * self.umin
if self.alpha == 1.0:
self.umean += self.gamma * (self.umax - self.umin) / \
np.log(self.umax / self.umin)
elif self.alpha == 2.0:
self.umean += self.gamma * np.log(self.umax / self.umin) / \
(1. / self.umin - 1. / self.umax)
else:
oma = 1. - self.alpha
tma = 2. - self.alpha
self.umean += self.gamma * oma / tma * \
(self.umin**tma - self.umax**tma) / \
(self.umin**oma - self.umax**oma)
with Database() as database:
self.model_minmin = database.get_dl2014(self.qpah, self.umin,
......@@ -117,6 +134,7 @@ class DL2014(SedModule):
sed.add_module(self.name, self.parameters)
sed.add_info('dust.qpah', self.qpah)
sed.add_info('dust.umin', self.umin)
sed.add_info('dust.umean', self.umean)
sed.add_info('dust.alpha', self.alpha)
sed.add_info('dust.gamma', self.gamma)
# To compute the dust mass we simply divide the luminosity in W by the
......
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