seisscan.do_pcc
- seisscan.do_pcc(st, channel, reference, secondaries=[], w=1.0, dt=0.1, max_lag=0.1, pos='end', method=0, dask_client=None)
Create peak cross-correlation function between a reference and a list of secondary stations.
Parameters
- st: ObsPy.Stream
Waveform stream.
- channel: str
Channel code.
- reference: str
Reference station code
- secondaries: list
A list of secondary station codes.
- w: float
Window length in seconds. Default is 1.0 second.
- dt: float
Sampling interval (seconds) of the returned characteristic function. Default is 0.1 second.
- max_lag: float
Maximum allowed lag in seconds. Default is 0.1 second.
- pos: str
Position of the max normalized cross-correlation value in each window. Possible values are ‘start’, ‘mid’ or ‘end’. Default value is ‘end’.
- method: int
One of the integer (0, 1, 2, 3). It determines type of normalized cross-correlation (cor). If method = 0, it returns cor. If method = 1, it returns |cor|. If method = 2, it returns cor*cor. If method = 3, it returns cor*|cor|. Default method is 0.
Returns
- st_r: ObsPy.Stream
Waveform stream for reference stations.
- st_s: ObsPy.Stream
Waveform stream for secondary stations.
- st_pcc: ObsPy.Stream
Peak cross-correlation stream.
- st_dpcc: ObsPy.Stream
Differentiated peak cross-correlation stream.
Example
>>> import seisscan as ss >>> >>> event_dict, st, inventory, subnetworks, model_name = ss.read_example() >>> >>> subnetwork = subnetworks[0] >>> reference = subnetwork["reference"] >>> secondaries = subnetwork["secondaries"] >>> >>> st_r, st_s, st_pcc, st_dpcc = ss.do_pcc(st, "DPZ", reference, subnetworks=subnetworks)