From 32facf2517e3567dc1770d55243e4981798a2f13 Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Fri, 19 Jan 2024 16:37:41 +0000 Subject: [PATCH 1/2] Adjust collection labelling --- src/viresclient/__init__.py | 2 +- src/viresclient/_client_swarm.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/viresclient/__init__.py b/src/viresclient/__init__.py index 4dc4284..0ce4b88 100644 --- a/src/viresclient/__init__.py +++ b/src/viresclient/__init__.py @@ -35,4 +35,4 @@ from ._config import ClientConfig, set_token from ._data_handling import ReturnedData, ReturnedDataFile -__version__ = "0.11.5" +__version__ = "0.11.6" diff --git a/src/viresclient/_client_swarm.py b/src/viresclient/_client_swarm.py index 9517b59..1a86215 100644 --- a/src/viresclient/_client_swarm.py +++ b/src/viresclient/_client_swarm.py @@ -308,11 +308,9 @@ def collection_ids(self, collection_ids): @staticmethod def _spacecraft_from_collection(collection): """Identify spacecraft (or ground observatory name) from collection name.""" - if "AUX_OBS" in collection: - name = "AUX_OBS" - if ":" in collection: - name = f"{name}:{collection[19:22]}" - elif collection[:3] == "SW_": + if "AUX_OBS" in collection or "VOBS" in collection: + name = collection + elif (collection[:3] == "SW_"): # 12th character in name, e.g. SW_OPER_MAGx_LR_1B sc = collection[11] sc_to_name = {"A": "Alpha", "B": "Bravo", "C": "Charlie"} From e97de2dff504f9e6f7281f6382dc86d39e5354e8 Mon Sep 17 00:00:00 2001 From: Ashley Smith Date: Fri, 19 Jan 2024 16:43:43 +0000 Subject: [PATCH 2/2] Format fix --- src/viresclient/_client_swarm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viresclient/_client_swarm.py b/src/viresclient/_client_swarm.py index 1a86215..ed187c7 100644 --- a/src/viresclient/_client_swarm.py +++ b/src/viresclient/_client_swarm.py @@ -310,7 +310,7 @@ def _spacecraft_from_collection(collection): """Identify spacecraft (or ground observatory name) from collection name.""" if "AUX_OBS" in collection or "VOBS" in collection: name = collection - elif (collection[:3] == "SW_"): + elif collection[:3] == "SW_": # 12th character in name, e.g. SW_OPER_MAGx_LR_1B sc = collection[11] sc_to_name = {"A": "Alpha", "B": "Bravo", "C": "Charlie"}