From c446c02364e8ee1d81f30b9070b7ed1f34b3f79f Mon Sep 17 00:00:00 2001 From: Katie Harrington Date: Sun, 12 Jul 2026 16:00:03 +0000 Subject: [PATCH 1/6] allow other types of non-monotonic fields --- pyproject.toml | 2 +- sotodlib/io/imprinter_cli.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c4a5d8d3f..908ed8403 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ classifiers = [ [project.optional-dependencies] site_pipeline = [ - "influxdb", + "influxdb-client", "venn", "sodetlib", "let-me-scroll-it", diff --git a/sotodlib/io/imprinter_cli.py b/sotodlib/io/imprinter_cli.py index 5a2b6c9d8..394af9757 100644 --- a/sotodlib/io/imprinter_cli.py +++ b/sotodlib/io/imprinter_cli.py @@ -398,6 +398,10 @@ def report_error(self): class NonMonotonicAncillaryTimes(BookError): fields_to_fix = { "acu.acu_status.Azimuth_mode": 5, + "acu.acu_udp_stream.Corrected_Azimuth": 5, + "acu.acu_udp_stream.Corrected_Elevation": 5, + "acu.acu_udp_stream.Corrected_Boresight": 5, + "acu.acu_status.Corotator_current_position": 5, } n_samps = None field_dropped = None From 5f62e313cf6406447fca668a1c90fcdf727b202a Mon Sep 17 00:00:00 2001 From: Katie Harrington Date: Sun, 12 Jul 2026 17:11:59 +0000 Subject: [PATCH 2/6] add hk suprsync to the list --- sotodlib/io/datapkg_completion.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sotodlib/io/datapkg_completion.py b/sotodlib/io/datapkg_completion.py index 8d2c27ec6..abbd590bd 100644 --- a/sotodlib/io/datapkg_completion.py +++ b/sotodlib/io/datapkg_completion.py @@ -111,18 +111,19 @@ def get_suprsync_files(self, timecode): return [] stc = os.path.join(self.SMURF.meta_path, str(timecode)) ttc = os.path.join(self.SMURF.archive_path, str(timecode)) + htc = os.path.join(self.HK.hkarchive_path, str(timecode)) flist = [] if not os.path.exists(stc) and not os.path.exists(ttc): return flist - if os.path.exists(ttc) and 'suprsync' in os.listdir(ttc): - for root, _, files in os.walk(os.path.join(ttc, 'suprsync')): - for name in files: - flist.append(os.path.join(ttc, root, name)) - if os.path.exists(stc) and 'suprsync' in os.listdir(stc): - for root, _, files in os.walk(os.path.join(stc, 'suprsync')): - for name in files: - flist.append(os.path.join(stc, root, name)) + for tc_root in [stc, ttc, htc]: + if os.path.exists(tc_root) and 'suprsync' in os.listdir(tc_root): + for root, _, files in os.walk( + os.path.join(tc_root, 'suprsync') + ): + for name in files: + flist.append(os.path.join(tc_root, root, name)) + return flist def check_hk_registered(self, timecode, complete): From 77e4fbad6f264e67592ed1504652c7dfd35bdd69 Mon Sep 17 00:00:00 2001 From: Katie Harrington Date: Sun, 12 Jul 2026 17:29:21 +0000 Subject: [PATCH 3/6] revert dependency change --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 908ed8403..c4a5d8d3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ classifiers = [ [project.optional-dependencies] site_pipeline = [ - "influxdb-client", + "influxdb", "venn", "sodetlib", "let-me-scroll-it", From dbf4c46f96428b2a90c1a59625f0ab90c01eb7a2 Mon Sep 17 00:00:00 2001 From: Katie Harrington Date: Sun, 12 Jul 2026 17:45:47 +0000 Subject: [PATCH 4/6] missed an important return statement --- sotodlib/io/imprinter_cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sotodlib/io/imprinter_cli.py b/sotodlib/io/imprinter_cli.py index 394af9757..6411f59c6 100644 --- a/sotodlib/io/imprinter_cli.py +++ b/sotodlib/io/imprinter_cli.py @@ -347,7 +347,9 @@ def fix_book(self): if np.all([x<=self.max_drops_to_fix for x in self.dropped.values()]): utils.set_book_rebind(self.imprint, self.book) self.imprint.bind_book(self.book, allow_bad_timing=True,) - + if self.book.status == BOUND: + return ## simple fix complete + ## if any observations are over the limit, double check it's not a ## SMURF database error dropped_oids = [k for k,x in self.dropped.items() @@ -384,7 +386,7 @@ def fix_book(self): for oid in remove_oid: self.book = utils.remove_level2_obs_from_book( self.imprint, self.book, oid - ) + ) def report_error(self): msg = f"{self.book.bid} has dropped time samples\n" From 79f407cc43155059e27339378f5238960be34d63 Mon Sep 17 00:00:00 2001 From: Katie Harrington Date: Sun, 12 Jul 2026 18:15:35 +0000 Subject: [PATCH 5/6] missed an import --- sotodlib/io/imprinter_cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sotodlib/io/imprinter_cli.py b/sotodlib/io/imprinter_cli.py index 6411f59c6..e020c4218 100644 --- a/sotodlib/io/imprinter_cli.py +++ b/sotodlib/io/imprinter_cli.py @@ -20,7 +20,10 @@ from typing import Optional import sotodlib.io.bookbinder as bbinder -from sotodlib.io.imprinter import Imprinter, Books, FAILED +from sotodlib.io.imprinter import ( + Imprinter, Books, + FAILED, BOUND +) import sotodlib.io.imprinter_utils as utils def fix_single_book(imprint:Imprinter, book:Books): From 0ef696bf9585f241742e34c13d3255349bad09de Mon Sep 17 00:00:00 2001 From: Katie Harrington Date: Mon, 13 Jul 2026 21:48:24 +0000 Subject: [PATCH 6/6] cleanup hk suprsync as well --- sotodlib/io/datapkg_completion.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sotodlib/io/datapkg_completion.py b/sotodlib/io/datapkg_completion.py index abbd590bd..39f3010cc 100644 --- a/sotodlib/io/datapkg_completion.py +++ b/sotodlib/io/datapkg_completion.py @@ -114,8 +114,6 @@ def get_suprsync_files(self, timecode): htc = os.path.join(self.HK.hkarchive_path, str(timecode)) flist = [] - if not os.path.exists(stc) and not os.path.exists(ttc): - return flist for tc_root in [stc, ttc, htc]: if os.path.exists(tc_root) and 'suprsync' in os.listdir(tc_root): for root, _, files in os.walk( @@ -753,11 +751,10 @@ def cleanup_level2_folders(self, timecode): return stc = os.path.join(self.SMURF.meta_path, str(timecode)) ttc = os.path.join(self.SMURF.archive_path, str(timecode)) - - if os.path.exists(stc): - if len(os.listdir(stc)) == 0 or just_suprsync(stc): - shutil.rmtree(stc) - if os.path.exists(ttc): - if len(os.listdir(ttc)) == 0 or just_suprsync(ttc): - shutil.rmtree(ttc) + htc = os.path.join(self.HK.hkarchive_path, str(timecode)) + + for tc_root in [stc, ttc, htc]: + if os.path.exists(tc_root): + if len(os.listdir(tc_root)) == 0 or just_suprsync(tc_root): + shutil.rmtree(tc_root) return