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
4804bcc2
Commit
4804bcc2
authored
4 years ago
by
Cain, Payton David
Browse files
Options
Downloads
Plain Diff
Merge branch 'adj-update' of
https://github.com/pcain-usgs/geomag-algorithms
into adj-update
parents
a70f50c0
b070a8a2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
geomagio/algorithm/AdjustedAlgorithm.py
+22
-0
22 additions, 0 deletions
geomagio/algorithm/AdjustedAlgorithm.py
with
22 additions
and
0 deletions
geomagio/algorithm/AdjustedAlgorithm.py
+
22
−
0
View file @
4804bcc2
...
...
@@ -130,6 +130,7 @@ class AdjustedAlgorithm(Algorithm):
out
=
None
inchannels
=
self
.
inchannels
outchannels
=
self
.
outchannels
<<<<<<<
HEAD
# Gather input traces in order of user input(inchannels)
raws
=
[
stream
.
select
(
channel
=
channel
)
for
channel
in
inchannels
if
channel
!=
"
F
"
...
...
@@ -147,6 +148,24 @@ class AdjustedAlgorithm(Algorithm):
out
=
Stream
()
# Create new steam with adjusted data in order of user input(outchannels)
=======
raws
=
[]
for
channel
in
inchannels
:
if
channel
!=
"
F
"
:
trace
=
stream
.
select
(
channel
=
channel
)[
0
]
raws
.
append
(
trace
.
data
)
raws
.
append
(
np
.
ones_like
(
stream
[
0
].
data
))
raws
=
np
.
vstack
(
raws
)
adj
=
np
.
dot
(
self
.
matrix
,
raws
)
if
"
F
"
in
inchannels
:
f
=
stream
.
select
(
channel
=
"
F
"
)[
0
]
fnew
=
f
.
data
+
self
.
pier_correction
adj
[
-
1
]
=
fnew
out
=
Stream
()
>>>>>>>
b070a8a254d9e88ce6c09b5f57d6781adddce27b
for
i
in
range
(
len
(
stream
)):
trace
=
stream
[
i
]
data
=
adj
[
i
]
...
...
@@ -191,7 +210,10 @@ class AdjustedAlgorithm(Algorithm):
):
return
True
<<<<<<<
HEAD
# If being used for another conversion, check if all channels can produce data
=======
>>>>>>>
b070a8a254d9e88ce6c09b5f57d6781adddce27b
if
np
.
all
(
[
super
(
AdjustedAlgorithm
,
self
).
can_produce_data
(
...
...
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