Created
December 24, 2018 04:04
-
-
Save calum-chamberlain/a7cc11ae8dd0f5387d627e5c5de94a7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SparseEvent: | |
""" | |
Sparse event class with only picks and origins to mimic | |
obspy events. | |
""" | |
def __init__(self, resource_id, origins, picks): | |
self.resource_id = resource_id | |
self.origins = origins | |
self.picks = picks | |
def preferred_origin(self): | |
return self.origins[0] | |
class SparsePick: | |
def __init__(self, time, phase_hint, waveform_id, evaluation_mode): | |
self.time = time | |
self.phase_hint = phase_hint | |
self.waveform_id = waveform_id | |
self.evaluation_mode = evaluation_mode | |
class SparseOrigin: | |
def __init__(self, latitude, longitude, time, depth): | |
self.latitude = latitude | |
self.longitude = longitude | |
self.depth = depth | |
self.time = time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment