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

Merge branch 'update-RawInputClient' into 'master'

Update intervals for Timeseries factories

See merge request !31
parents 55c37dea 64a8f613
No related branches found
No related tags found
2 merge requests!146Release CMO metadata to production,!31Update intervals for Timeseries factories
Pipeline #22149 passed
...@@ -619,7 +619,7 @@ DEFAULT_METADATA = { ...@@ -619,7 +619,7 @@ DEFAULT_METADATA = {
"data_interval_type": "1-minute calculated", "data_interval_type": "1-minute calculated",
"filter_comments": [], "filter_comments": [],
}, },
"hourly": {"data_interval_type": "1-hour calculated"}, "hour": {"data_interval_type": "1-hour calculated"},
}, },
}, },
"BLC": { "BLC": {
......
...@@ -50,7 +50,7 @@ class PlotTimeseriesFactory(TimeseriesFactory): ...@@ -50,7 +50,7 @@ class PlotTimeseriesFactory(TimeseriesFactory):
type : {'definitive', 'provisional', 'quasi-definitive', 'variation'} type : {'definitive', 'provisional', 'quasi-definitive', 'variation'}
data type, optional. data type, optional.
uses default if unspecified. uses default if unspecified.
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month', 'second'}
data interval, optional. data interval, optional.
uses default if unspecified. uses default if unspecified.
Raises Raises
......
...@@ -31,7 +31,7 @@ class TimeseriesFactory(object): ...@@ -31,7 +31,7 @@ class TimeseriesFactory(object):
type : {'definitive', 'provisional', 'quasi-definitive', 'variation'} type : {'definitive', 'provisional', 'quasi-definitive', 'variation'}
default data type, optional. default data type, optional.
default 'variation'. default 'variation'.
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month, 'second'}
data interval, optional. data interval, optional.
default 'minute'. default 'minute'.
urlTemplate : str urlTemplate : str
...@@ -90,7 +90,7 @@ class TimeseriesFactory(object): ...@@ -90,7 +90,7 @@ class TimeseriesFactory(object):
type : {'definitive', 'provisional', 'quasi-definitive', 'variation'} type : {'definitive', 'provisional', 'quasi-definitive', 'variation'}
data type, optional. data type, optional.
uses default if unspecified. uses default if unspecified.
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month', 'second'}
data interval, optional. data interval, optional.
uses default if unspecified. uses default if unspecified.
...@@ -196,7 +196,7 @@ class TimeseriesFactory(object): ...@@ -196,7 +196,7 @@ class TimeseriesFactory(object):
type : {'definitive', 'provisional', 'quasi-definitive', 'variation'} type : {'definitive', 'provisional', 'quasi-definitive', 'variation'}
data type, optional. data type, optional.
uses default if unspecified. uses default if unspecified.
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month', 'second'}
data interval, optional. data interval, optional.
uses default if unspecified. uses default if unspecified.
Raises Raises
...@@ -339,7 +339,7 @@ class TimeseriesFactory(object): ...@@ -339,7 +339,7 @@ class TimeseriesFactory(object):
type : {'variation', 'reported', 'provisional', 'adjusted', type : {'variation', 'reported', 'provisional', 'adjusted',
'quasi-definitive', 'definitive'} 'quasi-definitive', 'definitive'}
data type. data type.
interval : {'minute', 'second', 'hourly', 'daily'} interval : {'minute', 'second', 'hour', 'day'}
data interval. data interval.
channels : list channels : list
list of data channels being requested list of data channels being requested
...@@ -384,7 +384,7 @@ class TimeseriesFactory(object): ...@@ -384,7 +384,7 @@ class TimeseriesFactory(object):
Parameters Parameters
---------- ----------
interval : {'daily', 'hourly', 'minute', 'monthly', 'second'} interval : {'day', 'hour', 'minute', 'month', 'second'}
Returns Returns
------- -------
...@@ -395,14 +395,15 @@ class TimeseriesFactory(object): ...@@ -395,14 +395,15 @@ class TimeseriesFactory(object):
TimeseriesFactoryException TimeseriesFactoryException
if ``interval`` is not supported. if ``interval`` is not supported.
""" """
interval_abbr = None interval_abbr = None
if interval == "daily": if interval == "day":
interval_abbr = "day" interval_abbr = "day"
elif interval == "hourly": elif interval == "hour":
interval_abbr = "hor" interval_abbr = "hor"
elif interval == "minute": elif interval == "minute":
interval_abbr = "min" interval_abbr = "min"
elif interval == "monthly": elif interval == "month":
interval_abbr = "mon" interval_abbr = "mon"
elif interval == "second": elif interval == "second":
interval_abbr = "sec" interval_abbr = "sec"
...@@ -433,7 +434,7 @@ class TimeseriesFactory(object): ...@@ -433,7 +434,7 @@ class TimeseriesFactory(object):
interval_name = "OneMinute" interval_name = "OneMinute"
elif interval == "second": elif interval == "second":
interval_name = "OneSecond" interval_name = "OneSecond"
elif interval == "hourly": elif interval == "hour":
interval_name = "OneHour" interval_name = "OneHour"
else: else:
raise TimeseriesFactoryException('Unsupported interval "%s"' % interval) raise TimeseriesFactoryException('Unsupported interval "%s"' % interval)
......
...@@ -160,7 +160,7 @@ class RawInputClient: ...@@ -160,7 +160,7 @@ class RawInputClient:
PARAMETERS PARAMETERS
---------- ----------
interval: {'daily', 'hourly', 'minute', 'second'} interval: {'day', 'hour', 'minute', 'second'}
data interval. data interval.
trace: obspy.core.trace trace: obspy.core.trace
...@@ -181,11 +181,11 @@ class RawInputClient: ...@@ -181,11 +181,11 @@ class RawInputClient:
nsamp = DAYMINUTES nsamp = DAYMINUTES
timeoffset = 60 timeoffset = 60
samplerate = 1.0 / 60 samplerate = 1.0 / 60
elif interval == "hourly": elif interval == "hour":
nsamp = MAXINPUTSIZE nsamp = MAXINPUTSIZE
timeoffset = 3600 timeoffset = 3600
samplerate = 1.0 / 3600 samplerate = 1.0 / 3600
elif interval == "daily": elif interval == "day":
nsamp = MAXINPUTSIZE nsamp = MAXINPUTSIZE
timeoffset = 86400 timeoffset = 86400
samplerate = 1.0 / 86400 samplerate = 1.0 / 86400
......
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