diff --git a/CHANGELOG.md b/CHANGELOG.md index 71f6994222c53dee82e14cc5bc3ed9d9b096150e..ce354049c8236a9f1d70b1fa3d0e084c736ba2c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,16 @@ # Change Log -## 0.7.1 (2015-11-30) +## 0.8.0 (2015-11-01) ### Added - The evaluation of the parameters is always done linearly. This can be a problem when estimating the SFR or the stellar mass for instance as it is usual to estimate their log rather. Because the log is non-linear, the likelihood-weigthed mean of the log is not the log of the likelihood-weighted mean. Therefore the estimation of the log of these parameters has to be done during the analysis step. This is now possible. The variables to be analysed in log just need to be indicated with the suffix "_log", for instance "stellar.m_star_log". (Médéric Boquien, idea suggested by Samir Salim) -### Changed ### Fixed - Running the scripts in parallel trigger a deadlock on OS X with python 3.5. A workaround has been implemented. (Médéric Boquien) - 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) -### Optimised +### 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) ### Added diff --git a/pcigale/creation_modules/dustatt_calzleit.py b/pcigale/creation_modules/dustatt_calzleit.py index 325fb9247ca8ae2149becf3b2d476743726c79ac..25efcc8f04f500fa9cb7869328e117d5b7241f44 100644 --- a/pcigale/creation_modules/dustatt_calzleit.py +++ b/pcigale/creation_modules/dustatt_calzleit.py @@ -243,7 +243,8 @@ class CalzLeit(CreationModule): ebvs = {} wavelength = sed.wavelength_grid 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_width = float(self.parameters["uv_bump_width"]) uv_bump_amplitude = float(self.parameters["uv_bump_amplitude"]) @@ -294,8 +295,7 @@ class CalzLeit(CreationModule): sed.add_info("attenuation." + filt, -2.5 * np.log10(flux_att[filt] / flux_noatt[filt])) - sed.add_info('attenuation.ebvs_main', ebvs['old']) - sed.add_info('attenuation.ebvs_young', ebvs['young']) + sed.add_info('attenuation.ebvs_old_factor', ebvs_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) diff --git a/pcigale/creation_modules/dustatt_powerlaw.py b/pcigale/creation_modules/dustatt_powerlaw.py index ab053e0a2b12abd2db61768e2d5e1dd19b6a4cc1..0736f3be7b44c76ab4e2bd1617ac3d58fb05bbfc 100644 --- a/pcigale/creation_modules/dustatt_powerlaw.py +++ b/pcigale/creation_modules/dustatt_powerlaw.py @@ -169,7 +169,8 @@ class PowerLawAtt(CreationModule): av = {} wavelength = sed.wavelength_grid 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_width = float(self.parameters["uv_bump_width"]) uv_bump_amplitude = float(self.parameters["uv_bump_amplitude"]) @@ -204,7 +205,9 @@ class PowerLawAtt(CreationModule): sed.add_contribution("attenuation." + contrib, wavelength, 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.powerlaw_slope", powerlaw_slope) diff --git a/pcigale/sed/io/vo.py b/pcigale/sed/io/vo.py index 45aee5eb74d62e25362c18bf524b0d9dd60eb6a4..8d59482fc53ad487cd646bfd0e4abe19fa54553a 100644 --- a/pcigale/sed/io/vo.py +++ b/pcigale/sed/io/vo.py @@ -77,9 +77,8 @@ def save_sed_to_vo(sed, filename, norm=1.): # If there is a stellar population then the norm factor is the stellar # mass. votable.infos.append(Info(name="Galaxy mass in Msun", value=norm)) - votable.infos.append(Info(name="Redshift", - value=sed.info['universe.redshift'])) - for name, value in sed.info.items(): + + for name, value in sorted(sed.info.items()): if name in sed.mass_proportional_info: votable.infos.append(Info(name=name, value=norm * value)) else: diff --git a/pcigale_plots/__init__.py b/pcigale_plots/__init__.py index 0ff197b8f41d3c5569be9b28a558aae5024cca5c..53c96c80b59b9682157774040a04e12e03debf43 100644 --- a/pcigale_plots/__init__.py +++ b/pcigale_plots/__init__.py @@ -9,6 +9,7 @@ import argparse from itertools import product, repeat from collections import OrderedDict +import sys from astropy.table import Table import matplotlib diff --git a/setup.py b/setup.py index 9cceb5ce16fd21fbf525b7a705ff12d75c9fea87..c87fe7a0910474e4761af9204130dc7a410009a1 100755 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ entry_points = { setup( name="pcigale", - version="0.7.1", + version="0.8.0", packages=find_packages(exclude=["database_builder"]), install_requires=['numpy', 'scipy', 'sqlalchemy', 'matplotlib',