diff --git a/geomagio/pcdcp/PCDCPWriter.py b/geomagio/pcdcp/PCDCPWriter.py index 5ade04613c97d05bf0993470c2db07464d0c0c89..facb92d78c40b241cc0312015b01cb63588cd2fd 100644 --- a/geomagio/pcdcp/PCDCPWriter.py +++ b/geomagio/pcdcp/PCDCPWriter.py @@ -71,11 +71,15 @@ class PCDCPWriter(object): """ buf = [] - if timeseries.select(channel='D'): - d = timeseries.select(channel='D') + # Use a copy of the trace so that we don't modify the original. + timeseriesLocal = timeseries.copy() + + # move the int(round(val*100)) into here, numpy.round(numpy.multiply(trace, 100)) + if timeseriesLocal.select(channel='D'): + d = timeseriesLocal.select(channel='D') d[0].data = ChannelConverter.get_minutes_from_radians(d[0].data) - traces = [timeseries.select(channel=c)[0] for c in channels] + traces = [timeseriesLocal.select(channel=c)[0] for c in channels] starttime = float(traces[0].stats.starttime) delta = traces[0].stats.delta