4.2.1.7. eqcorrscan.core.template_gen.from_seishub¶
-
eqcorrscan.core.template_gen.
from_seishub
(catalog, url, lowcut, highcut, samp_rate, filt_order, length, prepick, swin, process_len=86400, data_pad=90, all_horiz=False, delayed=True, debug=0, plot=False)[source]¶ Generate multiplexed template from SeisHub database. Function to generate templates from a SeisHub database. Must be given an obspy.Catalog class and the SeisHub url as input. The function returns a list of obspy.Stream classes containting steams for each desired template.
Parameters: - catalog (obspy.core.event.Catalog) Catalog class containing desired template events
- url (str) url of SeisHub database instance
- lowcut (float) Low cut (Hz), if set to None will look in template defaults file
- highcut (float) High cut (Hz), if set to None will look in template defaults file
- samp_rate (float) New sampling rate in Hz, if set to None will look in template defaults file
- filt_order (int) Filter level, if set to None will look in template defaults file
- length (float) Extract length in seconds, if None will look in template defaults file.
- prepick (float) Pre-pick time in seconds
- swin (str) Either ‘all’, ‘P’ or ‘S’, to select which phases to output.
- process_len (int) Length of data in seconds to download and process.
- data_pad (int) Length of data (in seconds) required before and after any event for processing, use to reduce edge-effects of filtering on the templates.
- all_horiz (bool) To use both horizontal channels even if there is only a pick on one of them. Defaults to False.
- debug (int) Level of debugging output, higher=more
- plot (bool) Plot templates or not.
- delayed (bool) If True, each channel will begin relative to it’s own pick-time, if set to False, each channel will begin at the same time.
Returns: obspy.core.stream.Stream Newly cut template
Note
process_len should be set to the same length as used when computing detections using match_filter.match_filter, e.g. if you read in day-long data fro match_filter, process_len should be 86400.