Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/AmirMardan/PyFWI into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirMardan committed May 17, 2023
2 parents 6e40be6 + 15f53d7 commit c810aea
Show file tree
Hide file tree
Showing 6 changed files with 1,206 additions and 656 deletions.
135 changes: 2 additions & 133 deletions docs/sub_doc/fwi_example.rst
Expand Up @@ -193,149 +193,18 @@ these parameters as
k_0 = 1
k_end = 3
Let's call the FWI object,

.. code:: ipython3
m_est, _ = fwi(m0, method="lbfgs",
freqs=[25, 45], iter=[2, 2],
n_params=1, k_0=1, k_end=2)
.. parsed-literal::
Parameter number 1 to 1
2500.0 2500.0
for f= 25: rms is: 0.0003187612455803901 with rms_reg: 0, and rms_data: 0.0003187612455803901, rms_mp: 0.0, rms_model_relation: 0
Parameter number 1 to 1
RUNNING THE L-BFGS-B CODE
* * *
Machine precision = 2.220D-16
N = 10000 M = 10
At X0 0 variables are exactly at the bounds
At iterate 0 f= 3.18761D-04 |proj g|= 7.19684D-10
* * *
Tit = total number of iterations
Tnf = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip = number of BFGS updates skipped
Nact = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F = final function value
* * *
N Tit Tnf Tnint Skip Nact Projg F
10000 0 1 0 0 0 7.197D-10 3.188D-04
F = 3.1876124558039010E-004
CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL
.. parsed-literal::
This problem is unconstrained.
.. parsed-literal::
2500.0 2500.0
for f= 45: rms is: 0.004415073432028294 with rms_reg: 0, and rms_data: 0.004415073432028294, rms_mp: 0.0, rms_model_relation: 0
RUNNING THE L-BFGS-B CODE
* * *
Machine precision = 2.220D-16
N = 10000 M = 10
At X0 0 variables are exactly at the bounds
At iterate 0 f= 4.41507D-03 |proj g|= 2.39370D-08
ITERATION 1
---------------- CAUCHY entered-------------------
There are 0 breakpoints
GCP found in this segment
Piece 1 --f1, f2 at start point -6.4549D-13 6.4549D-13
Distance to the stationary point = 1.0000D+00
---------------- exit CAUCHY----------------------
10000 variables are free at GCP 1
.. parsed-literal::
This problem is unconstrained.
.. parsed-literal::
2499.9827111341883 2500.0297937900996
for f= 45: rms is: 0.004414360038936138 with rms_reg: 0, and rms_data: 0.004414360038936138, rms_mp: 0.0, rms_model_relation: 0
2499.9135556709416 2500.1489689504983
for f= 45: rms is: 0.004411510191857815 with rms_reg: 0, and rms_data: 0.004411510191857815, rms_mp: 0.0, rms_model_relation: 0
2499.636933817955 2500.6256695920933
for f= 45: rms is: 0.004400133620947599 with rms_reg: 0, and rms_data: 0.004400133620947599, rms_mp: 0.0, rms_model_relation: 0
2498.530446406008 2502.5324721584725
for f= 45: rms is: 0.00435509392991662 with rms_reg: 0, and rms_data: 0.00435509392991662, rms_mp: 0.0, rms_model_relation: 0
2494.1044967582216 2510.1596824239887
for f= 45: rms is: 0.004182371310889721 with rms_reg: 0, and rms_data: 0.004182371310889721, rms_mp: 0.0, rms_model_relation: 0
2476.400698167074 2540.668523486055
for f= 45: rms is: 0.003607903141528368 with rms_reg: 0, and rms_data: 0.003607903141528368, rms_mp: 0.0, rms_model_relation: 0
LINE SEARCH 5 times; norm of step = 1365.0000000000000
At iterate 1 f= 3.60790D-03 |proj g|= 1.91296D-08
ITERATION 2
----------------SUBSM entered-----------------
----------------exit SUBSM --------------------
2356.1934399025804 2683.887118020453
for f= 45: rms is: 0.0026031285524368286 with rms_reg: 0, and rms_data: 0.0026031285524368286, rms_mp: 0.0, rms_model_relation: 0
LINE SEARCH 0 times; norm of step = 3577.6768283163833
At iterate 2 f= 2.60313D-03 |proj g|= 1.26216D-08
* * *
Tit = total number of iterations
Tnf = total number of function evaluations
Tnint = total number of segments explored during Cauchy searches
Skip = number of BFGS updates skipped
Nact = number of active bounds at final generalized Cauchy point
Projg = norm of the final projected gradient
F = final function value
* * *
N Tit Tnf Tnint Skip Nact Projg F
10000 2 8 1 0 0 1.262D-08 2.603D-03
F = 2.6031285524368286E-003
STOP: TOTAL NO. of ITERATIONS REACHED LIMIT
Here is the estimated model

.. code:: ipython3
# Time to plot the results
fig = splt.earth_model(m_est, ['vp'], cmap='jet')
.. image:: fwi_example_files/fwi_example_21_0.png

Binary file modified docs/sub_doc/fwi_example_files/fwi_example_15_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
516 changes: 0 additions & 516 deletions example/fwi_example.ipynb

This file was deleted.

0 comments on commit c810aea

Please sign in to comment.