; plotting methods (defmeth inverse-proto :plot-solution () (if (send self :constrained-solution) (let* ((solution (/ 1 (send self :constrained-solution))) (zmin (send self :zmin)) (zmax (send self :zmax)) (solplot (plot-lines (rseq zmin zmax (length solution)) solution)) (eps (send self :eps)) ) (send solplot :title (format nil "singular value truncation level ~f" eps)) (send solplot :variable-label 0 "depth (m)") (send solplot :variable-label 1 "P-wave velocity (km/s)") (send solplot :adjust-to-data) (send solplot :draw-string (format nil "~f minimum sval used" eps) 0 0) (send solplot :location 50 100) ) ) ) (defmeth inverse-proto :plot-response () (let* ((solution (send self :constrained-solution)) (zmin (send self :zmin)) (zmax (send self :zmax)) (jac (send self :jacobian)) (response (send self :response)) (rhs (send self :rhs)) (ttplot (plot-lines (rseq zmin zmax (length rhs)) rhs)) ) (if response (send ttplot :add-lines (rseq zmin zmax (length response)) response) ) (send ttplot :title "observed vs computed travel times") (send ttplot :variable-label 0 "receiver depth (m)") (send ttplot :variable-label 1 "travel time (ms)") (send ttplot :location 450 100) (send ttplot :adjust-to-data) ) ) (defmeth inverse-proto :residual-histogram () (let* ((obsdata (send self :rhs)) (compdata (send self :response)) (error (- obsdata compdata)) (histoplot (histogram error)) ) (send histoplot :title "data residuals") (send histoplot :location 50 560) ) )