From 973d5d8ccecb5fea2d11970e299caa0046bdbfb1 Mon Sep 17 00:00:00 2001
From: spencer <swilbur@usgs.gov>
Date: Wed, 29 Mar 2023 14:39:02 -0600
Subject: [PATCH] Updated the pyproject.toml, Metadata.py, and Code.json files
 to reflect most current versions and code found in the Master branch. This
 was done to resolve a merge conflict.

---
 code.json            |  4 +--
 geomagio/Metadata.py | 67 ++++++++++++++++++++++----------------------
 pyproject.toml       |  2 +-
 3 files changed, 37 insertions(+), 36 deletions(-)

diff --git a/code.json b/code.json
index 4bdbf3c15..f995592be 100644
--- a/code.json
+++ b/code.json
@@ -3,7 +3,7 @@
     "name": "geomag-algorithms",
     "organization": "U.S. Geological Survey",
     "description": "Library for processing Geomagnetic timeseries data.",
-    "version": "1.6.3",
+    "version": "1.6.5",
     "status": "Development",
     "permissions": {
       "usageType": "openSource",
@@ -35,7 +35,7 @@
       "email": "gs-haz_dev_team_group@usgs.gov"
     },
     "date": {
-      "metadataLastUpdated": "2023-02-15"
+      "metadataLastUpdated": "2023-03-29"
     }
   }
 ]
diff --git a/geomagio/Metadata.py b/geomagio/Metadata.py
index 9c2ad7cab..24c58b1d0 100644
--- a/geomagio/Metadata.py
+++ b/geomagio/Metadata.py
@@ -41,26 +41,26 @@ _INSTRUMENT_METADATA = [
                 # Temporary values until actuals are obtained.
                 # TODO: calculate these lists based on "FGE" type
                 # TODO: Adjust offset for new FGE sensor & electronics? (installed 3/20/22)
-                "U": [{"channel": "U_Volt", "offset": 20613, "scale": 980}],
-                "V": [{"channel": "V_Volt", "offset": 0, "scale": 980}],
-                "W": [{"channel": "W_Volt", "offset": 47450, "scale": 980}],
+                "U": [{"channel": "U_Volt", "offset": 20613, "scale": 966.7624}],
+                "V": [{"channel": "V_Volt", "offset": 0, "scale": 944.1253}],
+                "W": [{"channel": "W_Volt", "offset": 47450, "scale": 975.5875}],
             },
             "electronics": {
-                "serial": "TBD",
-                # these scale values are used to convert voltage
-                # Temporary values until actuals are obtained.
-                "x-scale": 980,  # nT/V
-                "y-scale": 980,  # nT/V
-                "z-scale": 980,  # nT/V
+                "serial": "E574",
+                # these scale values are calculated manually.
+                "x-scale": 966.7624,  # nT/V
+                "y-scale": 944.1253,  # nT/V
+                "z-scale": 975.5875,  # nT/V
                 "temperature-scale": 0.01,  # V/K
             },
             "sensor": {
-                "serial": "TBD",
+                "serial": "S0449",
                 # these constants combine with instrument setting for offset
                 # Temporary values until actuals are obtained.
-                "x-constant": 1,  # nT/mA
-                "y-constant": 1,  # nT/mA
-                "z-constant": 1,  # nT/mA
+                "x-constant": 37027,  # nT/mA
+                "y-constant": 36160,  # nT/mA
+                "z-constant": 37365,  # nT/mA
+
             },
         },
     },
@@ -561,26 +561,27 @@ _INSTRUMENT_METADATA = [
             "channels": {
                 # each channel maps to a list of components to calculate nT
                 # TODO: calculate these lists based on "FGE" type
-                "U": [{"channel": "U_Volt", "offset": 0, "scale": 320.0}],
-                "V": [{"channel": "V_Volt", "offset": 0, "scale": 320.0}],
-                "W": [{"channel": "W_Volt", "offset": 0, "scale": 320.0}],
-            },
-            ## this info should get updated when available
-            # "electronics": {
-            #     "serial": "E0542",
-            #     # these scale values are used to convert voltage
-            #     "x-scale": 313.2,  # nT/V
-            #     "y-scale": 312.3,  # nT/V
-            #     "z-scale": 312.0,  # nT/V
-            #     "temperature-scale": 0.01,  # V/K
-            # },
-            # "sensor": {
-            #     "serial": "S0419",
-            #     # these constants combine with instrument setting for offset
-            #     "x-constant": 36958,  # nT/mA
-            #     "y-constant": 36849,  # nT/mA
-            #     "z-constant": 36811,  # nT/mA
-            # },
+                "U": [{"channel": "U_Volt", "offset": 0, "scale": 313.2034}],
+                "V": [{"channel": "V_Volt", "offset": 0, "scale": 312.2797}],
+                "W": [{"channel": "W_Volt", "offset": 0, "scale": 311.9576}],
+            },
+            # this info should get updated when available
+            "electronics": {
+                "serial": "E0543",
+                # these scale values are calculated manually
+                "x-scale": 313.2034,  # nT/V
+                "y-scale": 312.2797,  # nT/V
+                "z-scale": 311.9576,  # nT/V
+                "temperature-scale": 0.01,  # V/K
+            },
+            "sensor": {
+                "serial": "S0419",
+                # these constants combine with instrument setting for offset
+                "x-constant": 36958,  # nT/mA
+                "y-constant": 36849,  # nT/mA
+                "z-constant": 36811,  # nT/mA
+            },
+
         },
     },
     {
diff --git a/pyproject.toml b/pyproject.toml
index 9eb586cee..1f9f2922b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -17,7 +17,7 @@ packages = [
   {include = "geomagio" }
 ]
 repository="https://code.usgs.gov/ghsc/geomag/geomag-algorithms"
-version = "1.6.3"
+version = "1.6.5"
 
 
 [tool.poetry.dependencies]
-- 
GitLab