Inversion of seismic reflection traveltimes using a nonlinear optimization scheme