Commit 8942e2e0 authored by Yannick Roehlly's avatar Yannick Roehlly

Homogenise attenuation modules outputs

In the attenuation modules, remove the attenuation.ebvs_main and
attenuation.ebvs_young parameter that are duplicates of
attenuation.E_BVs.stellar.old and attenuation.E_BVs.stellar.young.

Homogenise the outputs of the two modules and add the Av/E_BVs old
factors to the information dictionary so that their analysis can be
done.
parent f2e00b46
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
- When no dust emission module is used, pcigale genconf complains that no dust attenuation module is used. Correctly specify dust emission and not attenuation. (Médéric Boquien and Laure Ciesla) - When no dust emission module is used, pcigale genconf complains that no dust attenuation module is used. Correctly specify dust emission and not attenuation. (Médéric Boquien and Laure Ciesla)
- Allowing more flexibility to read ASCII files broke the handling of FITS files. It is now fixed. (Yannick Roehlly) - Allowing more flexibility to read ASCII files broke the handling of FITS files. It is now fixed. (Yannick Roehlly)
### Changed
- The attenuation.ebvs\_main and attenuation.ebvs\_old parameters are no longer present as they were duplicates of attenuation.E\_BVs.stellar.old and attenuation.E\_BVs.stellar.young (that are still available).
## 0.7.0 (2015-11-19) ## 0.7.0 (2015-11-19)
### Added ### Added
- The pcigale-mock utility has been added to generate plots comparing the exact and pcigale-estimated parameters. This requires pcigale to be run beforehand with the pdf_analysis module and the mock_flag option set to True. (Denis Burgarella and Médéric Boquien) - The pcigale-mock utility has been added to generate plots comparing the exact and pcigale-estimated parameters. This requires pcigale to be run beforehand with the pdf_analysis module and the mock_flag option set to True. (Denis Burgarella and Médéric Boquien)
......
...@@ -243,7 +243,8 @@ class CalzLeit(CreationModule): ...@@ -243,7 +243,8 @@ class CalzLeit(CreationModule):
ebvs = {} ebvs = {}
wavelength = sed.wavelength_grid wavelength = sed.wavelength_grid
ebvs['young'] = float(self.parameters["E_BVs_young"]) ebvs['young'] = float(self.parameters["E_BVs_young"])
ebvs['old'] = float(self.parameters["E_BVs_old_factor"]) * ebvs['young'] ebvs_old_factor = float(self.parameters["E_BVs_old_factor"])
ebvs['old'] = ebvs_old_factor * ebvs['young']
uv_bump_wavelength = float(self.parameters["uv_bump_wavelength"]) uv_bump_wavelength = float(self.parameters["uv_bump_wavelength"])
uv_bump_width = float(self.parameters["uv_bump_width"]) uv_bump_width = float(self.parameters["uv_bump_width"])
uv_bump_amplitude = float(self.parameters["uv_bump_amplitude"]) uv_bump_amplitude = float(self.parameters["uv_bump_amplitude"])
...@@ -294,8 +295,7 @@ class CalzLeit(CreationModule): ...@@ -294,8 +295,7 @@ class CalzLeit(CreationModule):
sed.add_info("attenuation." + filt, sed.add_info("attenuation." + filt,
-2.5 * np.log10(flux_att[filt] / flux_noatt[filt])) -2.5 * np.log10(flux_att[filt] / flux_noatt[filt]))
sed.add_info('attenuation.ebvs_main', ebvs['old']) sed.add_info('attenuation.ebvs_old_factor', ebvs_old_factor)
sed.add_info('attenuation.ebvs_young', ebvs['young'])
sed.add_info('attenuation.uv_bump_wavelength', uv_bump_wavelength) sed.add_info('attenuation.uv_bump_wavelength', uv_bump_wavelength)
sed.add_info('attenuation.uv_bump_width', uv_bump_width) sed.add_info('attenuation.uv_bump_width', uv_bump_width)
sed.add_info('attenuation.uv_bump_amplitude', uv_bump_amplitude) sed.add_info('attenuation.uv_bump_amplitude', uv_bump_amplitude)
......
...@@ -169,7 +169,8 @@ class PowerLawAtt(CreationModule): ...@@ -169,7 +169,8 @@ class PowerLawAtt(CreationModule):
av = {} av = {}
wavelength = sed.wavelength_grid wavelength = sed.wavelength_grid
av['young'] = float(self.parameters["Av_young"]) av['young'] = float(self.parameters["Av_young"])
av['old'] = float(self.parameters["Av_old_factor"] * av['young']) av_old_factor = float(self.parameters["Av_old_factor"])
av['old'] = av_old_factor * av['young']
uv_bump_wavelength = float(self.parameters["uv_bump_wavelength"]) uv_bump_wavelength = float(self.parameters["uv_bump_wavelength"])
uv_bump_width = float(self.parameters["uv_bump_width"]) uv_bump_width = float(self.parameters["uv_bump_width"])
uv_bump_amplitude = float(self.parameters["uv_bump_amplitude"]) uv_bump_amplitude = float(self.parameters["uv_bump_amplitude"])
...@@ -204,7 +205,9 @@ class PowerLawAtt(CreationModule): ...@@ -204,7 +205,9 @@ class PowerLawAtt(CreationModule):
sed.add_contribution("attenuation." + contrib, wavelength, sed.add_contribution("attenuation." + contrib, wavelength,
attenuation_spectrum) attenuation_spectrum)
# Bump and slope of the dust attenuation sed.add_info("attenuation.av_old_factor", av_old_factor)
sed.add_info('attenuation.uv_bump_wavelength', uv_bump_wavelength)
sed.add_info('attenuation.uv_bump_width', uv_bump_width)
sed.add_info("attenuation.uv_bump_amplitude", uv_bump_amplitude) sed.add_info("attenuation.uv_bump_amplitude", uv_bump_amplitude)
sed.add_info("attenuation.powerlaw_slope", powerlaw_slope) sed.add_info("attenuation.powerlaw_slope", powerlaw_slope)
......
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