From 341a43f7bdb445e7f953297cd3f1e8de4c3dbb3b Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Mon, 13 Nov 2023 17:40:59 -0800 Subject: [PATCH 1/3] Add debug log for refcat HTMs. The HTMs are difficult to derive by hand from the next_visit metadata, but are essential to debugging refcat loading problems. --- python/activator/middleware_interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/activator/middleware_interface.py b/python/activator/middleware_interface.py index b97be87f..4b99b62d 100644 --- a/python/activator/middleware_interface.py +++ b/python/activator/middleware_interface.py @@ -430,6 +430,7 @@ def _export_refcats(self, center, radius): # with another solution ASAP. possible_refcats = ["gaia", "panstarrs", "gaia_dr2_20200414", "ps1_pv3_3pi_20170110", "atlas_refcat2_20220201", "gaia_dr3_20230707"] + _log.debug("Searching for refcats in %s...", shard_ids) refcats = set(_filter_datasets( self.central_butler, self.butler, possible_refcats, From 2f18184626b5451375e0062c1b2dc2d571fafd99 Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Mon, 13 Nov 2023 19:20:41 -0800 Subject: [PATCH 2/3] Add debug log for template patches. The tract and patch are difficult to derive by hand from the nextVisit metadata, but are essential to debugging template loading problems. --- python/activator/middleware_interface.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/activator/middleware_interface.py b/python/activator/middleware_interface.py index 4b99b62d..b204508c 100644 --- a/python/activator/middleware_interface.py +++ b/python/activator/middleware_interface.py @@ -482,6 +482,7 @@ def _export_skymap_and_templates(self, center, detector, wcs, filter): # specified as a class kwarg, so that we only load one here? # TODO: alternately, we need to extract it from the pipeline? (best?) try: + _log.debug("Searching for templates in tract %d, patches %s...", tract.tract_id, patches_str) templates = set(_filter_datasets( self.central_butler, self.butler, "*Coadd", From dab60ae074176cdd983bc016884cf6d4874084e4 Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Tue, 14 Nov 2023 18:42:16 -0800 Subject: [PATCH 3/3] Improve documentation for Visit fields. Many fields have different meanings from Butler or RubinTV fields of the same names; explain the known differences. --- python/activator/visit.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/python/activator/visit.py b/python/activator/visit.py index 7d981346..d42dc8f6 100644 --- a/python/activator/visit.py +++ b/python/activator/visit.py @@ -54,9 +54,12 @@ class Dome(enum.IntEnum): OPEN = 2 EITHER = 3 - salIndex: int # this maps to an instrument + # script queue that generated the event. One queue usually runs one telescope, but they can switch + salIndex: int scriptSalIndex: int - groupId: str # observatory-specific ID; not the same as visit number + # Observatory-specific ID. Same as Butler's group_name, not the same as + # Butler's group_id or visit number + groupId: str coordinateSystem: CoordSys # coordinate system of position # (ra, dec) or (az, alt) in degrees. Use compare=False to exclude from hash. position: list[float] = field(compare=False) @@ -104,11 +107,11 @@ def get_bare_visit(self): @dataclass(frozen=True, kw_only=True) class SummitVisit(BareVisit): # Extra fields are in the NextVisit messages from the summit - private_efdStamp: float = 0.0 + private_efdStamp: float = 0.0 # time of visit publication; UTC in unix seconds private_kafkaStamp: float = 0.0 private_identity: str = "ScriptQueue" private_revCode: str = "c9aab3df" private_origin: int = 0 - private_seqNum: int = 0 + private_seqNum: int = 0 # counts script calls since queue start. Not the same as Butler seq_num private_rcvStamp: float = 0.0 - private_sndStamp: float = 0.0 + private_sndStamp: float = 0.0 # time of visit publication; TAI in unix seconds