diff --git a/CHANGELOG.md b/CHANGELOG.md index 0776fb341266aa25182bb2ffcf760ba835459a35..d111ceaac1a3fc676d8ba6aa2997a1b054e90007 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - When called without arguments, pcigale-plots would crash and display the backtrace. Now it displays the a short help showing how to use it. (Médéric Boquien) - For sfh2exp, when setting the scale of the SFH with sfr0, the normalisation was incorrect by a factor exp(-1/tau_main). (Médéric Boquien) - The mass-dependent physical properties are computed assuming the redshift of the model. However because we round the observed redshifts to two decimals, there can be a difference of 0.005 in redshift between the models and the actual observation if CIGALE computes the list of redshifts itself. At low redshift, this can cause a discrepancy in the mass-dependent physical properties: ~0.35 dex at z=0.010 vs 0.015 for instance. Therefore we now evaluate these physical quantities at the observed redshift at full precision. (Médéric Boquien, issue reported by Samir Salim) +- In the sfhfromfile module, an extraneous offset in the column index made that it took the previous column as the SFR rather than the selected column. (Médéric Boquien) ### Optimised - Prior to version 0.7.0, we needed to maintain the list of redshifts for all the computed models. Past 0.7.0 we just infer the redshift from a list unique redshifts. This means that we can now discard the list of redshifts for all the models and only keep the list of unique redshifts. This saves ~8 MB of memory for every 10⁶ models. the models should be computed slightly faster but it is in the measurement noise. (Médéric Boquien) diff --git a/pcigale/creation_modules/sfhfromfile.py b/pcigale/creation_modules/sfhfromfile.py index bcdc24b74ccccdb49c00d832735ecc3ccff4513c..491a36c90d108ede8e46849809fa1ce9c4526d48 100644 --- a/pcigale/creation_modules/sfhfromfile.py +++ b/pcigale/creation_modules/sfhfromfile.py @@ -70,8 +70,7 @@ class SfhFromFile(CreationModule): time_grid = table.columns[0].data - # -1 because Python indexes start to 0. - sfr_column_number = int(self.parameters['sfr_column']) - 1 + sfr_column_number = int(self.parameters['sfr_column']) sfr = table.columns[sfr_column_number].data age = int(self.parameters['age']) @@ -91,7 +90,7 @@ class SfhFromFile(CreationModule): sed.add_module(self.name, self.parameters) sed.sfh = (time_grid, sfr) sed.add_info("sfh.integrated", sfr_integrated, True) - sed.add_info("sfh.id", sfr_column_number+1) + sed.add_info("sfh.index", sfr_column_number) # CreationModule to be returned by get_module Module = SfhFromFile