From 1e2b19c82ae271480fc9f6344786d56d012ba282 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 02:56:11 +0000 Subject: [PATCH 1/3] Initial plan From d798e534f7baad154f28319d30ee0ff8a606bf3e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Feb 2026 03:01:06 +0000 Subject: [PATCH 2/3] Fix operator precedence bug in getBathyTransectFromNC idx assignment Co-authored-by: SBFRF <8375832+SBFRF@users.noreply.github.com> --- murgtools/getdata/getDataFRF.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/murgtools/getdata/getDataFRF.py b/murgtools/getdata/getDataFRF.py index 9e5de28..30eb789 100755 --- a/murgtools/getdata/getDataFRF.py +++ b/murgtools/getdata/getDataFRF.py @@ -971,8 +971,7 @@ def getBathyTransectFromNC(self, profilenumbers=None, method=1, forceReturnAll=F elif np.size(self.bathydataindex) == 1 and self.bathydataindex is not None: # identifed single survey point that fits time window idx = self.bathydataindex - elif ((np.size(self.bathydataindex) < 1) or (self.bathydataindex is None) & method == 1) or ( - self.bathydataindex is None and method == 1): + elif ((np.size(self.bathydataindex) < 1) or (self.bathydataindex is None)) and method == 1: # there's no exact bathy match so find the closest in history # find the max negative number where the negative numbers are historical and the max would be the # closest historical @@ -980,8 +979,7 @@ def getBathyTransectFromNC(self, profilenumbers=None, method=1, forceReturnAll=F val = (max([n for n in (temp - self.epochd1) if n < 0])) idx = np.where((temp - self.epochd1) == val)[0][0] + indexRef[0] - elif ((np.size(self.bathydataindex) < 1) or (self.bathydataindex is None) and method == 0) or ( - self.bathydataindex is None and method == 1): + elif ((np.size(self.bathydataindex) < 1) or (self.bathydataindex is None)) and method == 0: # no exact bathy, find the closest in time temp = self.ncfile['time'][indexRef[0]:indexRef[1]] idx = np.argmin(np.abs(temp - self.epochd1)) + indexRef[0] # closest in time From c25d16ff39a553bcfc1d3b6fdb248fa099ecff7e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Feb 2026 00:25:46 +0000 Subject: [PATCH 3/3] Reorder None check first and fix typo in comment Co-authored-by: SBFRF <8375832+SBFRF@users.noreply.github.com> --- murgtools/getdata/getDataFRF.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/murgtools/getdata/getDataFRF.py b/murgtools/getdata/getDataFRF.py index 30eb789..4652308 100755 --- a/murgtools/getdata/getDataFRF.py +++ b/murgtools/getdata/getDataFRF.py @@ -969,9 +969,9 @@ def getBathyTransectFromNC(self, profilenumbers=None, method=1, forceReturnAll=F # return everything found in window idx = self.bathydataindex elif np.size(self.bathydataindex) == 1 and self.bathydataindex is not None: - # identifed single survey point that fits time window + # identified single survey point that fits time window idx = self.bathydataindex - elif ((np.size(self.bathydataindex) < 1) or (self.bathydataindex is None)) and method == 1: + elif ((self.bathydataindex is None) or (np.size(self.bathydataindex) < 1)) and method == 1: # there's no exact bathy match so find the closest in history # find the max negative number where the negative numbers are historical and the max would be the # closest historical @@ -979,7 +979,7 @@ def getBathyTransectFromNC(self, profilenumbers=None, method=1, forceReturnAll=F val = (max([n for n in (temp - self.epochd1) if n < 0])) idx = np.where((temp - self.epochd1) == val)[0][0] + indexRef[0] - elif ((np.size(self.bathydataindex) < 1) or (self.bathydataindex is None)) and method == 0: + elif ((self.bathydataindex is None) or (np.size(self.bathydataindex) < 1)) and method == 0: # no exact bathy, find the closest in time temp = self.ncfile['time'][indexRef[0]:indexRef[1]] idx = np.argmin(np.abs(temp - self.epochd1)) + indexRef[0] # closest in time