From 8b4eeccd1eda28288ff02bb3448c043b1da3d4b8 Mon Sep 17 00:00:00 2001 From: pcain <pcain@usgs.gov> Date: Tue, 9 Nov 2021 10:04:17 -0700 Subject: [PATCH] specify mseed encoding --- geomagio/TimeseriesUtility.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geomagio/TimeseriesUtility.py b/geomagio/TimeseriesUtility.py index c294cebe8..357161426 100644 --- a/geomagio/TimeseriesUtility.py +++ b/geomagio/TimeseriesUtility.py @@ -82,6 +82,8 @@ def encode_stream(stream: Stream, encoding: str) -> Stream: trace_out = trace.copy() if trace_out.data.dtype != encoding: trace_out.data = trace_out.data.astype(encoding) + if "mseed" in trace_out.stats: + trace_out.stats.mseed.encoding = encoding.upper() out_stream += trace_out return out_stream -- GitLab