Commit 25039e5b authored by Médéric Boquien's avatar Médéric Boquien
Browse files

Use an ordered dictionary to ensure that the attenuations in given bands are...

Use an ordered dictionary to ensure that the attenuations in given bands are always computed in the same order.
parent 815d2a1d
...@@ -239,7 +239,7 @@ class CalzLeit(CreationModule): ...@@ -239,7 +239,7 @@ class CalzLeit(CreationModule):
"""Get the filters from the database""" """Get the filters from the database"""
filter_list = [item.strip() for item in filter_list = [item.strip() for item in
self.parameters["filters"].split("&")] self.parameters["filters"].split("&")]
self.filters = {} self.filters = OrderedDict()
with Database() as base: with Database() as base:
for filter_name in filter_list: for filter_name in filter_list:
self.filters[filter_name] = base.get_filter(filter_name) self.filters[filter_name] = base.get_filter(filter_name)
......
...@@ -191,7 +191,7 @@ class PowerLawAtt(CreationModule): ...@@ -191,7 +191,7 @@ class PowerLawAtt(CreationModule):
filters = self.filters filters = self.filters
# Fλ fluxes (only from continuum)) in each filter before attenuation. # Fλ fluxes (only from continuum)) in each filter before attenuation.
flux_noatt = {} flux_noatt = OrderedDict()
for filter_name, filter_ in filters.items(): for filter_name, filter_ in filters.items():
flux_noatt[filter_name] = sed.compute_fnu( flux_noatt[filter_name] = sed.compute_fnu(
filter_.trans_table, filter_.trans_table,
......
Supports Markdown
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