From ba4a546214aa2419740e33501c01be0e1116b939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9d=C3=A9ric=20Boquien?= Date: Fri, 6 May 2016 11:13:00 -0300 Subject: [PATCH] With the new sanity check of the input parameters, cigale did not handle the fact that the redshift could be given in the parameters file. Now this is handled properly. --- CHANGELOG.md | 2 ++ pcigale/session/configuration.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c245711..62e951fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Added ### Changed ### Fixed +- With the new sanity check of the input parameters, cigale did not handle the fact that the redshift could be given in the parameters file. Now this is handled properly. (Médéric Boquien) + ### Optimised - A significant fraction of the total run time is spent computing integrals (e.g. fluxes in passbands). We can make the integration faster by rewriting the trapezoidal rule in terms of np.dot(). This allows to offload the computation to optimised libraries. The end result is that the integration is twice as fast, with a gain of ~10-15% on the total run time. (Médéric Boquien) diff --git a/pcigale/session/configuration.py b/pcigale/session/configuration.py index 144432b2..bd36d763 100644 --- a/pcigale/session/configuration.py +++ b/pcigale/session/configuration.py @@ -287,6 +287,9 @@ class Configuration(object): z = list(np.unique(np.around(obs_table['redshift'], decimals=REDSHIFT_DECIMALS))) self.config['sed_modules_params']['redshifting']['redshift'] = z + elif self.config['parameters_file']: + # The entry will be ignored anyway. Just pass a dummy list + self.config['sed_modules_params']['redshifting']['redshift'] = [] else: raise Exception("No flux file and no redshift indicated. " "The spectra cannot be computed. Aborting.") -- GitLab