From 0e5229e2ebd3ec036588f1ebca5da4766ae9c6e7 Mon Sep 17 00:00:00 2001 From: Hsin-Fang Chiang Date: Tue, 18 Apr 2023 16:09:08 -0700 Subject: [PATCH] Avoid picking narrow band visits in upload_hsc_rc2.py ap_association does not work with narrow bands. --- python/tester/upload_hsc_rc2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/tester/upload_hsc_rc2.py b/python/tester/upload_hsc_rc2.py index 58a778b4..47507a1b 100644 --- a/python/tester/upload_hsc_rc2.py +++ b/python/tester/upload_hsc_rc2.py @@ -92,13 +92,14 @@ def get_hsc_visit_list(butler, n_sample): Returns ------- visits : `list` [`int`] - A list of randomly selected visit IDs from the HSC-RC2 dataset + A list of randomly selected non-narrow-band visit IDs from the HSC-RC2 dataset """ results = butler.registry.queryDimensionRecords( "visit", datasets="raw", collections="HSC/RC2/defaults", - where="instrument='HSC' and exposure.observation_type='science'", + where="instrument='HSC' and exposure.observation_type='science' " + "and band in ('g', 'r', 'i', 'z', 'y')", ) rc2 = [record.id for record in set(results)] if n_sample > len(rc2):