Commit 2b237fff authored by Médéric Boquien's avatar Médéric Boquien
Browse files

The wavelength sampling varies depending on the wavelength. This means that we...

The wavelength sampling varies depending on the wavelength. This means that we need to cache different grids depending on the redshift.
parent e064217a
......@@ -272,7 +272,10 @@ class SED(object):
# avoid having the resample the filter every time on the optimal grid
# (spectrum+filter), we store the resampled filter. That way we only
# have to resample to spectrum.
key = (wavelength.size, filter_name)
if 'redshift' in self.info:
key = (wavelength.size, filter_name, self.info['redshift'])
else:
key = (wavelength.size, filter_name, 0.)
if key in list(self.cache_filters.keys()):
wavelength_r, transmission_r, lambda_eff = self.cache_filters[key]
else:
......
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