# Calculation of Theoretical Travel Time and Automatic Picking of Actual Travel Time in Seismic Data
## 2 Seismic Phase Theory Travel Time Calculation
\begin{cases}\frac{d}{ds}\left(\frac{1}{v}\frac{d\widetilde{x}}{ds}\right)= \frac{\partial}{\partial x}\left(\frac{1}{v}\right)\\ \frac{d}{ds}\left(\frac{1}{v}\frac{d\widetilde{x}}{ds}\right)=\frac{\partial} {\partial y}\left(\frac{1}{v}\right)\\ \frac{d}{ds}\left(\frac{1}{v}\frac{d\widetilde{x}}{ds}\right)=\frac{\partial} {\partial z}\left(\frac{1}{v}\right)\end{cases}  \tag{10}\]  
If three directional cosines are induced at a point on the ray, i.e.,  
\[ \begin{cases}cos\theta_{x}=\frac{\partial x}{\partial\widetilde{x}}\\ cos\theta_{y}=\frac{\partial y}{\partial\widetilde{x}}\\ cos\theta_{z}=\frac{\partial z}{\partial\widetilde{z}}\end{cases}  \tag{11}\]  
from Equations (3) and (11) two equations can be obtained:  
\[ \begin{cases}\frac{\partial x}{\partial\tau}=vcos\theta_{x}\\ \frac{\partial y}{\partial\tau}=vcos\theta_{y}\\ \frac{\partial z}{\partial\tau}=vcos\theta_{z}\end{cases}  \tag{12}\]  
Meanwhile, the other three first-order differential equations for the angle can be obtained from Equations (10) and (11):  
\[ \begin{cases}\frac{d}{ds}\left(\frac{1}{v}cos\theta_{x}\right)=\frac{\partial} {\partial x}\left(\frac{1}{v}\right)\\ \frac{d}{ds}\left(\frac{1}{v}cos\theta_{y}\right)=\frac{\partial}{\partial y} \left(\frac{1}{v}\right)\\ \frac{d}{ds}\left(\frac{1}{v}cos\theta_{z}\right)=\frac{\partial}{\partial z} \left(\frac{1}{v}\right)\\ \end{cases} \text{i.e.,} \begin{cases}\frac{d}{ds}\left(\frac{1}{v}\right)cos \theta_{x}-\frac{1}{v}sin\theta_{x}\frac{d\theta_{x}}{ds}=\frac{\partial}{ \partial x}\left(\frac{1}{v}\right)\\ \frac{d}{ds}\left(\frac{1}{v}\right)cos\theta_{y}-\frac{1}{v}sin\theta_{y} \frac{d\theta_{y}}{ds}=\frac{\partial}{\partial y}\left(\frac{1}{v}\right)\\ \frac{d}{ds}\left(\frac{1}{v}\right)cos\theta_{z}-\frac{1}{v}sin\theta_{z} \frac{d\theta_{y}}{ds}=\frac{\partial}{\partial z}\left(\frac{1}{v}\right) \end{cases}  \tag{13}\]  
Note that in the above equation we have \(\theta_{x}+\theta_{y}=90^{\circ}\), and using Equation (3), we get  
\[ \begin{cases}\frac{\partial\theta_{x}}{\partial\tau}=\frac{\partial v}{ \partial x}sin\theta_{x}-\frac{\partial v}{\partial y}cot\theta_{x}cos\theta _{y}-\frac{\partial v}{\partial z}cot\theta_{x}cos\theta_{z}\\ \frac{\partial v}{\partial\tau}=\frac{\partial v}{\partial y}sin\theta_{y}- \frac{\partial v}{\partial x}cot\theta_{x}cos\theta_{y}-\frac{\partial v}{ \partial z}cot\theta_{y}cos\theta_{z}\\ \frac{\partial\theta_{z}}{\partial\tau}=\frac{\partial v}{\partial z}sin\theta_ {z}-\frac{\partial v}{\partial x}cot\theta_{x}cos\theta_{z}-\frac{\partial v}{ \partial y}cot\theta_{x}cos\theta_{y}\end{cases}  \tag{14}\]  
Equations (12) and (14) constitute the kinematic ray-tracing system in three-dimensional space. For the IASP91 Earth velocity model, the medium velocity at any point inside the Earth is only related to the radial radius of that point, so the numerical simulation of the seismic wave travel time is reduced to ray tracing in a two-dimensional medium. The velocity of the medium at any point in the model is only related to the radial radius of that point, so the IASP91 Earth velocity model can be regarded as a two-dimensional circle structure model, and the ray paths of most of the seismic phases can be simulated by the semicircular circle structure model, except for several multiple reflection phases. In this case, assuming that the velocity depends only on the \(x\) and \(z\) directions, and \(\theta_{x}=\alpha\), \(\theta_{y}=\pi/2\), \(\theta_{z}=\pi/2-\alpha\), Equation (14) can be simplified as:  
\[\left\{ \begin{array}{c}\frac{\partial x}{\partial t}=vcos\alpha\\ \frac{\partial z}{\partial t}=vsin\alpha\\ \frac{\partial\alpha}{\partial t}=\frac{\partial\alpha}{\partial x}sin\alpha -\frac{\partial\alpha}{\partial z}cos\alpha\end{array} \right. \tag{15}\]  
Let the coordinates of the starting point S of the ray be (\(x_{0}\), \(z_{0}\)) and the coordinates of any point P on the ray be (\(x\), \(z\)), then Equation (4) can be discretized as:  
\[\left\{