From 3467503de52104aa72a1ca7b738e97a2d6d8d3b9 Mon Sep 17 00:00:00 2001 From: Nicholas Shavers <nshavers@contractor.usgs.gov> Date: Wed, 15 Jan 2025 13:44:30 -0800 Subject: [PATCH] skip writing timeseries if channel not in request channels --- geomagio/covjson/CovJSONFactory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geomagio/covjson/CovJSONFactory.py b/geomagio/covjson/CovJSONFactory.py index 02088e52..401ca653 100644 --- a/geomagio/covjson/CovJSONFactory.py +++ b/geomagio/covjson/CovJSONFactory.py @@ -249,6 +249,8 @@ class CovJSONFactory(TimeseriesFactory): for trace in timeseries: ch_name = trace.stats.channel + if channels and ch_name not in channels: + continue element_info = ELEMENT_INDEX.get(ch_name) if element_info: param_description = element_info.name -- GitLab