Commit af42d0a2 authored by Médéric Boquien's avatar Médéric Boquien

In the sfhfromfile module, an extraneous offset in the column index made that...

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.
parent 8bd36d8d
......@@ -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)
......
......@@ -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
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