diff --git a/sohstationviewer/view/util/functions.py b/sohstationviewer/view/util/functions.py index 3eae9a6e5fe8222e223c247b09a1999efbbd4270..3efa225889f327768bbf55df0a2e40582c17e41c 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]