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
e087080e
Commit
e087080e
authored
4 years ago
by
Cain, Payton David
Browse files
Options
Downloads
Patches
Plain Diff
default factory intervals to controller intervals
parent
c8ecdd45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!146
Release CMO metadata to production
,
!75
Default factory intervals to controller intervals
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
geomagio/Controller.py
+4
-0
4 additions, 0 deletions
geomagio/Controller.py
geomagio/processing/obsrio.py
+12
-24
12 additions, 24 deletions
geomagio/processing/obsrio.py
with
16 additions
and
24 deletions
geomagio/Controller.py
+
4
−
0
View file @
e087080e
...
...
@@ -60,6 +60,10 @@ class Controller(object):
self
.
_inputInterval
=
inputInterval
self
.
_outputFactory
=
outputFactory
self
.
_outputInterval
=
outputInterval
self
.
_inputFactory
.
interval
=
self
.
_inputInterval
or
self
.
_inputFactory
.
interval
self
.
_outputFactory
.
interval
=
(
self
.
_outputInterval
or
self
.
_outputFactory
.
interval
)
def
_get_input_timeseries
(
self
,
observatory
,
channels
,
starttime
,
endtime
,
algorithm
=
None
...
...
This diff is collapsed.
Click to expand it.
geomagio/processing/obsrio.py
+
12
−
24
View file @
e087080e
...
...
@@ -139,11 +139,9 @@ def obsrio_day(
"""
Filter 1 second edge H,E,Z,F to 1 day miniseed U,V,W,F.
"""
starttime
,
endtime
=
get_realtime_interval
(
realtime_interval
)
controller
=
Controller
(
inputFactory
=
input_factory
or
get_edge_factory
(
data_type
=
"
variation
"
,
interval
=
"
minute
"
),
inputFactory
=
input_factory
or
get_edge_factory
(),
inputInterval
=
"
minute
"
,
outputFactory
=
output_factory
or
get_miniseed_factory
(
data_type
=
"
variation
"
,
interval
=
"
day
"
),
outputFactory
=
output_factory
or
get_miniseed_factory
(),
outputInterval
=
"
day
"
,
)
renames
=
{
"
H
"
:
"
U
"
,
"
E
"
:
"
V
"
,
"
Z
"
:
"
W
"
,
"
F
"
:
"
F
"
}
...
...
@@ -178,11 +176,9 @@ def obsrio_hour(
"""
Filter 1 second edge H,E,Z,F to 1 hour miniseed U,V,W,F.
"""
starttime
,
endtime
=
get_realtime_interval
(
realtime_interval
)
controller
=
Controller
(
inputFactory
=
input_factory
or
get_edge_factory
(
data_type
=
"
variation
"
,
interval
=
"
minute
"
),
inputFactory
=
input_factory
or
get_edge_factory
(),
inputInterval
=
"
minute
"
,
outputFactory
=
output_factory
or
get_miniseed_factory
(
data_type
=
"
variation
"
,
interval
=
"
hour
"
),
outputFactory
=
output_factory
or
get_miniseed_factory
(),
outputInterval
=
"
hour
"
,
)
renames
=
{
"
H
"
:
"
U
"
,
"
E
"
:
"
V
"
,
"
Z
"
:
"
W
"
,
"
F
"
:
"
F
"
}
...
...
@@ -221,11 +217,9 @@ def obsrio_minute(
"""
starttime
,
endtime
=
get_realtime_interval
(
realtime_interval
)
controller
=
Controller
(
inputFactory
=
input_factory
or
get_edge_factory
(
data_type
=
"
variation
"
,
interval
=
"
second
"
),
inputFactory
=
input_factory
or
get_edge_factory
(),
inputInterval
=
"
second
"
,
outputFactory
=
output_factory
or
get_edge_factory
(
data_type
=
"
variation
"
,
interval
=
"
minute
"
),
outputFactory
=
output_factory
or
get_edge_factory
(),
outputInterval
=
"
minute
"
,
)
for
channel
in
[
"
H
"
,
"
E
"
,
"
Z
"
,
"
F
"
]:
...
...
@@ -258,10 +252,8 @@ def obsrio_second(
starttime
,
endtime
=
get_realtime_interval
(
realtime_interval
)
controller
=
Controller
(
algorithm
=
Algorithm
(
inchannels
=
(
"
F
"
,),
outchannels
=
(
"
F
"
,)),
inputFactory
=
input_factory
or
get_miniseed_factory
(
data_type
=
"
variation
"
),
inputInterval
=
"
second
"
,
outputFactory
=
output_factory
or
get_edge_factory
(
data_type
=
"
variation
"
),
outputInterval
=
"
second
"
,
inputFactory
=
input_factory
or
get_miniseed_factory
(),
outputFactory
=
output_factory
or
get_edge_factory
(),
)
controller
.
run_as_update
(
observatory
=
(
observatory
,),
...
...
@@ -285,11 +277,9 @@ def obsrio_temperatures(
"""
Filter temperatures 1Hz miniseed (LK1-4) to 1 minute legacy (UK1-4).
"""
starttime
,
endtime
=
get_realtime_interval
(
realtime_interval
)
controller
=
Controller
(
inputFactory
=
input_factory
or
get_miniseed_factory
(
data_type
=
"
variation
"
,
interval
=
"
second
"
),
inputFactory
=
input_factory
or
get_miniseed_factory
(),
inputInterval
=
"
second
"
,
outputFactory
=
output_factory
or
get_edge_factory
(
data_type
=
"
variation
"
,
interval
=
"
minute
"
),
outputFactory
=
output_factory
or
get_edge_factory
(),
outputInterval
=
"
minute
"
,
)
renames
=
{
"
LK1
"
:
"
UK1
"
,
"
LK2
"
:
"
UK2
"
,
"
LK3
"
:
"
UK3
"
,
"
LK4
"
:
"
UK4
"
}
...
...
@@ -324,11 +314,9 @@ def obsrio_tenhertz(
"""
Filter 10Hz miniseed U,V,W to 1Hz legacy H,E,Z.
"""
starttime
,
endtime
=
get_realtime_interval
(
realtime_interval
)
controller
=
Controller
(
inputFactory
=
input_factory
or
get_miniseed_factory
(
data_type
=
"
variation
"
,
interval
=
"
tenhertz
"
),
inputFactory
=
input_factory
or
get_miniseed_factory
(),
inputInterval
=
"
tenhertz
"
,
outputFactory
=
output_factory
or
get_edge_factory
(
data_type
=
"
variation
"
,
interval
=
"
second
"
),
outputFactory
=
output_factory
or
get_edge_factory
(),
outputInterval
=
"
second
"
,
)
renames
=
{
"
U
"
:
"
H
"
,
"
V
"
:
"
E
"
,
"
W
"
:
"
Z
"
}
...
...
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