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
4427851c
Commit
4427851c
authored
6 years ago
by
Jeremy M Fee
Committed by
Claycomb, Abram Earl
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Rename Algorithm.get_starttime() to Algorithm.get_next_starttime()
parent
07c93591
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
geomagio/Controller.py
+2
-2
2 additions, 2 deletions
geomagio/Controller.py
geomagio/algorithm/Algorithm.py
+4
-3
4 additions, 3 deletions
geomagio/algorithm/Algorithm.py
geomagio/algorithm/SqDistAlgorithm.py
+1
-1
1 addition, 1 deletion
geomagio/algorithm/SqDistAlgorithm.py
with
7 additions
and
6 deletions
geomagio/Controller.py
+
2
−
2
View file @
4427851c
...
...
@@ -160,7 +160,7 @@ class Controller(object):
algorithm
.
get_input_channels
()
output_channels
=
options
.
outchannels
or
\
algorithm
.
get_output_channels
()
starttime
=
algorithm
.
get_starttime
()
or
options
.
starttime
starttime
=
algorithm
.
get_
next_
starttime
()
or
options
.
starttime
endtime
=
options
.
endtime
# input
timeseries
=
input_timeseries
or
self
.
_get_input_timeseries
(
...
...
@@ -215,7 +215,7 @@ class Controller(object):
if
update_count
>=
options
.
update_limit
:
return
algorithm
=
self
.
_algorithm
if
algorithm
.
get_starttime
()
is
not
None
:
if
algorithm
.
get_
next_
starttime
()
is
not
None
:
raise
AlgorithmException
(
'
Stateful algorithms cannot use run_as_update
'
)
input_channels
=
options
.
inchannels
or
\
...
...
This diff is collapsed.
Click to expand it.
geomagio/algorithm/Algorithm.py
+
4
−
3
View file @
4427851c
...
...
@@ -111,11 +111,12 @@ class Algorithm(object):
return
False
return
True
def
get_starttime
(
self
):
def
get_
next_
starttime
(
self
):
"""
Check whether algorithm has a stateful start time.
When an algorithm reports a start time, the Controller attempts to
only process data moving forward.
When an algorithm reports a next_starttime, the Controller attempts to
only process data moving forward. This is typically the time of the
last processed sample, plus the delta between samples.
Returns
-------
...
...
This diff is collapsed.
Click to expand it.
geomagio/algorithm/SqDistAlgorithm.py
+
1
−
1
View file @
4427851c
...
...
@@ -86,7 +86,7 @@ class SqDistAlgorithm(Algorithm):
'
reinitializing.
'
,
file
=
sys
.
stderr
)
return
(
start
-
3
*
30
*
24
*
60
*
60
,
end
)
def
get_starttime
(
self
):
def
get_
next_
starttime
(
self
):
"""
Return the next_starttime from the state, if it is set.
"""
return
self
.
next_starttime
...
...
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