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
78cb1e90
Commit
78cb1e90
authored
9 years ago
by
Hal Simpson
Browse files
Options
Downloads
Patches
Plain Diff
Streamlined update_count usage
parent
41887c20
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
+2
-5
2 additions, 5 deletions
geomagio/Controller.py
with
2 additions
and
5 deletions
geomagio/Controller.py
+
2
−
5
View file @
78cb1e90
...
@@ -41,7 +41,6 @@ class Controller(object):
...
@@ -41,7 +41,6 @@ class Controller(object):
self
.
_inputFactory
=
inputFactory
self
.
_inputFactory
=
inputFactory
self
.
_algorithm
=
algorithm
self
.
_algorithm
=
algorithm
self
.
_outputFactory
=
outputFactory
self
.
_outputFactory
=
outputFactory
self
.
_update_count
=
0
def
_get_input_timeseries
(
self
,
observatory
,
channels
,
starttime
,
endtime
):
def
_get_input_timeseries
(
self
,
observatory
,
channels
,
starttime
,
endtime
):
"""
Get timeseries from the input factory for requested options.
"""
Get timeseries from the input factory for requested options.
...
@@ -197,9 +196,7 @@ class Controller(object):
...
@@ -197,9 +196,7 @@ class Controller(object):
"""
"""
# If an update_limit is set, make certain we don't step past it.
# If an update_limit is set, make certain we don't step past it.
if
options
.
update_limit
!=
0
:
if
options
.
update_limit
!=
0
:
if
update_count
<
options
.
update_limit
:
if
update_count
>=
options
.
update_limit
:
update_count
+=
1
else
:
return
return
algorithm
=
self
.
_algorithm
algorithm
=
self
.
_algorithm
input_channels
=
options
.
inchannels
or
\
input_channels
=
options
.
inchannels
or
\
...
@@ -235,7 +232,7 @@ class Controller(object):
...
@@ -235,7 +232,7 @@ class Controller(object):
endtime
=
options
.
starttime
-
delta
endtime
=
options
.
starttime
-
delta
options
.
starttime
=
starttime
options
.
starttime
=
starttime
options
.
endtime
=
endtime
options
.
endtime
=
endtime
self
.
run_as_update
(
options
,
update_count
)
self
.
run_as_update
(
options
,
update_count
+
1
)
# fill gap
# fill gap
options
.
starttime
=
output_gap
[
0
]
options
.
starttime
=
output_gap
[
0
]
options
.
endtime
=
output_gap
[
1
]
options
.
endtime
=
output_gap
[
1
]
...
...
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