def test_from_mseed_file(self, tmpdir): """ A path to a file should return a stream from that file. """ st = obspy.read() new_path = Path(tmpdir) / "stream.mseed" st.write(str(new_path), "mseed") client = get_waveform_client(new_path) assert isinstance(client, WaveformClient)
def set_waveforms(self, waveforms: fetcher_waveform_type): """ Set waveform state in Fetcher. Parameters ---------- waveforms Data representing waveforms, from which a wave client can be inferred. """ try: self.waveform_client = get_waveform_client(waveforms) except TypeError: # if the waveform client is already defined keep it self.waveform_client = getattr(self, "waveform_client", None)
def test_from_bank(self, default_wbank): """ A waveform client should just return itself. """ client = get_waveform_client(default_wbank) assert isinstance(client, WaveformClient)