diff --git a/geomagio/edge/SNCL.py b/geomagio/edge/SNCL.py index e137b2b163e5f5b44688774b2dd9b62a2c000468..88e012e9bb31b85cd92c78fd6043e1a421546d96 100644 --- a/geomagio/edge/SNCL.py +++ b/geomagio/edge/SNCL.py @@ -9,6 +9,11 @@ ELEMENT_CONVERSIONS = { # derived indicies "Dst3": "X3", "Dst4": "X4", + # temperatures + "T1": "K1", + "T2": "K2", + "T3": "K3", + "T4": "K4", } CHANNEL_CONVERSIONS = { diff --git a/test/edge_test/SNCL_test.py b/test/edge_test/SNCL_test.py index 0ce923683a3dae72e4fdbd9d9df1e6dafe1659a0..d22b13629cab268feee93c67897627e19ad470b2 100644 --- a/test/edge_test/SNCL_test.py +++ b/test/edge_test/SNCL_test.py @@ -102,6 +102,38 @@ def test_element(): ).element == "U_Sat" ) + assert ( + SNCL( + station="BOU", + channel="UK1", + location="R0", + ).element + == "T1" + ) + assert ( + SNCL( + station="BOU", + channel="UK2", + location="R0", + ).element + == "T2" + ) + assert ( + SNCL( + station="BOU", + channel="UK3", + location="R0", + ).element + == "T3" + ) + assert ( + SNCL( + station="BOU", + channel="UK4", + location="R0", + ).element + == "T4" + ) def test_get_channel(): @@ -161,6 +193,10 @@ def test_get_channel(): assert ( get_channel(element="UK1.R0", interval="minute", data_type="variation") == "UK1" ) + assert get_channel(element="T1", interval="minute", data_type="variation") == "UK1" + assert get_channel(element="T2", interval="minute", data_type="variation") == "UK2" + assert get_channel(element="T3", interval="minute", data_type="variation") == "UK3" + assert get_channel(element="T4", interval="minute", data_type="variation") == "UK4" def test_get_location(): @@ -197,6 +233,9 @@ def test_get_sncl(): assert SNCL.get_sncl( station="BOU", data_type="A0", interval="second", element="H" ) == SNCL(station="BOU", network="NT", channel="LFH", location="A0") + assert SNCL.get_sncl( + station="BOU", data_type="variation", interval="second", element="T1" + ) == SNCL(station="BOU", network="NT", channel="LK1", location="R0") def test_interval(): @@ -241,6 +280,22 @@ def test_interval(): ).interval == "day" ) + assert ( + SNCL( + station="BOU", + channel="UK1", + location="R0", + ).interval + == "minute" + ) + assert ( + SNCL( + station="BOU", + channel="LK1", + location="R0", + ).interval + == "second" + ) def test_parse_sncl():