Skip to content
Snippets Groups Projects
Commit 7901f8f5 authored by Erin (Josh) Rigler's avatar Erin (Josh) Rigler
Browse files

Add obspy.clients.neic to EdgeFactory

Add obspy.clients.neic to client list for retrieving data from edgecwb
using the CWBQuery protocol (uses miniseed blocks instead of tracebufs).
We will leave earthworm in-place for now, but only if the input port is
2060. 2060 is the only port used for earthworm protocal in any of the
edgecwb nodes used by Geomag, so this should be OK. Eventually we want
to remove earthworm from "Edge"Factory, perhaps creating a separate
factory dedicated to earthworm, although, to be honest, we'll probably
never used earthworm again once we've migrated everthing to miniseed.
parent b4fc20ce
No related branches found
No related tags found
1 merge request!289Migrating to new edge config - stage 01
......@@ -16,7 +16,7 @@ from typing import List, Optional
import numpy
import numpy.ma
from obspy import Stream, Trace, UTCDateTime
from obspy.clients import earthworm
from obspy.clients import earthworm, neic
from .. import ChannelConverter, TimeseriesUtility
from ..geomag_types import DataInterval, DataType
......@@ -88,7 +88,12 @@ class EdgeFactory(TimeseriesFactory):
locationCode: Optional[str] = None,
):
TimeseriesFactory.__init__(self, observatory, channels, type, interval)
self.client = earthworm.Client(host, port)
if port == 2060:
# earthworm (phasing this out gradually)
self.client = earthworm.Client(host, port)
else:
# CWBQuery/miniseed protocol (preferred)
self.client = neic.Client(host, port)
self.host = host
self.port = port
self.write_port = write_port
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment