def event_description(self, event_amplitudes): """Add some event descriptions to the event""" event_amplitudes.event_descriptions.append( ev.EventDescription(text="Keep Me")) event_amplitudes.event_descriptions.append( ev.EventDescription(text="Toss Me")) return event_amplitudes
def cat_with_descs(): """ Create a catalog with some simple descriptions added. """ cat = obspy.read_events() descs = ["LR", "LR", "SomeSillyEvent"] for event, desc_txt in zip(cat, descs): desc = ev.EventDescription(desc_txt) event.event_descriptions.insert(0, desc) return cat
def ebank(tmpdir): """ Create a bank from the default catalog. """ path = Path(tmpdir) / "events" # get catalog, add event descriptions to it cat = obspy.read_events() descs = ["LR", "LR", "SomeSillyEvent"] for event, desc_txt in zip(cat, descs): desc = ev.EventDescription(desc_txt) event.event_descriptions.insert(0, desc) obsplus.events.utils.catalog_to_directory(cat, path) ebank = EventBank(path) ebank.update_index() return ebank
def _get_event_description(): return ev.EventDescription( text='some text about the EQ', type='earthquake name', )