From 5266cebabda05f73c67bdd255de38052a2ca8263 Mon Sep 17 00:00:00 2001
From: ldam <ldam@passcal.nmt.edu>
Date: Wed, 26 Feb 2025 10:33:05 -0700
Subject: [PATCH] separate in to group 123, enz, abc; 456, uvw to give warning
 if there's some channels not in the group

---
 sohstationviewer/view/util/functions.py | 28 +++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/sohstationviewer/view/util/functions.py b/sohstationviewer/view/util/functions.py
index 3eae9a6e..3efa2258 100644
--- a/sohstationviewer/view/util/functions.py
+++ b/sohstationviewer/view/util/functions.py
@@ -223,9 +223,33 @@ def check_masspos(mp_data: Dict[str, Dict],
     req_mp = []
 
     if include_mp123:
-        req_mp += ['1', '2', '3']
+        req_mp123 = []              # represent 123/zne/abc
+        mp123 = ['1', '2', '3']
+        mpzne = ['E', 'N', 'Z']
+        mpabc = ['A', 'B', 'C']
+        if any(chan in mpzne for chan in included_mp):
+            req_mp123 += mpzne
+        if any(chan in mpzne for chan in included_mp):
+            req_mp123 += mpabc
+        if any(chan in mp123 for chan in included_mp):
+            req_mp123 += mp123
+        if req_mp123 == []:
+            # if none of 123/zne/abc, just report 123
+            req_mp123 += mp123
+        req_mp += req_mp123
+
     if include_mp456:
-        req_mp += ['4', '5', '6']
+        req_mp456 = []              # represent 456/uvw
+        mp456 = ['4', '5', '6']
+        mpuvw = ['U', 'V', 'W']
+        if any(chan in mp456 for chan in included_mp):
+            req_mp456 += mp456
+        if any(chan in mpuvw for chan in included_mp):
+            req_mp456 += mpuvw
+        if req_mp456 == []:
+            # if none of 456/uvw, just report 456
+            req_mp456 += mp456
+        req_mp += req_mp456
 
     not_included_mp = [mp for mp in req_mp if mp not in included_mp]
 
-- 
GitLab