def test_extract_from_stack(self): length = 3 stack = self.st.copy() template = _template_gen(self.picks, self.st.copy(), 2) extracted = extract_from_stack(stack, template, length=length, pre_pick=0.3, pre_pad=45) self.assertEqual(len(template), len(extracted)) for tr in extracted: self.assertEqual(tr.stats.endtime - tr.stats.starttime, length)
def test_extract_from_stack_and_process(self): length = 3 stack = self.st.copy() template = _template_gen(self.picks, self.st.copy(), 2) extracted = extract_from_stack(stack, template, length=length, pre_pick=0.3, pre_pad=45, pre_processed=False, samp_rate=20, lowcut=2, highcut=8) self.assertEqual(len(template), len(extracted)) for tr in extracted: self.assertEqual(tr.stats.endtime - tr.stats.starttime, length)