Skip to content
Snippets Groups Projects
Commit 01e1e4a7 authored by Erin (Josh) Rigler's avatar Erin (Josh) Rigler
Browse files

Merge branch 'imfv122-parse-data-type' into 'master'

Parse data type in imfv122 files

See merge request !184
parents f0d522b7 9408cf17
No related branches found
No related tags found
1 merge request!184Parse data type in imfv122 files
Pipeline #148530 passed
......@@ -3,7 +3,7 @@
"name": "geomag-algorithms",
"organization": "U.S. Geological Survey",
"description": "Library for processing Geomagnetic timeseries data.",
"version": "1.5.2",
"version": "1.5.3",
"status": "Development",
"permissions": {
......@@ -34,7 +34,7 @@
},
"date": {
"metadataLastUpdated": "2022-05-04"
"metadataLastUpdated": "2022-06-01"
}
}
]
......@@ -8,6 +8,9 @@ from obspy.core import UTCDateTime
EIGHTS = numpy.float64("888888")
NINES = numpy.float64("999999")
# valid data types and their IMFv122 single-character mapping
DATA_TYPES = {"R": "Reported", "A": "Adjusted", "D": "Definitive"}
class IMFV122Parser(object):
"""IMFV122 parser.
......@@ -83,6 +86,7 @@ class IMFV122Parser(object):
self.metadata["geodetic_longitude"] = float(colalong[4:]) / 10
self.metadata["station"] = observatory
self.metadata["gin"] = gin
self.metadata["data_type"] = DATA_TYPES[type.upper()]
year = 1900 + int(date[-2:])
julday = int(doy)
......
This diff is collapsed.
......@@ -17,7 +17,7 @@ packages = [
{include = "geomagio" }
]
repository="https://code.usgs.gov/ghsc/geomag/geomag-algorithms"
version = "1.5.2"
version = "1.5.3"
[tool.poetry.dependencies]
......
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