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

Use EdgeFactory for all but tenhertz data:

- assumes updates to filters.py, EdgeFactory, and MiniSeedFactory included in this feature branch
- removes default ports in favor of factory defaults
- tenhertz data will still use MiniSeedFactory, and if channels "U", "V", or "W" are requested, the raw voltage and bin data will be used to calculate nT outputs
parent edd44e60
No related branches found
No related tags found
1 merge request!386Overhaul EdgeFactory and MiniSeedFactory for Edge data migration
......@@ -40,16 +40,17 @@ def get_data_factory(
factory = FDSNFactory(network=observatory.network, locationCode="40")
elif sampling_period in [
SamplingPeriod.TEN_HERTZ,
SamplingPeriod.HOUR,
SamplingPeriod.DAY,
]:
# MiniSeedFactory required for floating point data;
# MiniSeedFactory advised for 10 Hz sampling in general
factory = MiniSeedFactory(
host=host, port=int(os.getenv("DATA_MINISEED_PORT", "2061"))
)
elif sampling_period in [SamplingPeriod.SECOND, SamplingPeriod.MINUTE]:
factory = EdgeFactory(
host=host, port=int(os.getenv("DATA_EARTHWORM_PORT", "2060"))
host=host,
port=os.getenv("DATA_MINISEED_PORT", None),
convert_channels=["U", "V", "W"], # no channel mapping (e.g., "H"->"U")
)
elif sampling_period in list(SamplingPeriod):
# EdgeFactory required for real time data with long sample periods
factory = EdgeFactory(host=host, port=os.getenv("DATA_EARTHWORM_PORT", None))
else:
return None
return DerivedTimeseriesFactory(factory)
......
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