Skip to content
Snippets Groups Projects
Commit f539da09 authored by Cain, Payton David's avatar Cain, Payton David
Browse files

undo edits

parent d9a5ba87
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!81Convert output mseed to float32
......@@ -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
......
......@@ -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)
......
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