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
d53f7251
Commit
d53f7251
authored
8 years ago
by
Jeremy M Fee
Browse files
Options
Downloads
Patches
Plain Diff
Short circuit second call to _get_input_timeseries in update mode
parent
cf677074
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
geomagio/Controller.py
+6
-3
6 additions, 3 deletions
geomagio/Controller.py
with
6 additions
and
3 deletions
geomagio/Controller.py
+
6
−
3
View file @
d53f7251
...
@@ -139,13 +139,16 @@ class Controller(object):
...
@@ -139,13 +139,16 @@ class Controller(object):
channels
=
channels
)
channels
=
channels
)
return
timeseries
return
timeseries
def
run
(
self
,
options
):
def
run
(
self
,
options
,
input_timeseries
=
None
):
"""
run controller
"""
run controller
Parameters
Parameters
----------
----------
options: dictionary
options: dictionary
The dictionary of all the command line arguments. Could in theory
The dictionary of all the command line arguments. Could in theory
contain other options passed in by the controller.
contain other options passed in by the controller.
input_timeseries : obspy.core.Stream
Used by run_as_update to save a double input read, since it has
already read the input to confirm data can be produced.
"""
"""
algorithm
=
self
.
_algorithm
algorithm
=
self
.
_algorithm
input_channels
=
options
.
inchannels
or
\
input_channels
=
options
.
inchannels
or
\
...
@@ -153,7 +156,7 @@ class Controller(object):
...
@@ -153,7 +156,7 @@ class Controller(object):
output_channels
=
options
.
outchannels
or
\
output_channels
=
options
.
outchannels
or
\
algorithm
.
get_output_channels
()
algorithm
.
get_output_channels
()
# input
# input
timeseries
=
self
.
_get_input_timeseries
(
timeseries
=
input_timeseries
or
self
.
_get_input_timeseries
(
observatory
=
options
.
observatory
,
observatory
=
options
.
observatory
,
starttime
=
options
.
starttime
,
starttime
=
options
.
starttime
,
endtime
=
options
.
endtime
,
endtime
=
options
.
endtime
,
...
@@ -253,7 +256,7 @@ class Controller(object):
...
@@ -253,7 +256,7 @@ class Controller(object):
options
.
endtime
=
output_gap
[
1
]
options
.
endtime
=
output_gap
[
1
]
print
>>
sys
.
stderr
,
'
processing
'
,
\
print
>>
sys
.
stderr
,
'
processing
'
,
\
options
.
starttime
,
options
.
endtime
options
.
starttime
,
options
.
endtime
self
.
run
(
options
)
self
.
run
(
options
,
input_timeseries
)
def
get_input_factory
(
args
):
def
get_input_factory
(
args
):
...
...
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