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
159316a5
Commit
159316a5
authored
9 years ago
by
Hal Simpson
Browse files
Options
Downloads
Patches
Plain Diff
Added GOES input control options. Added check for empty timeseries in run, and quitely return.
parent
baf55bec
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
+27
-0
27 additions, 0 deletions
geomagio/Controller.py
with
27 additions
and
0 deletions
geomagio/Controller.py
+
27
−
0
View file @
159316a5
...
@@ -67,6 +67,8 @@ class Controller(object):
...
@@ -67,6 +67,8 @@ class Controller(object):
starttime
=
start
,
starttime
=
start
,
endtime
=
end
,
endtime
=
end
,
channels
=
input_channels
)
channels
=
input_channels
)
if
timeseries
.
count
()
==
0
:
return
# process
# process
processed
=
algorithm
.
process
(
timeseries
)
processed
=
algorithm
.
process
(
timeseries
)
# output
# output
...
@@ -211,6 +213,14 @@ def main(args):
...
@@ -211,6 +213,14 @@ def main(args):
inputfactory
=
imfv283
.
StreamIMFV283Factory
(
inputfactory
=
imfv283
.
StreamIMFV283Factory
(
stream
=
open
(
args
.
input_imfv283_file
,
'
r
'
),
stream
=
open
(
args
.
input_imfv283_file
,
'
r
'
),
observatory
=
args
.
observatory
)
observatory
=
args
.
observatory
)
elif
args
.
input_imfv283_goes
is
not
None
:
inputfactory
=
imfv283
.
GOESIMFV283Factory
(
directory
=
args
.
input_goes_directory
,
getdcpmessages
=
args
.
input_goes_getdcpmessages
,
observatory
=
args
.
observatory
,
server
=
args
.
input_goes_server
,
user
=
args
.
input_goes_user
,
)
elif
args
.
input_imfv283_stdin
is
not
None
:
elif
args
.
input_imfv283_stdin
is
not
None
:
inputfactory
=
imfv283
.
StreamIMFV283Factory
(
inputfactory
=
imfv283
.
StreamIMFV283Factory
(
stream
=
sys
.
stdin
,
stream
=
sys
.
stdin
,
...
@@ -403,6 +413,19 @@ def parse_args(args):
...
@@ -403,6 +413,19 @@ def parse_args(args):
default
=
False
,
default
=
False
,
help
=
'
Flag to run the last hour if interval is minute,
'
+
help
=
'
Flag to run the last hour if interval is minute,
'
+
'
or the last 10 minutes if interval is seconds
'
)
'
or the last 10 minutes if interval is seconds
'
)
parser
.
add_argument
(
'
--input-goes-directory
'
,
default
=
''
,
help
=
'
Directory for support files for goes input of imfv283 data
'
)
parser
.
add_argument
(
'
--input-goes-getdcpmessages
'
,
default
=
''
,
help
=
'
Location of getDcpMessages.
'
)
parser
.
add_argument
(
'
--input-goes-server
'
,
nargs
=
'
*
'
,
default
=
'
lrgseddn1.cr.usgs.gov
'
,
help
=
'
The server name(s) to retrieve the GOES data from
'
)
parser
.
add_argument
(
'
--input-goes-user
'
,
default
=
'
GEOMAG
'
,
help
=
'
The user name to use to retrieve data from GOES
'
)
# Input group
# Input group
input_group
=
parser
.
add_mutually_exclusive_group
(
required
=
True
)
input_group
=
parser
.
add_mutually_exclusive_group
(
required
=
True
)
...
@@ -427,6 +450,10 @@ def parse_args(args):
...
@@ -427,6 +450,10 @@ def parse_args(args):
help
=
'
Pass in a file using redirection from stdin
'
)
help
=
'
Pass in a file using redirection from stdin
'
)
input_group
.
add_argument
(
'
--input-imfv283-url
'
,
input_group
.
add_argument
(
'
--input-imfv283-url
'
,
help
=
'
Example file://./
'
)
help
=
'
Example file://./
'
)
input_group
.
add_argument
(
'
--input-imfv283-goes
'
,
action
=
'
store_true
'
,
default
=
False
,
help
=
'
Retrieves data directly from a goes server to read
'
)
input_group
.
add_argument
(
'
--input-pcdcp-file
'
,
input_group
.
add_argument
(
'
--input-pcdcp-file
'
,
help
=
'
Reads from the specified file.
'
)
help
=
'
Reads from the specified file.
'
)
input_group
.
add_argument
(
'
--input-pcdcp-stdin
'
,
input_group
.
add_argument
(
'
--input-pcdcp-stdin
'
,
...
...
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