diff --git a/geomagio/TimeseriesUtility.py b/geomagio/TimeseriesUtility.py index d372cd7d92fb2700b3e8546920bf838d2cebed2f..459287dbe69add0b6dc98da98cd56d8395e18bd2 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 163cd6d4624fb236409b9a9a688b614fa581d999..99c3b9eec31e63a125131b6c0f65933220b13822 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)