From d2c9dd2601d312077c11ca0a36ef02429b1bfbfc Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 21 May 2017 21:24:27 +0800 Subject: configs/checkers: Check SNR simulation resolution against pixel size --- fg21sim/configs/checkers.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fg21sim/configs') diff --git a/fg21sim/configs/checkers.py b/fg21sim/configs/checkers.py index ffb1e63..2535f9e 100644 --- a/fg21sim/configs/checkers.py +++ b/fg21sim/configs/checkers.py @@ -15,6 +15,7 @@ Therefore, they are very different to the checker functions used in the import os from ..errors import ConfigError +from ..sky import get_sky def _check_missing(configs, keys): @@ -162,6 +163,12 @@ def check_galactic_snr(configs): ) if configs.getn(comp+"/save"): results.update(_check_missing(configs, comp+"/output_dir")) + # simulation resolution should be higher than the output sky map + sky = get_sky(configs) + key = comp + "/resolution" + resolution = configs.getn(key) # [ arcmin ] + if resolution < sky.pixelsize: + results[key] = "resolution should be higher than output map" return results -- cgit v1.2.2