Skip to content
Snippets Groups Projects
Commit d516d6fe authored by Cain, Payton David's avatar Cain, Payton David
Browse files

Add client for misaligned mseed data

parent c7bbaa24
No related branches found
No related tags found
2 merge requests!166Merge branch master into production,!142Align mseed
...@@ -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
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment