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
304e940a
Commit
304e940a
authored
3 years ago
by
Cain, Payton David
Browse files
Options
Downloads
Patches
Plain Diff
Add efield app
parent
cd8ea2bd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!166
Merge branch master into production
,
!158
Merge branch 'master' into 'production'
,
!149
Efield entrypoint
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
geomagio/processing/efield.py
+80
-0
80 additions, 0 deletions
geomagio/processing/efield.py
with
80 additions
and
0 deletions
geomagio/processing/efield.py
0 → 100644
+
80
−
0
View file @
304e940a
import
typer
from
..adjusted
import
AdjustedMatrix
from
.derived
import
adjusted
from
.factory
import
get_edge_factory
from
.obsrio
import
obsrio_minute
app
=
typer
.
Typer
()
def
main
():
app
()
@app.command
(
name
=
"
realtime
"
)
def
efield_realtime
(
observatory
:
str
=
"
BOU
"
,
host
:
str
=
"
127.0.0.1
"
,
realtime_interval
:
int
=
600
,
update_limit
:
int
=
10
,
):
"""
inverts polarity of 1Hz E-E/E-N
filters 1Hz inverted/non-inverted E-E/E-N to 1 minute
"""
adjusted
(
observatory
=
observatory
,
interval
=
"
second
"
,
input_factory
=
get_edge_factory
(
host
=
host
,
data_type
=
"
variation
"
),
input_channels
=
[
"
E-E
"
,
"
E-N
"
],
output_factory
=
get_edge_factory
(
host
=
host
,
data_type
=
"
adjusted
"
),
output_channels
=
[
"
E-E
"
,
"
E-N
"
],
matrix
=
AdjustedMatrix
(
matrix
=
[
[
-
1
,
0
,
0
],
[
0
,
-
1
,
0
],
[
0
,
0
,
1
],
],
),
realtime_interval
=
realtime_interval
,
update_limit
=
update_limit
,
)
obsrio_minute
(
observatory
=
observatory
,
channels
=
[
"
E-E
"
,
"
E-N
"
],
input_factory
=
get_edge_factory
(
host
=
host
,
data_type
=
"
variation
"
),
output_factory
=
get_edge_factory
(
host
=
host
,
data_type
=
"
variation
"
),
realtime_interval
=
realtime_interval
,
update_limit
=
update_limit
,
)
obsrio_minute
(
observatory
=
observatory
,
channels
=
[
"
E-E
"
,
"
E-N
"
],
input_factory
=
get_edge_factory
(
host
=
host
,
data_type
=
"
adjusted
"
),
output_factory
=
get_edge_factory
(
host
=
host
,
data_type
=
"
adjusted
"
),
realtime_interval
=
realtime_interval
,
update_limit
=
update_limit
,
)
@app.command
(
name
=
"
hour
"
)
def
efield_hour
(
observatory
:
str
=
"
BOU
"
,
host
:
str
=
"
127.0.0.1
"
,
realtime_interval
:
int
=
600
,
update_limit
:
int
=
10
,
):
"""
filters 1 minute inverted/non-inverted E-E/E-N to 1 hour
"""
raise
NotImplementedError
(
"
hour not implemented
"
)
@app.command
(
name
=
"
day
"
)
def
efield_day
(
observatory
:
str
=
"
BOU
"
,
host
:
str
=
"
127.0.0.1
"
,
realtime_interval
:
int
=
600
,
update_limit
:
int
=
10
,
):
"""
filters 1 minute inverted/non-inverted E-E/E-N to 1 day
"""
raise
NotImplementedError
(
"
day not implemented
"
)
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