From 0d8dbbccf20b51db0e6deab4166a65c29b12cdd3 Mon Sep 17 00:00:00 2001 From: jmcvey3 <53623232+jmcvey3@users.noreply.github.com> Date: Wed, 5 Aug 2026 12:16:33 -0700 Subject: [PATCH 1/2] Edge case for datafiles with odd number of bins --- mhkit/dolfyn/io/nortek.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mhkit/dolfyn/io/nortek.py b/mhkit/dolfyn/io/nortek.py index c33cbb18..5e2d747c 100644 --- a/mhkit/dolfyn/io/nortek.py +++ b/mhkit/dolfyn/io/nortek.py @@ -925,11 +925,12 @@ def read_profile(self, skip_bytes=0): """Reads AWAC or Aquadopp profile data""" dat = self.data nbins = self.config["usr"]["n_bins"] + n = self.config["usr"]["n_beams"] init_bytes = 28 + skip_bytes # Note: docs state there is 'fill' byte at the end, if nbins is odd, - # but doesn't appear to be the case - n = self.config["usr"]["n_beams"] - byts = self.read(init_bytes + n * 3 * nbins) + # but doesn't appear to always be the case + fill_byte = 1 if (nbins % 2) else 0 + byts = self.read(init_bytes + n * 3 * nbins + fill_byte) c = self.c dat["coords"]["time"][c] = lib.rd_time(byts[2:8]) ds = dat["sys"] From c5212e19a3e7333ea546edea8dcacd9e12866164 Mon Sep 17 00:00:00 2001 From: "Simms, Andrew" Date: Thu, 6 Aug 2026 15:52:15 -0400 Subject: [PATCH 2/2] Release: v1.1.1 dolfyn nortek profiling bin odd number hotfix --- mhkit/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mhkit/__init__.py b/mhkit/__init__.py index 0d248d50..c1c1f3e1 100644 --- a/mhkit/__init__.py +++ b/mhkit/__init__.py @@ -11,7 +11,7 @@ configure_warnings() -__version__ = "v1.1.0" +__version__ = "v1.1.1" __copyright__ = """ Copyright 2019, Alliance for Energy Innovation, LLC under the terms of