Commit 0769fddf authored by Médéric Boquien's avatar Médéric Boquien

Merge branch 'release/v0.12.1'

parents ce372df9 78a964f7
# Change Log
## 0.12.1 (2018-02-27)
### Fixed
- The best fit could not be computed in photo-z mode because the redshift was negative. (Médéric Boquien)
- The bayesian estimates could not be computed when some models were older than the age of the universe. (Médéric Boquien)
- The usage of `dustatt\_cazleit` causes some confusion regarding the reddening of the stars and of the gas. We have clarified that they are both attenuated with the same law and switched the differential reddening to 1 by default. (Médéric Boquien & Véronique Buat)
- When some models were invalid, it was not possible to plot the PDF. (Médéric Boquien & Denis Burgarella)
## 0.12.0 (2018-02-19)
### Added
- Provide the possibility not to store a given module in cache. This can be useful on computers with a limited amount of memory. The downside is that when not caching the model generation will be slower. (Médéric Boquien)
......@@ -9,7 +17,7 @@
- Allow the observations to be analysed by blocks of models in `pdf\_analysis`. This is useful when computing a very large grid of models that would not fit in memory. The number of blocks is set with the `blocks` parameters in the pcigale.ini. (Médéric Boquien)
- The integrated stellar luminosity is now provided as `stellar.lum`. (Médéric Boquien)
- The high resolution BC03 models have been added. They can be activated when building the database by adding `--bc03res=hr` to the build command. In that case the low resolution models are not built. (Médéric Boquien)
- Dust templates generated with THEMIS (Jones et al. 2017) have been contributed by the DustPedia team (Davis et al. 2017). Special acknowledgement to Angelos Nersesian and Frédéric Galliano for creating the dust templates and writing the code. (Dustpedia team)
- Dust templates generated with THEMIS (Jones et al. 2017) have been contributed by the DustPedia team (Davies et al. 2017). Special acknowledgement to Angelos Nersesian and Frédéric Galliano for creating the dust templates and writing the code. (Dustpedia team)
- The Herschel SPIRE filters for extended sources have been added. (Médéric Boquien)
### Changed
......
......@@ -193,7 +193,8 @@ def analysis(idx, obs):
else:
values = _(gbl_models.properties[i, wz])
mean, std = weighted_param(values, likelihood)
wlikely = np.where(np.isfinite(likelihood))
mean, std = weighted_param(values[wlikely], likelihood[wlikely])
gbl_results.bayes.means[idx, i] = mean
gbl_results.bayes.errors[idx, i] = std
if gbl_models.conf['analysis_params']['save_chi2'] is True:
......@@ -239,7 +240,8 @@ def bestfit(oidx, obs):
# We compute the model at the exact redshift not to have to correct for the
# difference between the object and the grid redshifts.
params = deepcopy(gbl_params.from_index(best_index))
params[-1]['redshift'] = obs['redshift']
if obs['redshift'] >= 0.:
params[-1]['redshift'] = obs['redshift']
sed = gbl_warehouse.get_sed(gbl_params.modules, params)
fluxes = np.array([sed.compute_fnu(filt) for filt in gbl_obs.bands])
......
......@@ -185,8 +185,10 @@ def a_vs_ebv(wavelength, bump_wave, bump_width, bump_ampl, power_slope):
class CalzLeit(SedModule):
"""Calzetti + Leitherer attenuation module
This module computes the dust attenuation using the
formulae from Calzetti et al. (2000) and Leitherer et al. (2002).
This module computes the dust attenuation using the formulae from
Calzetti et al. (2000) and Leitherer et al. (2002). Note that both the
stars and the gas are attenuated with the same curve as opposed to Calzetti
et al. (2000) where the gas is attenuated with a Milky Way curve.
The attenuation can be computed on the whole spectrum or on a specific
contribution and is added to the SED as a negative contribution.
......@@ -204,7 +206,7 @@ class CalzLeit(SedModule):
"cigale_list(minvalue=0., maxvalue=1.)",
"Reduction factor for the E(B-V)* of the old population compared "
"to the young one (<1).",
0.44
1.0
)),
("uv_bump_wavelength", (
"cigale_list(minvalue=0.)",
......
......@@ -93,8 +93,8 @@ def _pdf_worker(obj_name, var_name):
model_variable = np.concatenate(model_variable)
Npdf = 100
min_hist = np.min(model_variable)
max_hist = np.max(model_variable)
min_hist = np.nanmin(model_variable)
max_hist = np.nanmax(model_variable)
Nhist = min(Npdf, len(np.unique(model_variable)))
if min_hist == max_hist:
......
......@@ -38,7 +38,7 @@ entry_points = {
setup(
name="pcigale",
version="0.12.0",
version="0.12.1",
packages=find_packages(exclude=["database_builder"]),
install_requires=['numpy', 'scipy', 'sqlalchemy', 'matplotlib',
......
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