Travel Time Residual Calculation
Each iteration the travel time residual for every defining phase is calculated
with respect to the last solution found. This must done after phases have
been reidentified in the light of the current source location (id_pha) and before weighting (calc_weight). The function responsible for giving residuals to those phases that will contribute to the next solution is calc_resid
. (This function is also called in a different mode after a final convergence
to give residuals to all possible phases, whether they were used or not.)
Function calc_resid
steps through the phases calculating the observed travel time and calling function read_ttime
to get the model travel time, it then subtracts the second from the first
to get the residual. To simplify the use of different methods to calculate
residuals the function read_ttime
is just an interface for a model specific travel time function, see the
section on changing travel time models. In addition to calling a travel
time function function read_ttime
calls a function correct_ttime
that can be used to apply corrections based on station elevation or crustal
model. These corrections can be turned on or off in the configuration
file.
Each
phase
structure has 11 members related to the calculation of the residual
and derivatives used in each solution:
-
sta_lat - latitude of the station recording the arrival in degrees.
Set in whatever function is being used for data input.
-
sta_lon - longitude of the station recording the arrival in degrees.
Set in whatever function is being used for data input.
-
sta_elev - elevation of the station above the geoid in metres.
Set in whatever function is being used for data input.
-
dircos - array of direction cosines of the station location. Set in whatever
function is being used for data input.
-
delta - distance between the station and the current epicentre in
degrees. Set in function calc_delaz.
-
esaz - back azimuth between station and current epicentre in degrees. Set in function calc_delaz.
-
time - arrival time of the phase in seconds since the epoch defined in
iscloc.h. Set in whatever function is being used for data input.
-
ttime - theoretical travel time for the phase in seconds. Set
in the travel time function called by function
read_ttime.
-
resid - difference between observed travel time and time from tables for the phase in seconds. Set in calc_resid.
-
dtdh - derivative of time with respect to distance in seconds per
degree. Set in the travel time function called by function
read_ttime.
-
dtdd - derivative of time with respect to depth in seconds
per kilometre. Set in the travel time function called by function
read_ttime.
There are two external variables related to the calculation of travel times assigned in
read_config and corresponding to lines in
config.txt:
- crust_corr_on - either 0 or 1. Switch
for correction of travel times for separate crustal model. If set to
1 correction will be done.
-
elev_corr_on - either 0 or 1. Switch for correction of travel times for station elevation. If set to 1 correction will be done.