From d96bd75b1f698cc79b3e2163abd675f72a82342d Mon Sep 17 00:00:00 2001 From: Jeremy Fee <jmfee@usgs.gov> Date: Mon, 16 Nov 2015 15:56:47 -0700 Subject: [PATCH] left justify IAGA channel column headers --- geomagio/iaga2002/IAGA2002Writer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/geomagio/iaga2002/IAGA2002Writer.py b/geomagio/iaga2002/IAGA2002Writer.py index 0097e1e50..56c510f3d 100644 --- a/geomagio/iaga2002/IAGA2002Writer.py +++ b/geomagio/iaga2002/IAGA2002Writer.py @@ -7,7 +7,6 @@ from .. import ChannelConverter from ..TimeseriesFactoryException import TimeseriesFactoryException from ..Util import create_empty_trace import IAGA2002Parser -import obspy class IAGA2002Writer(object): @@ -39,7 +38,6 @@ class IAGA2002Writer(object): out.write(self._format_channels(channels, stats.station)) out.write(self._format_data(timeseries, channels)) - def _format_headers(self, stats, channels): """format headers for IAGA2002 file @@ -180,7 +178,7 @@ class IAGA2002Writer(object): if channel_len < 1 or channel_len > 3: raise TimeseriesFactoryException( 'channel "{}" is not 1 character'.format(channel)) - buf.append(' %7s' % (iaga_code + channel) ) + buf.append(' {:<7s}'.format(iaga_code + channel)) buf.append('|\n') return ''.join(buf) -- GitLab