4.2.1.9. eqcorrscan.core.template_gen.multi_template_gen¶
-
eqcorrscan.core.template_gen.
multi_template_gen
(catalog, st, length, swin=u'all', prepick=0.05, all_horiz=False, delayed=True, plot=False, debug=0)[source]¶ Generate multiple templates from one stream of data. Thin wrapper around _template_gen to generate multiple templates from one stream of continuous data.
Parameters: - catalog (obspy.core.event.Catalog) Events to extract templates for
- st (obspy.core.stream.Stream) Processed stream to extract from, e.g. filtered and re-sampled to what you want using pre_processing.dayproc.
- length (float) Length of template in seconds
- swin (string) P, S or all, defaults to all
- prepick (float) Length in seconds to extract before the pick time default is 0.05 seconds
- all_horiz (bool) To use both horizontal channels even if there is only a pick on one of them. Defaults to False.
- plot (bool) To plot the template or not, default is True
- debug (int) Debug output level from 0-5.
- 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: list of :class: obspy.core.Stream newly cut templates
Note
By convention templates are generated with P-phases on the vertical channel and S-phases on the horizontal channels, normal seismograph naming conventions are assumed, where Z denotes vertical and N, E, R, T, 1 and 2 denote horizontal channels, either oriented or not. To this end we will only use Z channels if they have a P-pick, and will use one or other horizontal channels only if there is an S-pick on it.
Warning
If there is no phase_hint included in picks, and swin=all, all channels with picks will be used.