From 44495bea67626b679ef9b341bec46b677a7a3bea Mon Sep 17 00:00:00 2001
From: ldam <ldam@passcal.nmt.edu>
Date: Wed, 26 Feb 2025 11:19:17 -0700
Subject: [PATCH] fix bug using mpzne in place for mpabc in check_masspos()

---
 sohstationviewer/view/util/functions.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sohstationviewer/view/util/functions.py b/sohstationviewer/view/util/functions.py
index 3efa2258..75d54dc7 100644
--- a/sohstationviewer/view/util/functions.py
+++ b/sohstationviewer/view/util/functions.py
@@ -225,14 +225,15 @@ def check_masspos(mp_data: Dict[str, Dict],
     if include_mp123:
         req_mp123 = []              # represent 123/zne/abc
         mp123 = ['1', '2', '3']
-        mpzne = ['E', 'N', 'Z']
+        mpzne = ['Z', 'N', 'E']
         mpabc = ['A', 'B', 'C']
+        if any(chan in mp123 for chan in included_mp):
+            req_mp123 += mp123
         if any(chan in mpzne for chan in included_mp):
             req_mp123 += mpzne
-        if any(chan in mpzne for chan in included_mp):
+        if any(chan in mpabc 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
-- 
GitLab