From fee34714c6d099d5c5c19eccb0b1523d68338812 Mon Sep 17 00:00:00 2001
From: "E. Joshua Rigler" <erigler@usgs.gov>
Date: Thu, 6 Mar 2025 09:36:21 -0700
Subject: [PATCH] Copy F (geomag) to F (legacy) fixed:

The EdgeFactory (earthworm client) does not have, and will probably never have, the ability to read floating point miniseed blocks. When we reverted the processing recently to stop making an integer copy of the 1-second data from ObsRio (which seriously confused Edge for reasons we still dont understand), this broke geomag-filter. The solution was to copy F data separately, using MiniSeedFactory as the input factory.
---
 geomagio/processing/filters.py | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/geomagio/processing/filters.py b/geomagio/processing/filters.py
index 32020635..1cda8bf2 100644
--- a/geomagio/processing/filters.py
+++ b/geomagio/processing/filters.py
@@ -207,7 +207,6 @@ def realtime_command(
                 ("U", "H"),
                 ("V", "E"),
                 ("W", "Z"),
-                ("F", "F"),
             ),
             interval="second",
             input_factory=EdgeFactory(
@@ -223,7 +222,24 @@ def realtime_command(
             realtime_interval=realtime_interval,
             update_limit=update_limit,
         )
-
+        # remove the following after data migration is complete
+        _copy_channels(
+            observatory=observatory,
+            channels=(("F", "F"),),
+            interval="second",
+            input_factory=MiniSeedFactory(
+                host=input_host, port=input_port, type="variation", sncl_mode="geomag"
+            ),
+            output_factory=EdgeFactory(
+                host=output_host,
+                port=output_read_port,
+                write_port=7981,  # hard-code port for legacy sncls
+                type="variation",
+                sncl_mode="legacy",
+            ),
+            realtime_interval=realtime_interval,
+            update_limit=update_limit,
+        )
         minute_filter(
             observatory=observatory,
             channels=("U", "V", "W"),
-- 
GitLab