init_sol
Called by: main for each new seed/option.
Includes: iscloc.h
External:
sigma_start
set in read_config
weighting1
set in read_config
default_depth
set in read_config
Input arguments:
Pointer to solution
structure.
Pointer to event
structure.
Pointer to hypocentre
structure.
Calls: Function calc_dircos
from utils
.
Structure members updated:
time, lat, lon, dircos, and depth
in the
solution
structure.
converged, diverging, and phases_purged
in the
solution
structure.
numphas, weighting_type, and sigma
in the
solution
structure.
error
, sdobs
, mindist
, maxdist
, minax
, majax
, and theta
in the
solution
structure.
depdp
in the solution
structure.
Return: 0/1 for success/failure
This function sets up the solution for the first iteration using the hypocentre
passed to it as an argument. It also initialises the flags converged, diverging, and phases_purged
for a new solution and sets weighting_type
and sigma
to those given in config.txt
. For the sake of diagnostic messages that might be printed midway
through an iteration errors are set to 0 here and the value of depdp
is initialised
to NULLVAL in case none is calculated for this solution.