Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geomag-algorithms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Geomagnetism Program
geomag-algorithms
Commits
aa1a88cf
Commit
aa1a88cf
authored
9 years ago
by
Hal Simpson
Browse files
Options
Downloads
Patches
Plain Diff
Updated comments
parent
0f5d20de
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
geomagio/Controller.py
+15
-17
15 additions, 17 deletions
geomagio/Controller.py
with
15 additions
and
17 deletions
geomagio/Controller.py
+
15
−
17
View file @
aa1a88cf
...
@@ -15,27 +15,19 @@ class Controller(object):
...
@@ -15,27 +15,19 @@ class Controller(object):
the factory that will output the timeseries data
the factory that will output the timeseries data
algorithm: Algorithm
algorithm: Algorithm
the algorithm(s) that will procees the timeseries data
the algorithm(s) that will procees the timeseries data
update: boolean
indicates that data is to be updated.
interval: string
the data interval {daily, hourly, minute, second}
update_realtime: boolean
indicates
Notes
Notes
-----
-----
Has 2
(3)
basic modes.
Has 2 basic modes.
Run simply sends all the data in a stream to edge. If a startime/endtime is
Run simply sends all the data in a stream to edge. If a startime/endtime is
provided, it will send the data from the stream that is within that
provided, it will send the data from the stream that is within that
time span.
time span.
Update will update any data that has changed between the source, and
Update will update any data that has changed between the source, and
the target during a given timeframe. If the update_realtime flag
the target during a given timeframe. It will also attempt to
is set, it will attempt to recursively backup so it can update all
recursively backup so it can update all missing data.
missing data.
"""
"""
def
__init__
(
self
,
inputFactory
,
outputFactory
,
algorithm
,
update
=
False
,
def
__init__
(
self
,
inputFactory
,
outputFactory
,
algorithm
):
interval
=
'
minute
'
,
update_realtime
=
False
):
self
.
_inputFactory
=
inputFactory
self
.
_inputFactory
=
inputFactory
self
.
_algorithm
=
algorithm
self
.
_algorithm
=
algorithm
self
.
_outputFactory
=
outputFactory
self
.
_outputFactory
=
outputFactory
...
@@ -48,6 +40,9 @@ class Controller(object):
...
@@ -48,6 +40,9 @@ class Controller(object):
time of first sample. None if starttime should come from dataset
time of first sample. None if starttime should come from dataset
endtime: obspy.core.UTCDateTime
endtime: obspy.core.UTCDateTime
endtime of last sampel. None if endtime should come from dataset
endtime of last sampel. None if endtime should come from dataset
options: dictionary
The dictionary of all the command line arguments. Could in theory
contain other options passed in by the controller.
"""
"""
input_channels
=
self
.
_algorithm
.
get_input_channels
()
input_channels
=
self
.
_algorithm
.
get_input_channels
()
algorithm_start
,
algorithm_end
=
self
.
_algorithm
.
get_input_interval
(
algorithm_start
,
algorithm_end
=
self
.
_algorithm
.
get_input_interval
(
...
@@ -74,17 +69,20 @@ class Controller(object):
...
@@ -74,17 +69,20 @@ class Controller(object):
time of first sample. None if starttime should come from dataset
time of first sample. None if starttime should come from dataset
endtime: obspy.core.UTCDateTime
endtime: obspy.core.UTCDateTime
endtime of last sampel. None if endtime should come from dataset
endtime of last sampel. None if endtime should come from dataset
options: dictionary
The dictionary of all the command line arguments. Could in theory
contain other options passed in by the controller.
Notes
Notes
-----
-----
Finds gaps in the target data, and if there
'
s new data in the input
Finds gaps in the target data, and if there
'
s new data in the input
source, calls run with the start/end time of a given gap to fill
source, calls run with the start/end time of a given gap to fill
in.
in.
I
f the update_realtime flag is set, i
t checks the start of the target
It checks the start of the target
data, and if it
'
s missing, and
data, and if it
'
s missing, and
there
'
s new data available, it backs
there
'
s new data available, it backs
up the starttime/endtime,
up the starttime/endtime,
and recursively calls itself, to check
and recursively calls itself, to check
the previous period, to see
the previous period, to see
if new data is available there as well.
if new data is available there as well.
Calls run for each new
Calls run for each new
period, oldest to newest.
period, oldest to newest.
"""
"""
input_channels
=
self
.
_algorithm
.
get_input_channels
()
input_channels
=
self
.
_algorithm
.
get_input_channels
()
output_channels
=
self
.
_algorithm
.
_get_output_channels
()
output_channels
=
self
.
_algorithm
.
_get_output_channels
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment