Skip to content
Snippets Groups Projects
Commit ac79e79d authored by Jeremy M Fee's avatar Jeremy M Fee
Browse files

Update how imfv283 parser checks platform

parent 5310a923
No related branches found
No related tags found
No related merge requests found
"""Parsing methods for the IMFV283 Format.""" """Parsing methods for the IMFV283 Format."""
from __future__ import absolute_import from __future__ import absolute_import, unicode_literals
from builtins import range from builtins import range
import numpy import numpy
...@@ -97,7 +97,7 @@ class IMFV283Parser(object): ...@@ -97,7 +97,7 @@ class IMFV283Parser(object):
self._post_process(data, msg_header, goes_header) self._post_process(data, msg_header, goes_header)
except (KeyError, IndexError, ValueError): except (KeyError, IndexError, ValueError):
sys.stderr.write("Incorrect data line ") sys.stderr.write("Incorrect data line ")
sys.stderr.write(line) sys.stderr.write(str(line))
def _estimate_data_time(self, transmission, doy, minute, def _estimate_data_time(self, transmission, doy, minute,
max_transmit_delay=1800): max_transmit_delay=1800):
...@@ -281,7 +281,8 @@ class IMFV283Parser(object): ...@@ -281,7 +281,8 @@ class IMFV283Parser(object):
header = {} header = {}
header['daps_platform'] = msg[0:8] header['daps_platform'] = msg[0:8]
header['obs'] = imfv283_codes.PLATFORMS[header['daps_platform']] platform = str(header['daps_platform'])
header['obs'] = imfv283_codes.PLATFORMS[platform]
# if it's not in the observatory dictionary, we ignore it. # if it's not in the observatory dictionary, we ignore it.
if header['obs'] is None: if header['obs'] is None:
return header return header
......
from __future__ import unicode_literals
"""Dictionary of observatory codes and ness block byte orders""" """Dictionary of observatory codes and ness block byte orders"""
OBSERVATORIES = { OBSERVATORIES = {
# USGS # USGS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment