From 2d416a8342cd4aeb4a050dd1d42a1fa4de6855d4 Mon Sep 17 00:00:00 2001 From: bruno-f-cruz <7049351+bruno-f-cruz@users.noreply.github.com> Date: Tue, 5 May 2026 12:26:31 -0700 Subject: [PATCH] Drop private registers at reader constructor --- src/contraqctor/contract/harp.py | 3 +-- src/contraqctor/qc/harp/lickety_split.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/contraqctor/contract/harp.py b/src/contraqctor/contract/harp.py index 616a8d4..13537b7 100644 --- a/src/contraqctor/contract/harp.py +++ b/src/contraqctor/contract/harp.py @@ -252,8 +252,6 @@ def _harp_device_reader( for name, reg_reader in reader.registers.items(): # todo we can add custom file name interpolation here register = HarpRegister.from_register_reader(name, reg_reader, _DEFAULT_HARP_READER_PARAMS) - if (not params.show_private) and (reg_reader.register.visibility == Visibility.private): - continue data_streams.append(register) return (data_streams, reader) @@ -278,6 +276,7 @@ def _make_device_reader(yml_stream: str | os.PathLike | TextIO, params: HarpDevi HarpRegisterParams(base_path=base_path, epoch=params.epoch, keep_type=params.keep_type), ) for name in device.registers.keys() + if params.show_private or device.registers[name].visibility != Visibility.private } return harp.reader.DeviceReader(device, reg_readers) diff --git a/src/contraqctor/qc/harp/lickety_split.py b/src/contraqctor/qc/harp/lickety_split.py index af550c2..075c1ef 100644 --- a/src/contraqctor/qc/harp/lickety_split.py +++ b/src/contraqctor/qc/harp/lickety_split.py @@ -13,6 +13,7 @@ @dataclass(frozen=True) class _LickDurationMetrics: """Data class for metrics related to lick duration analysis.""" + mean: float | None std: float | None percent_violations: float