diff --git a/geomagio/iaga2002/IAGA2002Writer.py b/geomagio/iaga2002/IAGA2002Writer.py index 0097e1e505dc05aae65f98b9a40cdb66c55caee8..56c510f3d0dbc273eea1dc9e06cb8723fb5da909 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)