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
d516d6fe
Commit
d516d6fe
authored
3 years ago
by
Cain, Payton David
Browse files
Options
Downloads
Patches
Plain Diff
Add client for misaligned mseed data
parent
c7bbaa24
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!166
Merge branch master into production
,
!142
Align mseed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/edge_test/mseed_test_clients.py
+23
-0
23 additions, 0 deletions
test/edge_test/mseed_test_clients.py
with
23 additions
and
0 deletions
test/edge_test/
MockMiniSeedC
lient.py
→
test/edge_test/
mseed_test_c
lient
s
.py
+
23
−
0
View file @
d516d6fe
...
@@ -37,3 +37,26 @@ class MockMiniSeedClient(Client):
...
@@ -37,3 +37,26 @@ class MockMiniSeedClient(Client):
)
)
trace
.
data
=
numpy
.
ones
(
trace
.
stats
.
npts
)
trace
.
data
=
numpy
.
ones
(
trace
.
stats
.
npts
)
return
Stream
([
trace
])
return
Stream
([
trace
])
class
MisalignedMiniSeedClient
(
MockMiniSeedClient
):
"""
mock client that adds an offset value to endtime
"""
def
__init__
(
self
,
increment
:
int
=
1
):
self
.
increment
=
increment
self
.
offset
=
0
def
get_waveforms
(
self
,
network
:
str
,
station
:
str
,
location
:
str
,
channel
:
str
,
starttime
:
UTCDateTime
,
endtime
:
UTCDateTime
,
):
endtime
=
endtime
+
self
.
offset
self
.
offset
=
self
.
offset
+
self
.
increment
return
super
().
get_waveforms
(
network
,
station
,
location
,
channel
,
starttime
,
endtime
)
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