From f539da0951ad47f9884f51d905abe61716479595 Mon Sep 17 00:00:00 2001 From: pcain-usgs <pcain@usgs.gov> Date: Wed, 7 Apr 2021 09:52:36 -0600 Subject: [PATCH] undo edits --- geomagio/TimeseriesUtility.py | 6 ++---- geomagio/edge/MiniSeedFactory.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/geomagio/TimeseriesUtility.py b/geomagio/TimeseriesUtility.py index d372cd7d9..459287dbe 100644 --- a/geomagio/TimeseriesUtility.py +++ b/geomagio/TimeseriesUtility.py @@ -395,15 +395,13 @@ def mask_stream(stream): return masked -def unmask_stream(stream, float_type=numpy.float64): +def unmask_stream(stream): """Convert stream traces to unmasked arrays. Parameters ---------- stream : obspy.core.Stream stream to unmask - float_type: type - floating point precision for stream data Returns ------- @@ -416,7 +414,7 @@ def unmask_stream(stream, float_type=numpy.float64): unmasked += obspy.core.Trace( trace.data.filled(fill_value=numpy.nan) if isinstance(trace.data, numpy.ma.MaskedArray) - else trace.data.astype(float_type), + else trace.data, trace.stats, ) return unmasked diff --git a/geomagio/edge/MiniSeedFactory.py b/geomagio/edge/MiniSeedFactory.py index 163cd6d46..99c3b9eec 100644 --- a/geomagio/edge/MiniSeedFactory.py +++ b/geomagio/edge/MiniSeedFactory.py @@ -664,7 +664,7 @@ class MiniSeedFactory(TimeseriesFactory): to_write = timeseries.select(channel=channel) to_write = TimeseriesUtility.mask_stream(to_write) to_write = to_write.split() - to_write = TimeseriesUtility.unmask_stream(to_write, float_type=numpy.float32) + to_write = TimeseriesUtility.unmask_stream(to_write) # relabel channels from internal to edge conventions station = self._get_edge_station(observatory, channel, type, interval) location = self._get_edge_location(observatory, channel, type, interval) -- GitLab