From c2a9abe62639edd62f35a3d0da3bd7d43d379be6 Mon Sep 17 00:00:00 2001 From: Hal Simpson <hasimpson@usgs.gov> Date: Mon, 12 Jan 2015 20:53:25 -0700 Subject: [PATCH] convert d to minutes before putting out. --- geomagio/iaga2002/IAGA2002Writer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/geomagio/iaga2002/IAGA2002Writer.py b/geomagio/iaga2002/IAGA2002Writer.py index a36d6108b..572f905f3 100644 --- a/geomagio/iaga2002/IAGA2002Writer.py +++ b/geomagio/iaga2002/IAGA2002Writer.py @@ -1,6 +1,6 @@ from cStringIO import StringIO -from geomagio import TimeseriesFactoryException +from geomagio import TimeseriesFactoryException, ChannelConverter import numpy import IAGA2002Parser import textwrap @@ -105,6 +105,9 @@ class IAGA2002Writer(object): list and order of channel values to output. """ buf = [] + if timeseries.select(channel='D'): + d = timeseries.select(channel='D') + d[0].data = ChannelConverter.get_minutes_from_radians(d[0].data) traces = [timeseries.select(channel=c)[0] for c in channels] starttime = float(traces[0].stats.starttime) delta = traces[0].stats.delta -- GitLab