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
fa5c6118
Commit
fa5c6118
authored
9 years ago
by
Hal Simpson
Browse files
Options
Downloads
Patches
Plain Diff
Added get_deltaf/get_computed_f_squares routine(s) for computing deltaf
parent
617027f1
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/ChannelConverter.py
+38
-0
38 additions, 0 deletions
geomagio/ChannelConverter.py
with
38 additions
and
0 deletions
geomagio/ChannelConverter.py
+
38
−
0
View file @
fa5c6118
...
...
@@ -378,6 +378,44 @@ def get_obs_h_from_mag(h, d, d0=0):
return
numpy
.
multiply
(
h
,
numpy
.
cos
(
obs_d
))
def
get_deltaf
(
fv
,
fs
):
"""
gets the deltaf value given the scalar F and computed F values.
Parameters
----------
fv: array_like
the F vector computed from the observatory instruments
fs: array_like
the measured F value
"""
return
numpy
.
subtract
(
fv
,
fs
)
def
get_computed_f_using_squares
(
x
,
y
,
z
):
"""
gets the computed f value
Parameters
----------
x: array_like
the x component from the observatory
y: array_like
the y component from the observatory
z: array_like
the z component from the observatory
Notes
-----
This works for geographic coordinates, or observatory coordinates.
ie x, y, z or h, e, z
We
'
re using variables x,y,z to represent generic cartisian coordinates.
"""
x2
=
numpy
.
square
(
x
)
y2
=
numpy
.
square
(
y
)
z2
=
numpy
.
square
(
z
)
fv
=
numpy
.
add
(
x2
,
y2
)
fv
=
numpy
.
add
(
fv
,
z2
)
return
numpy
.
sqrt
(
fv
)
def
get_radians_from_minutes
(
m
):
"""
gets the radian value given the decimal value
Parameters
...
...
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