diff --git a/geomagio/pcdcp/PCDCPParser.py b/geomagio/pcdcp/PCDCPParser.py index bbaefb6045b60c81f81a05310ea8123fed5375c8..4cb246179c8567e59ee860469ca78aa066388fbd 100644 --- a/geomagio/pcdcp/PCDCPParser.py +++ b/geomagio/pcdcp/PCDCPParser.py @@ -5,8 +5,9 @@ import numpy from datetime import datetime # values that represent missing data points in PCDCP -NINES = numpy.float64('99999.99') - +NINES = numpy.float64('9999999') +NINES_RAW = numpy.float64('99999990') +NINES_DEG = numpy.float64('9999') class PCDCPParser(object): """PCDCP parser. diff --git a/geomagio/pcdcp/PCDCPWriter.py b/geomagio/pcdcp/PCDCPWriter.py index 2ae09358068d1779694897d15c6e63f973689f70..afdd1d2d7079780e93f28cf20f4e118bbc4d13c5 100644 --- a/geomagio/pcdcp/PCDCPWriter.py +++ b/geomagio/pcdcp/PCDCPWriter.py @@ -1,9 +1,8 @@ from cStringIO import StringIO -from geomagio import TimeseriesFactoryException, ChannelConverter +from geomagio import ChannelConverter import numpy import PCDCPParser -import textwrap from datetime import datetime @@ -15,7 +14,7 @@ class PCDCPWriter(object): self.empty_value = empty_value def write(self, out, timeseries, channels): - """write timeseries to pcdcp file + """Write timeseries to pcdcp file. Parameters ---------- @@ -24,8 +23,9 @@ class PCDCPWriter(object): timeseries : obspy.core.stream Timeseries object with data to be written. channels : array_like - Channels to be written from timeseries object + Channels to be written from timeseries object. """ + print "OUT:", out stats = timeseries[0].stats out.write(self._format_header(stats, channels)) out.write(self._format_data(timeseries, channels))