From 5a207dbf5e248e1d9c12c196c2f1d73bde973bad Mon Sep 17 00:00:00 2001 From: Matthew Evans Date: Fri, 13 Jun 2025 16:29:21 +0100 Subject: [PATCH] Add guard for combinatorially exploring more than 3 unknown column data types --- galvani/BioLogic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/galvani/BioLogic.py b/galvani/BioLogic.py index aa72045..428dd9f 100644 --- a/galvani/BioLogic.py +++ b/galvani/BioLogic.py @@ -632,6 +632,8 @@ class MPRfile: for col, _ in dtypes: if col.startswith("unknown_colID"): unknown_cols.append(col) + if len(unknown_cols) > 3: + raise RuntimeError("Too many unknown columns to attempt to read combinatorially: %s" % unknown_cols) if unknown_cols: # create a list of all possible combinations of dtypes