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

To compute the stellar spectrum of the young component, do not pass the full...

To compute the stellar spectrum of the young component, do not pass the full SFH with the old part set to 0. Rather, only pass the corresponding part of the SFH. This nearly doubles the computing speed of the stellar spectrum.
parent b6e74d77
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
- 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) - 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)
- The sfhfromfile module is now fully initialised when it is instantiated rather than doing so when processing the SED. This should be especially sensitive when processing different SED. (Médéric Boquien) - The sfhfromfile module is now fully initialised when it is instantiated rather than doing so when processing the SED. This should be especially sensitive when processing different SED. (Médéric Boquien)
- We do not store the time grid in the SED anymore given that we assume it starts at 0 Myr with steps of 1 Myr, we can easily reconstruct to save it if needed. It should save a little bit of memory and it should go a little bit faster. (Médéric Boquien) - We do not store the time grid in the SED anymore given that we assume it starts at 0 Myr with steps of 1 Myr, we can easily reconstruct to save it if needed. It should save a little bit of memory and it should go a little bit faster. (Médéric Boquien)
- To compute the stellar spectrum of the young component, do not pass the full SFH with the old part set to 0. Rather, only pass the corresponding part of the SFH. This nearly doubles the computing speed of the stellar spectrum (Médéric Boquien)
## 0.8.1 (2015-12-07) ## 0.8.1 (2015-12-07)
### Fixed ### Fixed
......
...@@ -75,9 +75,8 @@ class BC03(SedModule): ...@@ -75,9 +75,8 @@ class BC03(SedModule):
""" """
# First, we process the young population (age lower than the # First, we process the young population (age lower than the
# separation age.) # separation age.)
young_sfh = np.copy(sed.sfh) young_wave, young_lumin, young_info = self.ssp.convolve(
young_sfh[:-self.separation_age] = 0. sed.sfh[-self.separation_age:])
young_wave, young_lumin, young_info = self.ssp.convolve(young_sfh)
# Then, we process the old population. If the SFH is shorter than the # Then, we process the old population. If the SFH is shorter than the
# separation age then all the arrays will consist only of 0. # separation age then all the arrays will consist only of 0.
......
...@@ -87,9 +87,8 @@ class M2005(SedModule): ...@@ -87,9 +87,8 @@ class M2005(SedModule):
""" """
# First, we process the young population (age lower than the # First, we process the young population (age lower than the
# separation age.) # separation age.)
young_sfh = np.copy(sed.sfh) young_masses, young_spectrum = self.ssp.convolve(
young_sfh[:-self.separation_age] = 0. sed.sfh[-self.separation_age:])
young_masses, young_spectrum = self.ssp.convolve(young_sfh)
# Then, we process the old population. If the SFH is shorter than the # Then, we process the old population. If the SFH is shorter than the
# separation age then all the arrays will consist only of 0. # separation age then all the arrays will consist only of 0.
......
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