# An Interactive System Based on the IASP91 Earth Model for Earthquake Data Processing
## 3 Major Functions
### Cross-Correlation for Automatialy Picking Seismic Phase Arrivals  
Let the seismic record of a given seismic event received by \(N\) stations be \(x_{i}(t)\), and its discrete signal be \(x_{ij}\) (\(i\) = 1, 2, 3,..., \(N\), \(j\) = 1, 2, 3,..., \(N_{x}\)); the wavelet of a given seismic phase of that event be \(s(t)\), and its discrete signal be \(s_{k}\) (\(k\) = 1, 2, 3,..., \(N_{s}\)), and that wavelet can be extracted from the best seismic record among \(N\) stations. Also, assuming that the theoretical arrival time of this seismic phase is \(t_{i}\), then the correlation coefficient between the seismic record of the \(i\)th station after moment \(t\) and the specified wavelet can be expressed as  
\[R_{i}(\tau)=\frac{\sum x_{i}(t+\tau)s(t)}{\sqrt{\sum x_{i}^{2}(t)\sum s^{2}(t)}} \tag{11}\]  
The discrete form can be expressed as  
\[R_{i}(k)=\frac{\sum_{j=k}^{k+N_{s}-1}x_{ij}s_{j}}{\sqrt{\sum_{j=k}^{k+N_{s}-1} x_{ij}^{2}\sum_{j=k}^{k+N_{s}}s_{j}^{2}}} \tag{12}\]  
\(t\) = \((k-1)\)\(\triangle t\), \(k\) = 1, 2, 3,..., \(N_{x}\), and \(\triangle t\) is the sampling interval of the seismic waveform. According to the definition of correlation coefficient, the value of \(R_{i}\) can be taken between 0 and 1. When \(R_{i}\) = 1, it means that the two series are identical; when \(R_{i}\) = 0, it means that the two series are completely unrelated; the larger the value of \(R_{i}\), the greater the similarity of the two waveforms is characterized [32]. If the correlation coefficient between the seismic record of the \(i\)th station after moment \(t\) and the specified wavelet is maximum, then the corresponding \(t\) = \((k-1)\)\(\triangle t\) is the arrival time of the specified phase received by that station, and the seismic wave traveltime \(t_{i}\) of that phase can be obtained according to the seismic event's moment of origin \(t_{0}\). In Figure 2, \(x(t)\) and \(s(t)\) are two artificially shifted sequences of the same signal, where \(x(t)\) is obtained by shifting \(s(t)\) to the right for 10 s, when \(R_{i}\) reaches its maximum value. (1) Wavelet selection  
In general, the shorter the time period, the better the waveform characteristics are identified. Therefore, when picking the seismic phase, the length of the display should not exceed 300 s. When picking the seismogram, select Picking in the Settings menu to select a recorder with a good signal-to-noise ratio, then select Pick Wavelet in the Settings menu to select the wavelet (the most distinctive part of the seismogram, e.g., station WQ01). Run Display\(\rightarrow\)Display Seismograms to select the wavelet. Always refresh the screen by running Display Seismograms before the wavelet is selected. Also, to ensure the accuracy of the seismogram picking, use as short a wavelet as possible to prevent the wavelet from including another seismogram and affecting the accuracy of the picking. The length of the wavelet should not exceed 30 s.  
(2) Automatic Arrival-Picking by using the cross-correlation technique  
In the Settings menu, the Pick Wavelet is unchecked and then Auto Picking is selected, and the start position of the cross-correlation is given in the Settings by setting Tstart according to the proximity of most of the phases to the theoretical walk time, where when Tstart < 0, the interoff starts at Tstart on the left side of the theoretical walk time, and vice versa, when Tstart > 0, the interoff starts at Tstart on the right side of the theoretical walk. Once the parameters are set, the correlation between the seismic waveforms at other stations and the selected sub-waves at station WQ01 is achieved by running Functions\(\rightarrow\)Phase correlation. If the correlation is not good for individual stations, the system can be fine-tuned manually by unchecking Auto Picking in the Settings option, then determining the best arrival time by mouse picking, and running Functions\(\rightarrow\)Phase correlation to refresh until satisfied.