diff --git a/geomagio/iaga2002/IAGA2002Parser.py b/geomagio/iaga2002/IAGA2002Parser.py index d3044082ccb4a7dbb6d7db220f9d008bb17213f1..e81610d4bc6c04d96627860a4c1c991fce997fff 100644 --- a/geomagio/iaga2002/IAGA2002Parser.py +++ b/geomagio/iaga2002/IAGA2002Parser.py @@ -34,12 +34,13 @@ class IAGA2002Parser(object): ``numpy.nan`` when values are missing. """ - def __init__(self): + def __init__(self, observatory=None): """Create a new IAGA2002 parser.""" # header fields self.headers = {} self.metadata = { - 'network': 'NT' + 'network': 'NT', + 'station': observatory } # header comments self.comments = [] @@ -173,6 +174,7 @@ class IAGA2002Parser(object): if channel == EMPTY_CHANNEL: continue data = numpy.array(data, dtype=numpy.float64) + data[data == int(EIGHTS)] = numpy.nan data[data == EIGHTS] = numpy.nan data[data == NINES] = numpy.nan self.data[channel] = data