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
Compare revisions
d3c08212049e3ddda761503abfaae0c5d5431a20 to c7bbaa241df8bc99a658b9d9b68d7393bfe45066
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
ghsc/geomag/geomag-algorithms
Select target project
No results found
c7bbaa241df8bc99a658b9d9b68d7393bfe45066
Select Git revision
Swap
Target
ghsc/geomag/geomag-algorithms
Select target project
ghsc/geomag/geomag-algorithms
1 result
d3c08212049e3ddda761503abfaae0c5d5431a20
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
test temp aliases
· 12d133e7
Cain, Payton David
authored
3 years ago
12d133e7
add temp aliases to element conversions
· f1068161
Cain, Payton David
authored
3 years ago
f1068161
Merge branch 'temp-aliases' into 'master'
· c7bbaa24
Cain, Payton David
authored
3 years ago
Temp aliases See merge request
!157
c7bbaa24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
geomagio/edge/SNCL.py
+5
-0
5 additions, 0 deletions
geomagio/edge/SNCL.py
test/edge_test/SNCL_test.py
+55
-0
55 additions, 0 deletions
test/edge_test/SNCL_test.py
with
60 additions
and
0 deletions
geomagio/edge/SNCL.py
View file @
c7bbaa24
...
...
@@ -9,6 +9,11 @@ ELEMENT_CONVERSIONS = {
# derived indicies
"
Dst3
"
:
"
X3
"
,
"
Dst4
"
:
"
X4
"
,
# temperatures
"
T1
"
:
"
K1
"
,
"
T2
"
:
"
K2
"
,
"
T3
"
:
"
K3
"
,
"
T4
"
:
"
K4
"
,
}
CHANNEL_CONVERSIONS
=
{
...
...
This diff is collapsed.
Click to expand it.
test/edge_test/SNCL_test.py
View file @
c7bbaa24
...
...
@@ -102,6 +102,38 @@ def test_element():
).
element
==
"
U_Sat
"
)
assert
(
SNCL
(
station
=
"
BOU
"
,
channel
=
"
UK1
"
,
location
=
"
R0
"
,
).
element
==
"
T1
"
)
assert
(
SNCL
(
station
=
"
BOU
"
,
channel
=
"
UK2
"
,
location
=
"
R0
"
,
).
element
==
"
T2
"
)
assert
(
SNCL
(
station
=
"
BOU
"
,
channel
=
"
UK3
"
,
location
=
"
R0
"
,
).
element
==
"
T3
"
)
assert
(
SNCL
(
station
=
"
BOU
"
,
channel
=
"
UK4
"
,
location
=
"
R0
"
,
).
element
==
"
T4
"
)
def
test_get_channel
():
...
...
@@ -161,6 +193,10 @@ def test_get_channel():
assert
(
get_channel
(
element
=
"
UK1.R0
"
,
interval
=
"
minute
"
,
data_type
=
"
variation
"
)
==
"
UK1
"
)
assert
get_channel
(
element
=
"
T1
"
,
interval
=
"
minute
"
,
data_type
=
"
variation
"
)
==
"
UK1
"
assert
get_channel
(
element
=
"
T2
"
,
interval
=
"
minute
"
,
data_type
=
"
variation
"
)
==
"
UK2
"
assert
get_channel
(
element
=
"
T3
"
,
interval
=
"
minute
"
,
data_type
=
"
variation
"
)
==
"
UK3
"
assert
get_channel
(
element
=
"
T4
"
,
interval
=
"
minute
"
,
data_type
=
"
variation
"
)
==
"
UK4
"
def
test_get_location
():
...
...
@@ -197,6 +233,9 @@ def test_get_sncl():
assert
SNCL
.
get_sncl
(
station
=
"
BOU
"
,
data_type
=
"
A0
"
,
interval
=
"
second
"
,
element
=
"
H
"
)
==
SNCL
(
station
=
"
BOU
"
,
network
=
"
NT
"
,
channel
=
"
LFH
"
,
location
=
"
A0
"
)
assert
SNCL
.
get_sncl
(
station
=
"
BOU
"
,
data_type
=
"
variation
"
,
interval
=
"
second
"
,
element
=
"
T1
"
)
==
SNCL
(
station
=
"
BOU
"
,
network
=
"
NT
"
,
channel
=
"
LK1
"
,
location
=
"
R0
"
)
def
test_interval
():
...
...
@@ -241,6 +280,22 @@ def test_interval():
).
interval
==
"
day
"
)
assert
(
SNCL
(
station
=
"
BOU
"
,
channel
=
"
UK1
"
,
location
=
"
R0
"
,
).
interval
==
"
minute
"
)
assert
(
SNCL
(
station
=
"
BOU
"
,
channel
=
"
LK1
"
,
location
=
"
R0
"
,
).
interval
==
"
second
"
)
def
test_parse_sncl
():
...
...
This diff is collapsed.
Click to expand it.