Check for equal length of SNR and exposure time
This commit is contained in:
parent
4ff9de259c
commit
86e47b356a
@ -156,6 +156,11 @@ class Configuration(object):
|
|||||||
mes is not None and error("Configuration check: common -> snr: " + mes)
|
mes is not None and error("Configuration check: common -> snr: " + mes)
|
||||||
self.conf.common.snr.val = readCSV(self.conf.common.snr.val, [u.dimensionless_unscaled],
|
self.conf.common.snr.val = readCSV(self.conf.common.snr.val, [u.dimensionless_unscaled],
|
||||||
format_="csv").columns[0].quantity
|
format_="csv").columns[0].quantity
|
||||||
|
if hasattr(self.conf.common, "exposure_time") and len(self.conf.common.snr.val) != len(
|
||||||
|
self.conf.common.exposure_time.val):
|
||||||
|
error(
|
||||||
|
"Configuration check: common -> snr: Length of exposure time (%d) not matching the length of "
|
||||||
|
"the SNR (%d)" % (len(self.conf.common.exposure_time.val), len(self.conf.common.snr.val)))
|
||||||
if not (hasattr(self.conf.common, "exposure_time") or hasattr(self.conf.common, "snr")):
|
if not (hasattr(self.conf.common, "exposure_time") or hasattr(self.conf.common, "snr")):
|
||||||
error("Configuration check: common: Expected at least one of the containers 'exposure_time' or 'snr' but" +
|
error("Configuration check: common: Expected at least one of the containers 'exposure_time' or 'snr' but" +
|
||||||
"got none.")
|
"got none.")
|
||||||
|
Loading…
Reference in New Issue
Block a user