Open moustakas opened 4 years ago
I wonder if having sources.galaxy_basis.CSPSpecBasis
subclass sources.ssp_basis.FastSSPBasis
instead of sources.ssp_basis.SSPBasis
would speed things up.
I wonder if having sources.galaxy_basis.CSPSpecBasis subclass sources.ssp_basis.FastSSPBasis instead of sources.ssp_basis.SSPBasis would speed things up.
Unfortunately, no change in compute time.
The default MIST isochrones are just slow the first time the SSPs for a given metallicity are constructed. This is largely due to a huge amount of isochrone points covering the TP-AGB. Ity is on our to-do list to remove some of these points, but this may take some time.
However, subsequent calls with the same metallicity should be fast (since the SSPs get cached unless you change the IMF or something like that.). Once all metallicities are generated, call time should be something like 50ms including nebular emission.
In the interactive demo (as well as in my own, independent fits), instantiating the
CSPSpecBasis
object (using theMILES
spectral library and theMIST
isochrones) takes about 10 seconds, which is fine because all the model spectra have to be read and cached.However, the
sedmodel.SedModel.mean_model
(or, equivalently, thesedmodel.SedModel.sed
) method, which evaluates the SED given a set of input parameters, takes a almost a full minute.I can do some profiling but off-hand I wanted to ask if there are any ways to speed up this computation. Or maybe I'm missing something obvious?