diff --git a/geomagio/ObservatoryMetadata.py b/geomagio/ObservatoryMetadata.py index 735a232998d7deb57a7ed7a766c5c33b6e1b9528..91fcd14cb3467cf71c95101dabd479aa76ada798 100644 --- a/geomagio/ObservatoryMetadata.py +++ b/geomagio/ObservatoryMetadata.py @@ -38,7 +38,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "40.137", "geodetic_longitude": "254.763", "elevation": "1682", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 5527, "is_gin": False, @@ -57,7 +57,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "40.137", "geodetic_longitude": "254.763", "elevation": "1682", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 5527, "is_gin": False, @@ -76,7 +76,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "40.137", "geodetic_longitude": "254.763", "elevation": "1682", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 10000.0, "declination_base": 5527, "is_gin": False, @@ -95,7 +95,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "71.322", "geodetic_longitude": "203.378", "elevation": "10", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 10589, "is_gin": False, @@ -114,7 +114,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "71.322", "geodetic_longitude": "203.378", "elevation": "10", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 10000.0, "declination_base": 10589, "is_gin": False, @@ -133,7 +133,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "30.350", "geodetic_longitude": "270.365", "elevation": "8", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 215772, "is_gin": False, @@ -152,7 +152,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "64.874", "geodetic_longitude": "212.140", "elevation": "197", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 12151, "is_gin": False, @@ -171,7 +171,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "64.874", "geodetic_longitude": "212.140", "elevation": "197", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 10000.0, "declination_base": 12151, "is_gin": False, @@ -190,7 +190,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "70.355", "geodetic_longitude": "211.207", "elevation": "10", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 10755, "is_gin": False, @@ -209,7 +209,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "70.355", "geodetic_longitude": "211.207", "elevation": "10", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 10000.0, "declination_base": 10755, "is_gin": False, @@ -228,7 +228,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "38.205", "geodetic_longitude": "282.627", "elevation": "69", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 209690, "is_gin": False, @@ -247,7 +247,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "38.205", "geodetic_longitude": "282.627", "elevation": "69", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 209690, "is_gin": False, @@ -266,7 +266,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "37.091", "geodetic_longitude": "240.282", "elevation": "331", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 8097, "is_gin": False, @@ -285,7 +285,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "13.588", "geodetic_longitude": "144.867", "elevation": "140", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 764, "is_gin": False, @@ -304,7 +304,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "13.588", "geodetic_longitude": "144.867", "elevation": "140", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 764, "is_gin": False, @@ -323,7 +323,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "21.316", "geodetic_longitude": "202.000", "elevation": "4", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 5982, "is_gin": False, @@ -342,7 +342,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "21.316", "geodetic_longitude": "202.000", "elevation": "4", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 5982, "is_gin": False, @@ -361,8 +361,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "36.232", "geodetic_longitude": "140.186", "elevation": "36", - "sensor_orientation": "HDZF", - "reported": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 0.01, "declination_base": None, "is_gin": False, @@ -381,7 +380,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "48.265", "geodetic_longitude": "242.878", "elevation": "770", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 9547, "is_gin": False, @@ -400,7 +399,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "55.348", "geodetic_longitude": "199.538", "elevation": "80", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 7386, "is_gin": False, @@ -419,7 +418,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "57.058", "geodetic_longitude": "224.675", "elevation": "24", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 12349, "is_gin": False, @@ -438,7 +437,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "18.113", "geodetic_longitude": "293.849", "elevation": "424", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 208439, "is_gin": False, @@ -457,7 +456,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "18.113", "geodetic_longitude": "293.849", "elevation": "424", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 208439, "is_gin": False, @@ -476,7 +475,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "32.174", "geodetic_longitude": "249.267", "elevation": "946", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": 5863, "is_gin": False, @@ -495,7 +494,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "40.137", "geodetic_longitude": "254.764", "elevation": "1682", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -514,8 +513,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "64.300", "geodetic_longitude": "264.000", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -534,8 +532,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "49.600", "geodetic_longitude": "262.900", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -554,8 +551,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "69.200", "geodetic_longitude": "255.000", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -574,8 +570,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "55.300", "geodetic_longitude": "282.300", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -594,8 +589,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "58.800", "geodetic_longitude": "265.900", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -614,8 +608,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "51.000", "geodetic_longitude": "355.500", "elevation": "0", - "sensor_orientation": "HDZF", - "reported": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -634,8 +627,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "-34.400", "geodetic_longitude": "19.200", "elevation": "0", - "sensor_orientation": "HDZF", - "reported": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -654,8 +646,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "63.800", "geodetic_longitude": "291.500", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -674,8 +665,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "54.600", "geodetic_longitude": "246.700", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -694,8 +684,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "45.400", "geodetic_longitude": "284.500", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -714,8 +703,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "74.700", "geodetic_longitude": "265.100", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -734,8 +722,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "62.400", "geodetic_longitude": "245.500", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -754,8 +741,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "47.600", "geodetic_longitude": "307.300", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -774,8 +760,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "48.600", "geodetic_longitude": "236.600", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, @@ -794,8 +779,7 @@ DEFAULT_METADATA = { "geodetic_latitude": "62.400", "geodetic_longitude": "245.500", "elevation": "0", - "sensor_orientation": "XYZF", - "reported": "XYZF", + "sensor_orientation": "XYZ", "sensor_sampling_rate": 100.0, "declination_base": None, "is_gin": False, diff --git a/geomagio/api/ws/Observatory.py b/geomagio/api/ws/Observatory.py index 28f148650e7bd4e0db21680ed04013c5244a4cce..158e1b4d9dc0de7ab76852fdd2ecfae12a1ac578 100644 --- a/geomagio/api/ws/Observatory.py +++ b/geomagio/api/ws/Observatory.py @@ -62,7 +62,7 @@ class Observatory(BaseModel): if agency == "GSC": sensor_orientation = "XYZF" else: - sensor_orientation = "HDZF" + sensor_orientation = "HDZ" return sensor_orientation def geojson(self) -> Dict: diff --git a/test/ObservatoryMetadata_test.py b/test/ObservatoryMetadata_test.py index ca3d5ada427824296aef9b8547a27b8c828a5448..795a0128e7129645455b5da3064a0b586347e4de 100644 --- a/test/ObservatoryMetadata_test.py +++ b/test/ObservatoryMetadata_test.py @@ -13,7 +13,7 @@ METADATA = { "geodetic_latitude": "-90", "geodetic_longitude": "-180", "elevation": "-1000", - "sensor_orientation": "HDZF", + "sensor_orientation": "HDZ", "sensor_sampling_rate": "0.01 second", "declination_base": 20000, "is_gin": False, diff --git a/test/api_test/ws_test/observatories_test.py b/test/api_test/ws_test/observatories_test.py index 807d7d0e346128b49cc3676a8329457afb6b253e..dbe95cda17342936a88b3c6080f6c156907dd2b3 100644 --- a/test/api_test/ws_test/observatories_test.py +++ b/test/api_test/ws_test/observatories_test.py @@ -34,7 +34,7 @@ def test_get_observatory_by_id(): assert body["properties"]["name"] == "Sitka" assert body["properties"]["agency"] == "USGS" assert body["properties"]["agency_name"] == "United States Geological Survey (USGS)" - assert body["properties"]["sensor_orientation"] == "HDZF" + assert body["properties"]["sensor_orientation"] == "HDZ" assert body["properties"]["sensor_sampling_rate"] == 100.0 assert body["properties"]["declination_base"] == 12349 assert body["geometry"]["type"] == "Point" diff --git a/test/api_test/ws_test/variometers_test.py b/test/api_test/ws_test/variometers_test.py index 41b2544650732420d93e6608fae0e1686fcbdfb3..c8b90cd90796e8cbd834a83fa3c7d4526e464b49 100644 --- a/test/api_test/ws_test/variometers_test.py +++ b/test/api_test/ws_test/variometers_test.py @@ -37,7 +37,7 @@ def test_get_variometer_by_id(): assert body["properties"]["name"] == "Disney Wilderness Preserve, Florida, USA" assert body["properties"]["agency"] == "USGS" assert body["properties"]["agency_name"] == "United States Geological Survey (USGS)" - assert body["properties"]["sensor_orientation"] == "HDZF" + assert body["properties"]["sensor_orientation"] == "HDZ" assert body["properties"]["sensor_sampling_rate"] == None assert body["properties"]["declination_base"] == None assert body["geometry"]["type"] == "Point" diff --git a/test/iaga2002_test/IAGA2002Parser_test.py b/test/iaga2002_test/IAGA2002Parser_test.py index 8cfde259f8eca7ba9997d58eeb80d0f744e5be78..04ccc9c3a5818059dd72f2e218eea0d5284a75b3 100644 --- a/test/iaga2002_test/IAGA2002Parser_test.py +++ b/test/iaga2002_test/IAGA2002Parser_test.py @@ -12,7 +12,7 @@ IAGA2002_EXAMPLE = """ Format IAGA-2002 Geodetic Longitude 254.764 | Elevation 1682 | Reported HDZF | - Sensor Orientation HDZF | + Sensor Orientation HDZ | Digital Sampling 0.01 second | Data Interval Type filtered 1-minute (00:15-01:45) | Data Type variation | diff --git a/test/imfjson_test/IMFJSONWriter_test.py b/test/imfjson_test/IMFJSONWriter_test.py index ff8b19d6d91bb7f341fc93ef7674317214d827ec..7792ded4542886badb21f24529776e48ebd412a7 100644 --- a/test/imfjson_test/IMFJSONWriter_test.py +++ b/test/imfjson_test/IMFJSONWriter_test.py @@ -27,8 +27,10 @@ def test_metadata(): assert_equal(metadata["status"], 200) # Test intermagnet parameters intermag = metadata["intermagnet"] - assert_equal(intermag["reported_orientation"], "HDZF") - assert_equal(intermag["sensor_orientation"], "HDZF") + assert_equal(intermag["reported_orientation"], "".join(EXAMPLE_CHANNELS)) + assert intermag[ + "sensor_orientation" + ] # writer does not validate Iaga2002 data, so assert for existence of values instead. assert_equal(intermag["data_type"], "variation") assert_equal(intermag["sampling_period"], 60) assert_equal(intermag["digital_sampling_rate"], 0.01)