Add wl_bins to configuration

This commit is contained in:
Lukas Klass 2020-06-30 10:25:47 +02:00
parent 1164ab930f
commit d9745b0203

View File

@ -93,7 +93,8 @@ class Configuration(object):
if hasattr(self.conf.common, "wl_delta"):
wl_delta = self.conf.common.wl_delta()
else:
wl_delta = self.conf.common.wl_min() / self.conf.common.res()
wl_delta = (self.conf.common.wl_min() + self.conf.common.wl_max()) / (2 * self.conf.common.res())
setattr(self.conf.common, 'wl_delta', Entry(val=wl_delta))
setattr(self.conf.common, 'wl_bins',
Entry(val=np.append(np.arange(self.conf.common.wl_min().to(u.nm).value,
self.conf.common.wl_max().to(u.nm).value, wl_delta.to(u.nm).value),