From de90865b19f0bf1394fcc6b4517d1a3f7d2cdde8 Mon Sep 17 00:00:00 2001 From: Jeremy Fee <jmfee@usgs.gov> Date: Sun, 1 Mar 2020 12:19:34 -0700 Subject: [PATCH] Add SpreadsheetAbsoluteFactory to read residual spreadsheet format --- Pipfile.lock | 1 + geomagio/residual/measurement.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 geomagio/residual/measurement.py diff --git a/Pipfile.lock b/Pipfile.lock index c91debcbc..c93459f43 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -934,4 +934,5 @@ "version": "==3.1.0" } } + } } diff --git a/geomagio/residual/measurement.py b/geomagio/residual/measurement.py new file mode 100644 index 000000000..03d968261 --- /dev/null +++ b/geomagio/residual/measurement.py @@ -0,0 +1,24 @@ +from typing import Optional + +from obspy.core import UTCDateTime +from pydantic import BaseModel + +from .. import pydantic_utcdatetime +from .MeasurementType import MeasurementType + + +class Measurement(BaseModel): + """One angle and time measurement with optional residual. + + Attributes + ---------- + measurement_type: type of measurement. + angle: measured angle, decimal degrees. + residual: residual at time of measurement. + time: when measurement was taken. + """ + + measurement_type: MeasurementType + angle: float = 0 + residual: float = 0 + time: Optional[UTCDateTime] = None -- GitLab