From f3efd303bb07aadc858e6d91e22f7de5a0bf7b95 Mon Sep 17 00:00:00 2001 From: evevkovacs Date: Fri, 24 Aug 2018 10:13:50 -0700 Subject: [PATCH 1/3] Changes for readiness and sky area tests to run on baseDC2 and cosmoDC2 --- descqa/configs/SkyArea_hires.yaml | 4 +++ descqa/configs/readiness_baseDC2.yaml | 32 ++++++++++++------------ descqa/configs/readiness_cosmoDC2.yaml | 34 +++++++++++++------------- descqa/readiness_test.py | 11 +++++++-- 4 files changed, 46 insertions(+), 35 deletions(-) create mode 100644 descqa/configs/SkyArea_hires.yaml diff --git a/descqa/configs/SkyArea_hires.yaml b/descqa/configs/SkyArea_hires.yaml new file mode 100644 index 00000000..644a5003 --- /dev/null +++ b/descqa/configs/SkyArea_hires.yaml @@ -0,0 +1,4 @@ +subclass_name: basic_test.SkyArea +nside: 2048 +description: Displaying the sky coverage of each catalog +included_by_default: true diff --git a/descqa/configs/readiness_baseDC2.yaml b/descqa/configs/readiness_baseDC2.yaml index 58de56bf..7b82811d 100644 --- a/descqa/configs/readiness_baseDC2.yaml +++ b/descqa/configs/readiness_baseDC2.yaml @@ -5,22 +5,22 @@ included_by_default: true quantities_to_check: - quantities: ['dec_true', 'dec'] label: 'deg' - min: [-36, -35] - max: [-25, -24] - median: [-32, -28] - mean: [-32, -28] - std: [1, 3] + min: [-55, -54] + max: [-20, -19] + median: [-38, -34] + mean: [-38, -34] + std: [5, 10] f_nan: 0 f_inf: 0 f_outlier: 0 - quantities: ['ra_true', 'ra'] label: 'deg' - min: [44, 46] - max: [56, 57] - median: [48, 52] - mean: [48, 52] - std: [1, 3] + min: [39, 40] + max: [84, 85] + median: [60, 64] + mean: [60, 64] + std: [8, 12] f_nan: 0 f_inf: 0 f_outlier: 0 @@ -37,11 +37,11 @@ quantities_to_check: f_outlier: [0, 0.001] - quantities: 'shear_*' - min: [-0.2, 0] - max: [0, 0.2] + min: [-0.25, 0] + max: [0, 0.25] median: [-0.01, 0.01] mean: [-0.01, 0.01] - std: [0, 0.01] + std: [0, 0.02] f_nan: 0 f_inf: 0 f_outlier: [0, 0.04] @@ -58,17 +58,17 @@ quantities_to_check: - quantities: 'convergence' min: [-0.4, 0] - max: [0, 0.45] + max: [0, 0.8] median: [-0.01, 0.01] mean: [-0.01, 0.01] - std: [0, 0.02] + std: [0, 0.03] f_nan: 0 f_inf: 0 f_outlier: [0, 0.05] - quantities: 'magnification' min: [0.5, 1] - max: [1, 3] + max: [1, 20] median: [0.5, 1.5] mean: [0.5, 1.5] std: [0, 0.1] diff --git a/descqa/configs/readiness_cosmoDC2.yaml b/descqa/configs/readiness_cosmoDC2.yaml index db3dc2d2..38ab6698 100644 --- a/descqa/configs/readiness_cosmoDC2.yaml +++ b/descqa/configs/readiness_cosmoDC2.yaml @@ -5,22 +5,22 @@ included_by_default: true quantities_to_check: - quantities: ['dec_true', 'dec'] label: 'deg' - min: [-36, -35] - max: [-25, -24] - median: [-32, -28] - mean: [-32, -28] - std: [1, 3] + min: [-55, -54] + max: [-20, -19] + median: [-38, -34] + mean: [-38, -34] + std: [5, 10] f_nan: 0 f_inf: 0 f_outlier: 0 - quantities: ['ra_true', 'ra'] label: 'deg' - min: [44, 46] - max: [56, 57] - median: [48, 52] - mean: [48, 52] - std: [1, 3] + min: [39, 40] + max: [84, 85] + median: [60, 64] + mean: [60, 64] + std: [8, 12] f_nan: 0 f_inf: 0 f_outlier: 0 @@ -81,8 +81,8 @@ quantities_to_check: plot_max: 3 - quantities: 'shear_*' - min: [-0.2, 0] - max: [0, 0.2] + min: [-0.25, 0] + max: [0, 0.25] median: [-0.01, 0.01] mean: [-0.01, 0.01] std: [0, 0.01] @@ -102,17 +102,17 @@ quantities_to_check: - quantities: 'convergence' min: [-0.4, 0] - max: [0, 0.45] + max: [0, 0.8] median: [-0.01, 0.01] mean: [-0.01, 0.01] - std: [0, 0.02] + std: [0, 0.03] f_nan: 0 f_inf: 0 f_outlier: [0, 0.05] - quantities: 'magnification' min: [0.5, 1] - max: [1, 3] + max: [1, 20] median: [0.5, 1.5] mean: [0.5, 1.5] std: [0, 0.1] @@ -170,8 +170,8 @@ quantities_to_check: log: true min: [null, 10] max: [10, 13] - median: [6.5, 9] - mean: [6.5, 9] + median: [5.5, 7] + mean: [5.5, 7] std: [0.5, 1.5] f_nan: 0 f_outlier: [0, 0.025] diff --git a/descqa/readiness_test.py b/descqa/readiness_test.py index 52b9b689..40153aa5 100644 --- a/descqa/readiness_test.py +++ b/descqa/readiness_test.py @@ -138,8 +138,11 @@ def _format_row(self, quantity, plot_filename, results): def run_on_single_catalog(self, catalog_instance, catalog_name, output_dir): - all_quantities = sorted(catalog_instance.list_all_quantities(True)) + #list_of_all_quantities = sorted(map(str,catalog_instance.list_all_quantities(True))) + #using True in the previous statement means that the elements require further parsing to remove the catalog name for composite catalogs + #all_quantities = [re.sub("'", "", q.split(', ')[-1].split(')')[0]) for q in list_of_all_quantities] + all_quantities = sorted(catalog_instance.list_all_quantities()) galaxy_count = None failed_count = 0 output_rows = [] @@ -267,8 +270,12 @@ def run_on_single_catalog(self, catalog_instance, catalog_name, output_dir): output_header.append('{} does not exist!'.format(' or '.join(quantities_needed))) failed_count += 1 continue + + try: + data = catalog_instance.get_quantities(quantities_needed) + except KeyError: + raise ValueError('{} not found'.format(', '.join(quantities_needed))) - data = catalog_instance.get_quantities(quantities_needed) if check_uniqueness(data[quantity], data.get(mask)): output_header.append('{} is all unique'.format(label)) else: From 5e854588049c99acd8d0ebe15245c0f0431e499e Mon Sep 17 00:00:00 2001 From: Yao-Yuan Mao Date: Thu, 18 Oct 2018 23:27:29 -0400 Subject: [PATCH 2/3] remove hack that is no longer needed --- descqa/readiness_test.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/descqa/readiness_test.py b/descqa/readiness_test.py index 78771baa..8e37c098 100644 --- a/descqa/readiness_test.py +++ b/descqa/readiness_test.py @@ -347,12 +347,8 @@ def run_on_single_catalog(self, catalog_instance, catalog_name, output_dir): if not catalog_instance.has_quantities(quantities_needed): self.record_result('{} does not exist'.format(' or '.join(quantities_needed)), failed=True) continue - - try: - data = catalog_instance.get_quantities(quantities_needed) - except KeyError: - raise ValueError('{} not found'.format(', '.join(quantities_needed))) + data = catalog_instance.get_quantities(quantities_needed) if check_uniqueness(data[quantity], data.get(mask)): self.record_result('{} is all unique'.format(label)) else: From 06c72a0a7c49f297ccece7a48e3b11d01090d159 Mon Sep 17 00:00:00 2001 From: Yao-Yuan Mao Date: Thu, 18 Oct 2018 23:28:12 -0400 Subject: [PATCH 3/3] remove trailing spaces --- descqa/configs/readiness_cosmoDC2.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/descqa/configs/readiness_cosmoDC2.yaml b/descqa/configs/readiness_cosmoDC2.yaml index f8cb9847..9279efdb 100644 --- a/descqa/configs/readiness_cosmoDC2.yaml +++ b/descqa/configs/readiness_cosmoDC2.yaml @@ -5,10 +5,10 @@ included_by_default: true quantities_to_check: - quantities: ['dec_true', 'dec'] label: 'deg' - min: [-55, -54] - max: [-20, -19] - median: [-38, -34] - mean: [-38, -34] + min: [-55, -54] + max: [-20, -19] + median: [-38, -34] + mean: [-38, -34] std: [5, 10] f_nan: 0 f_inf: 0