├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md ├── .gitignore ├── .readthedocs.yaml ├── .vscode └── settings.json ├── README.md ├── TODO ├── coding.sh ├── codingfwi.py ├── doc ├── Makefile ├── advanced.md ├── conf.py ├── configure.md ├── data_format.md ├── figures │ ├── advsbs_acoustic │ │ ├── compare_AD_BS.png │ │ ├── compare_AD_BS_HABCFORWARD.png │ │ ├── compare_AD_BS_PML.png │ │ └── model_geometry.png │ ├── advsbs_elastic │ │ ├── compare_AD_BS.png │ │ └── model_geometry.png │ ├── batched_inversion │ │ ├── Inverted.png │ │ ├── model_geometry.png │ │ └── shot_gather.png │ ├── cal_adjoint_source │ │ ├── adjoint_source.png │ │ └── model_geometry.png │ ├── camembert │ │ ├── adjoint_source.png │ │ └── model_geometry.png │ ├── different_equations │ │ ├── acoustic_tti.png │ │ ├── acoustic_vti.png │ │ ├── decopule.png │ │ ├── elastic.png │ │ ├── ttielastic.png │ │ └── vacoustic.png │ ├── distribute_inversion │ │ └── geometry.gif │ ├── elastic_modeling2d │ │ ├── model_geometry.png │ │ └── shot_gather.png │ ├── forward_modeling2d │ │ ├── model_geometry.png │ │ └── shot_gather.png │ ├── forward_modeling3d │ │ ├── model_geometry.png │ │ └── shot_gather.png │ ├── gradient_clamp │ │ ├── cg │ │ │ ├── Gradientat0epoch.png │ │ │ ├── Inverted.png │ │ │ └── Model_error.png │ │ └── sd │ │ │ ├── Inverted.png │ │ │ └── Model_error.png │ ├── implicitNN │ │ ├── Inverted.png │ │ ├── Inverted_profile.png │ │ ├── model_geometry.png │ │ └── shot_gather.png │ ├── inversion_with_multiples │ │ ├── Inverted.png │ │ ├── model_geometry.png │ │ ├── shot_gather_with_multiples.png │ │ └── shot_gather_without_multiples.png │ ├── lsrtm │ │ ├── lsrtm.png │ │ ├── model_geometry.png │ │ └── shot_gather.png │ ├── misfits │ │ ├── cumulative │ │ │ ├── cumulative.png │ │ │ ├── cumulative_highpass.png │ │ │ ├── freq_spectrum_cumsum.png │ │ │ └── freq_spectrum_cumsum_highpass.png │ │ ├── env_plus_ig │ │ │ ├── Envelope.png │ │ │ ├── Integration.png │ │ │ └── original.png │ │ ├── envelope │ │ │ ├── envelope.png │ │ │ ├── freq_spectrum_envelope.png │ │ │ ├── freq_spectrum_envelope_highpass.png │ │ │ └── highpass.png │ │ ├── towed │ │ │ ├── Gradient_envelope.png │ │ │ └── Gradient_l2.png │ │ └── traveltime │ │ │ ├── cc.png │ │ │ ├── ricker.png │ │ │ └── traveltime.gif │ ├── multiples │ │ ├── model_geometry.gif │ │ ├── shot_gather.png │ │ └── trace.png │ ├── ncc_loss │ │ ├── Gradient.png │ │ ├── Inverted.png │ │ ├── Trace.png │ │ ├── geometry.gif │ │ ├── shot_gather.png │ │ └── wavelet.png │ ├── optimizers │ │ └── Inverted.png │ ├── others │ │ ├── batch_time_1gpu.png │ │ ├── batch_time_2gpu.png │ │ ├── batch_time_4gpu.png │ │ └── nodes_setting.png │ ├── random_boundary │ │ ├── model_geometry.gif │ │ └── shot_gather.png │ ├── reverse_time_migration │ │ ├── CIG.png │ │ ├── Gradients.png │ │ ├── RTM.png │ │ ├── Velocity.png │ │ ├── geometry.gif │ │ └── shotgather.png │ ├── source_encoding_acoustic │ │ ├── Inverted.jpg │ │ ├── model_geometry.png │ │ └── shot_gather.png │ ├── source_encoding_acoustic2 │ │ ├── Gradient.png │ │ ├── Inverted.png │ │ ├── model_geometry.png │ │ └── shot_gather.png │ ├── source_encoding_elastic │ │ ├── Inverted.png │ │ ├── model_geometry.png │ │ └── shot_gather.png │ ├── source_inversion │ │ ├── Final_result.png │ │ ├── model_geometry.png │ │ └── true_initial_wavelet.png │ ├── towed_acquisition │ │ ├── Inverted.png │ │ ├── geometry.gif │ │ └── shot_gather.png │ └── travel_time_misfit │ │ ├── Inverted.png │ │ ├── checkadj.png │ │ ├── geometry.gif │ │ ├── velocity_model.png │ │ └── wiggle.png ├── forward_modeling.md ├── fwi.md ├── fwiplusnn.md ├── getting_started.md ├── head.md ├── index.rst ├── make.bat ├── other_examples.md ├── quick_start.md ├── requirements.txt ├── rtm.md └── running_commands.md ├── examples ├── advances │ ├── cal_adjoint_source │ │ ├── cal_adjoint.py │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── config.yml │ │ │ └── hosts │ │ ├── forward.sh │ │ ├── generate_model_geometry.py │ │ └── show_shotgather.py │ ├── cycleskipping │ │ ├── checkadj.py │ │ ├── clean.sh │ │ ├── compare_obs.py │ │ ├── configs │ │ │ ├── with_low_frequency.yml │ │ │ ├── without_low_frequency.yml │ │ │ └── without_low_frequency_ttcc.yml │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── forward_init.yml │ │ ├── forward_invert.yml │ │ ├── generate_model_geometry.py │ │ ├── geometry.gif │ │ ├── hosts │ │ ├── inversion.sh │ │ ├── show_results.py │ │ ├── show_shotgather.py │ │ ├── wiggle.py │ │ ├── with_low_frequency.sh │ │ ├── without_low_frequency.sh │ │ └── without_low_frequency_ttcc.sh │ ├── largescale │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── forward_torch.sh │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ └── show_shotgather.py │ ├── minifwi │ │ ├── check.py │ │ ├── forward_jax.py │ │ ├── fwi.py │ │ ├── fwi_torch.py │ │ ├── ifwi.py │ │ ├── inplace_gpu_jax.py │ │ ├── inplace_gpu_torch.py │ │ ├── inplace_ops.py │ │ ├── multigpu.py │ │ ├── networks.py │ │ ├── test.py │ │ ├── utils.py │ │ ├── utils_jax.py │ │ └── utils_torch.py │ ├── numbatch_setting │ │ ├── batch10.sh │ │ ├── batch100.sh │ │ ├── batch20.sh │ │ ├── batch200.sh │ │ ├── batch50.sh │ │ ├── clean.sh │ │ ├── forward.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── run_this_example.sh │ │ └── show_shotgather.py │ └── source_inversion │ │ ├── clean.sh │ │ ├── configs │ │ ├── forward.yml │ │ └── source_inversion.yml │ │ ├── forward.sh │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── source_inversion.py │ │ └── wavelet_bspline.npy ├── check_features │ ├── ADvsBS │ │ ├── acoustic │ │ │ ├── AD_vs_BS.py │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ │ ├── forward.yml │ │ │ │ ├── hosts │ │ │ │ ├── inversion_ADHABC.yml │ │ │ │ ├── inversion_ADPML.yml │ │ │ │ ├── inversion_BSHABC.yml │ │ │ │ └── inversion_BSPML.yml │ │ │ ├── forward.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── inversion_ADHABC.sh │ │ │ ├── inversion_ADPML.sh │ │ │ ├── inversion_BSHABC.sh │ │ │ ├── inversion_BSPML.sh │ │ │ ├── run_this_example.sh │ │ │ └── show_shotgather.py │ │ ├── acoustic_multiples │ │ │ ├── AD_vs_BS.py │ │ │ ├── check_wf.py │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ │ ├── forward.yml │ │ │ │ ├── hosts │ │ │ │ ├── inversion_ADHABC.yml │ │ │ │ ├── inversion_ADPML.yml │ │ │ │ ├── inversion_BSHABC.yml │ │ │ │ └── inversion_BSPML.yml │ │ │ ├── forward.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── inversion_ADHABC.sh │ │ │ ├── inversion_ADPML.sh │ │ │ ├── inversion_BSHABC.sh │ │ │ ├── inversion_BSPML.sh │ │ │ ├── run_this_example.sh │ │ │ └── show_shotgather.py │ │ ├── elastic │ │ │ ├── AD_vs_BS.py │ │ │ ├── check_bs.py │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ │ ├── forward.yml │ │ │ │ ├── hosts │ │ │ │ ├── inversion_AD.yml │ │ │ │ └── inversion_BS.yml │ │ │ ├── forward.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── inversion_AD.sh │ │ │ ├── inversion_BS.sh │ │ │ ├── run_this_example.sh │ │ │ └── show_shotgather.py │ │ └── fwim │ │ │ ├── acoustic.sh │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ ├── acoustic_fwim.yml │ │ │ ├── inversion_AD.yml │ │ │ └── inversion_BS.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── inversion_AD.sh │ │ │ ├── inversion_BS.sh │ │ │ └── show_gradient.py │ ├── abcs │ │ ├── acoustic.sh │ │ ├── check.py │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── acoustic.yml │ │ │ ├── elastic.yml │ │ │ ├── ttielastic.yml │ │ │ └── viscoacoustic.yml │ │ ├── elastic.sh │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── par2ani.py │ │ ├── show_shotgather.py │ │ ├── show_wf.py │ │ ├── ttielastic.sh │ │ └── viscoacoustic.sh │ ├── gradient_clamp │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── noclamp.sh │ │ ├── show_results.py │ │ ├── show_shotgather.py │ │ └── withclamp.sh │ ├── gradient_smooth │ │ ├── README │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── forward.yml │ │ │ ├── hosts │ │ │ ├── inversion_gradsm.yml │ │ │ └── inversion_nogradsm.yml │ │ ├── forward.sh │ │ ├── generate_model_geometry.py │ │ ├── inversion_gradsm.sh │ │ ├── inversion_nogradsm.sh │ │ ├── results.py │ │ └── show_shotgather.py │ ├── habc │ │ ├── acoustic_habc.sh │ │ ├── acoustic_habc_multiple.sh │ │ ├── acoustic_pml.sh │ │ ├── check.py │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── acoustic_habc.yml │ │ │ ├── acoustic_habc_multiple.yml │ │ │ └── acoustic_pml.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── show_coes.py │ │ └── show_shotgather.py │ ├── habc_gradients │ │ └── acoustic_nomultiple │ │ │ ├── AD_vs_BS.py │ │ │ ├── check.py │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ ├── forward.yml │ │ │ ├── hosts │ │ │ ├── inversion_ADHABC.yml │ │ │ ├── inversion_ADPML.yml │ │ │ ├── inversion_BSHABC.yml │ │ │ └── inversion_BSPML.yml │ │ │ ├── forward.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── inversion_ADHABC.sh │ │ │ ├── inversion_ADPML.sh │ │ │ ├── inversion_BSHABC.sh │ │ │ ├── inversion_BSPML.sh │ │ │ ├── run_this_example.sh │ │ │ └── show_shotgather.py │ ├── hdf5_filesystem │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── inversion.sh │ │ ├── show_results.py │ │ └── show_shotgather.py │ ├── implicitNN │ │ ├── README.md │ │ ├── clean.sh │ │ ├── ifwi.py │ │ ├── siren.py │ │ └── utils_torch.py │ ├── multiples │ │ ├── clean.sh │ │ ├── forward_with_multiple.sh │ │ ├── forward_with_multiple.yml │ │ ├── forward_without_multiple.sh │ │ ├── forward_without_multiple.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ └── show_shotgather.py │ ├── segy │ │ ├── segyplus.py │ │ ├── segypro.py │ │ ├── test.py │ │ └── test2.py │ ├── torchrun_dist │ │ ├── clean.sh │ │ ├── configs │ │ │ └── forward.yml │ │ ├── forward.sh │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── inversion.sh │ │ ├── show_shotgather.py │ │ └── showresults.py │ └── varying_acquistion │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── inversion.sh │ │ ├── show_results.py │ │ ├── show_shotgather_hdf5.py │ │ └── show_shotgather_npy.py ├── forward_modeling │ ├── compare_elastic │ │ ├── check.py │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── elastic.yml │ │ │ ├── elastic_bg.yml │ │ │ ├── vdr.yml │ │ │ └── vdr_bg.yml │ │ ├── cuda_vs_torch.py │ │ ├── elastic.sh │ │ ├── elastic_bg.sh │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── ricker.py │ │ ├── ricker.txt │ │ ├── show_shotgather.py │ │ ├── show_shotgather1.py │ │ ├── vdr.sh │ │ └── vdr_bg.sh │ ├── different_eq │ │ ├── acoustic.sh │ │ ├── acoustic_rho.sh │ │ ├── aec.sh │ │ ├── clean.sh │ │ ├── combine_wf.py │ │ ├── configs │ │ │ ├── acoustic.yml │ │ │ ├── acoustic_rho.yml │ │ │ ├── aec.yml │ │ │ ├── decouple.yml │ │ │ ├── elastic.yml │ │ │ ├── tti.yml │ │ │ ├── ttielastic.yml │ │ │ ├── vdr.yml │ │ │ ├── viscoacoustic.yml │ │ │ ├── vti.yml │ │ │ └── vti2.yml │ │ ├── decouple.sh │ │ ├── elastic.sh │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── par2ani.py │ │ ├── show_shotgather.py │ │ ├── show_wf.py │ │ ├── tti.sh │ │ ├── ttielastic.sh │ │ ├── vdr.sh │ │ ├── viscoacoustic.sh │ │ ├── vti.sh │ │ └── vti2.sh │ ├── elastic_modeling2d │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ └── show_shotgather.py │ ├── forward_modeling2d │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ └── show_shotgather.py │ ├── forward_modeling3d │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ └── show_shotgather.py │ ├── pseudospectral │ │ ├── README.md │ │ ├── clean.sh │ │ ├── configure.py │ │ ├── forward.py │ │ ├── generate_model.py │ │ └── utils_torch.py │ ├── qP_wave │ │ ├── README.md │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── tti.yml │ │ │ ├── vti_a.yml │ │ │ ├── vti_b.yml │ │ │ └── vti_c.yml │ │ ├── figures │ │ │ └── wavefield_0700.png │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── show_wf.py │ │ ├── tti.sh │ │ ├── vti_a.sh │ │ ├── vti_b.sh │ │ └── vti_c.sh │ ├── variable_density │ │ ├── acoustic.sh │ │ ├── acoustic_rho.sh │ │ ├── clean.sh │ │ ├── compare.py │ │ ├── configs │ │ │ ├── acoustic.yml │ │ │ └── acoustic_rho.yml │ │ ├── generate_model_geometry.py │ │ └── hosts │ └── viscoacoustic │ │ ├── checkpml.py │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ └── show_shotgather.py ├── inversion │ ├── camembert │ │ ├── adj_by_step.py │ │ ├── cal_adjoint.py │ │ ├── check_code.py │ │ ├── clean.sh │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── initial.sh │ │ ├── initial.yml │ │ ├── inversion.yml │ │ ├── inversion_l2.sh │ │ ├── inversion_nim.sh │ │ ├── inversion_ot.sh │ │ ├── observed.sh │ │ ├── observed.yml │ │ ├── show_alter.py │ │ ├── show_results.py │ │ └── show_shotgather.py │ ├── easy_fwi │ │ ├── 2d_torch │ │ │ ├── fwi.py │ │ │ └── utils.py │ │ └── 3d_torch │ │ │ ├── README.md │ │ │ ├── clean.sh │ │ │ ├── configures.py │ │ │ ├── fwi.py │ │ │ ├── generate_model.py │ │ │ └── utils.py │ ├── inversion_with_multiples │ │ ├── clean.sh │ │ ├── generate_model_geometry_fixed.py │ │ ├── hosts │ │ ├── show_results.py │ │ ├── show_shotgather.py │ │ ├── with_multiples │ │ │ ├── forward_withmultiple.sh │ │ │ ├── forward_withmultiple.yml │ │ │ ├── show_shotgather.py │ │ │ └── source_encoding_fwi.sh │ │ └── without_multiples │ │ │ ├── forward_nomultiple.sh │ │ │ ├── forward_nomultiple.yml │ │ │ ├── show_results.py │ │ │ ├── show_shotgather.py │ │ │ └── source_encoding_fwi.sh │ ├── joint_fwi_lsrtm │ │ ├── REAEME.md │ │ ├── check.py │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── forward.yml │ │ │ └── inversion.yml │ │ ├── figures │ │ │ ├── Comparison.png │ │ │ ├── Gradient_at_first_epoch.png │ │ │ ├── Inverted_Profile.png │ │ │ ├── model_geometry.png │ │ │ └── velocity_models.png │ │ ├── forward.sh │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── sefwi.sh │ │ ├── show_int.py │ │ ├── show_results.py │ │ └── show_shotgather.py │ ├── misfits │ │ ├── cs │ │ │ ├── README.md │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ │ ├── forward.yml │ │ │ │ ├── forward_cs.yml │ │ │ │ ├── forward_l2.yml │ │ │ │ └── inversion.yml │ │ │ ├── figures │ │ │ │ ├── Inverted.png │ │ │ │ ├── Trace.png │ │ │ │ ├── cs.png │ │ │ │ ├── geometry.gif │ │ │ │ └── wavelet.png │ │ │ ├── forward.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── inversion_cs.sh │ │ │ ├── inversion_l2.sh │ │ │ ├── show_results.py │ │ │ ├── show_shotgather.py │ │ │ └── show_wiggle.py │ │ ├── envelope │ │ │ ├── README.md │ │ │ ├── cal_adj.py │ │ │ ├── checkdata.py │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ │ ├── initial.yml │ │ │ │ ├── inversion.yml │ │ │ │ └── observed.yml │ │ │ ├── envelope_of_ricker.py │ │ │ ├── figures │ │ │ │ ├── Adj_compare.png │ │ │ │ ├── Adjoint_sources.png │ │ │ │ ├── Envelopes_Profile.png │ │ │ │ ├── Envelopes_Trace.png │ │ │ │ ├── Gradient.png │ │ │ │ ├── Gradient_line.png │ │ │ │ ├── Profiles.png │ │ │ │ ├── adj_freq_spectrum.png │ │ │ │ ├── highpass_ricker_envelope.png │ │ │ │ ├── highpass_ricker_envelope_spectrum.png │ │ │ │ ├── model_geometry.png │ │ │ │ ├── ricker_envelope.png │ │ │ │ └── ricker_envelope_spectrum.png │ │ │ ├── fwi_envelope.sh │ │ │ ├── fwi_l2.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── initial.sh │ │ │ ├── observed.sh │ │ │ └── show_gradient.py │ │ ├── implicitLoss │ │ │ ├── cal_adjoint.py │ │ │ ├── clean.sh │ │ │ ├── download_vel.sh │ │ │ ├── forward.sh │ │ │ ├── fullband.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── multiscale.yml │ │ │ ├── show_results.py │ │ │ ├── show_results2.py │ │ │ ├── show_shotgather.py │ │ │ ├── source_encoding_fwi_ip.sh │ │ │ └── source_encoding_fwi_l2.sh │ │ ├── ip │ │ │ ├── README.md │ │ │ ├── cal_adj.py │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ │ ├── forward_with_init_vel.yml │ │ │ │ ├── forward_with_true_vel.yml │ │ │ │ └── inversion.yml │ │ │ ├── different_norm.py │ │ │ ├── forward_with_init_vel.sh │ │ │ ├── forward_with_true_vel.sh │ │ │ ├── fwi_ip.sh │ │ │ ├── fwi_l2.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ └── show_gradient.py │ │ ├── l1 │ │ │ ├── README.md │ │ │ ├── add_gaussiannoise.py │ │ │ ├── add_outlier.py │ │ │ ├── check.py │ │ │ ├── clean.sh │ │ │ ├── figures │ │ │ │ ├── ModelError.png │ │ │ │ ├── gaussian │ │ │ │ │ ├── Inverted_withnoise.png │ │ │ │ │ ├── Inverted_without_noise.png │ │ │ │ │ ├── Traces_with(out)_noise_l1.png │ │ │ │ │ ├── Traces_with(out)_noise_l2.png │ │ │ │ │ ├── Traces_with_noise.png │ │ │ │ │ ├── Traces_without_noise.png │ │ │ │ │ ├── add_noise_profile.png │ │ │ │ │ └── add_noise_trace.png │ │ │ │ ├── model_geometry.png │ │ │ │ ├── outlier │ │ │ │ │ ├── Inverted_withnoise.png │ │ │ │ │ ├── Inverted_without_noise.png │ │ │ │ │ ├── Traces_with(out)_noise_l1.png │ │ │ │ │ ├── Traces_with(out)_noise_l2.png │ │ │ │ │ ├── Traces_with_noise.png │ │ │ │ │ └── Traces_without_noise.png │ │ │ │ ├── shot_gather.png │ │ │ │ └── without_noise │ │ │ │ │ ├── Inverted_without_noise.png │ │ │ │ │ └── Traces_without_noise.png │ │ │ ├── forward.sh │ │ │ ├── forward.yml │ │ │ ├── gaussian.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── outlier.yml │ │ │ ├── sefwi_l1.sh │ │ │ ├── sefwi_l1_gaussian.sh │ │ │ ├── sefwi_l1_outlier.sh │ │ │ ├── sefwi_l2.sh │ │ │ ├── sefwi_l2_gaussian.sh │ │ │ ├── sefwi_l2_outlier.sh │ │ │ ├── show_results_gaussian.py │ │ │ ├── show_results_outlier.py │ │ │ └── show_shotgather.py │ │ ├── localcoherence │ │ │ ├── README.md │ │ │ ├── cal_adj.py │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ │ ├── initial.yml │ │ │ │ ├── inversion.yml │ │ │ │ └── observed.yml │ │ │ ├── figures │ │ │ │ ├── LocalCoherence_Ricker.png │ │ │ │ └── LocalCoherence_Shots.png │ │ │ ├── fwi_l2.sh │ │ │ ├── fwi_lc.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── initial.sh │ │ │ ├── observed.sh │ │ │ ├── show_gradient.py │ │ │ └── show_lc.py │ │ ├── ot │ │ │ ├── README.md │ │ │ ├── cal_adj.py │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ │ ├── forward_with_init_vel.yml │ │ │ │ ├── forward_with_true_vel.yml │ │ │ │ └── inversion.yml │ │ │ ├── different_norm.py │ │ │ ├── figures │ │ │ │ ├── Gradient_diff_norm.png │ │ │ │ ├── Gradient_line.png │ │ │ │ ├── Gradient_vs_l2.png │ │ │ │ ├── adjoints.png │ │ │ │ ├── adjoints_line.png │ │ │ │ ├── loss_vs_delay.png │ │ │ │ └── obs_syn.png │ │ │ ├── forward_with_init_vel.sh │ │ │ ├── forward_with_true_vel.sh │ │ │ ├── fwi_envelope.sh │ │ │ ├── fwi_l2.sh │ │ │ ├── fwi_ot.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── inversion.sh │ │ │ ├── ot_test.py │ │ │ ├── ricker.py │ │ │ ├── show.py │ │ │ ├── show_gradient.py │ │ │ ├── show_results.py │ │ │ └── show_shotgather.py │ │ ├── sdtw │ │ │ ├── README.md │ │ │ ├── cal_adj.py │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ │ ├── initial.yml │ │ │ │ ├── inversion.yml │ │ │ │ └── observed.yml │ │ │ ├── fwi_l2.sh │ │ │ ├── fwi_sdtw.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── initial.sh │ │ │ ├── observed.sh │ │ │ └── show_gradient.py │ │ ├── source_encoding │ │ │ ├── check_results.py │ │ │ ├── clean.sh │ │ │ ├── download_vel.sh │ │ │ ├── envelope.sh │ │ │ ├── forward.sh │ │ │ ├── forward.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── integration.sh │ │ │ ├── l2.sh │ │ │ ├── nim.sh │ │ │ ├── show_results.py │ │ │ ├── show_shotgather.py │ │ │ └── w1d.sh │ │ ├── tests │ │ │ ├── cosine_similarity.py │ │ │ ├── env+integration.py │ │ │ ├── envelop.py │ │ │ ├── integration.py │ │ │ ├── traveltime.py │ │ │ └── traveltime2.py │ │ ├── travel_time_misfit │ │ │ ├── check_data.py │ │ │ ├── check_grad.py │ │ │ ├── check_grad_torch.py │ │ │ ├── checkadj.py │ │ │ ├── clean.sh │ │ │ ├── config │ │ │ │ ├── forward_init.yml │ │ │ │ ├── forward_l2.yml │ │ │ │ ├── forward_obs.yml │ │ │ │ ├── forward_obs_nolow.yml │ │ │ │ ├── forward_tt.yml │ │ │ │ ├── inversion_l2.yml │ │ │ │ ├── inversion_tt.yml │ │ │ │ └── inversion_tt_l2.yml │ │ │ ├── forward_init.sh │ │ │ ├── forward_l2.sh │ │ │ ├── forward_obs.sh │ │ │ ├── forward_tt.sh │ │ │ ├── generate_datamask.py │ │ │ ├── generate_model_geometry.py │ │ │ ├── generate_wavelet.py │ │ │ ├── hosts │ │ │ ├── inversion_ip.sh │ │ │ ├── inversion_l2.sh │ │ │ ├── inversion_tt.sh │ │ │ ├── inversion_tt_l2.sh │ │ │ ├── show_for_phd.py │ │ │ ├── show_results.py │ │ │ ├── show_results_torch.py │ │ │ ├── show_shotgather.py │ │ │ ├── softargmax.py │ │ │ └── wiggle.py │ │ └── weighted │ │ │ ├── clean.sh │ │ │ ├── configs │ │ │ ├── forward.yml │ │ │ ├── hosts │ │ │ ├── inversion_ADHABC.yml │ │ │ ├── inversion_ADPML.yml │ │ │ ├── inversion_BSHABC.yml │ │ │ └── inversion_BSPML.yml │ │ │ ├── forward.sh │ │ │ ├── fwi_envelope.sh │ │ │ ├── fwi_l2.sh │ │ │ ├── fwi_weighted.sh │ │ │ ├── generate_model_geometry.py │ │ │ ├── run_this_example.sh │ │ │ ├── show_gradient.py │ │ │ └── show_shotgather.py │ ├── optimizers │ │ ├── optimizers_towed │ │ │ ├── clean.sh │ │ │ ├── forward.sh │ │ │ ├── forward.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── inversion_adam.sh │ │ │ ├── inversion_ncg.sh │ │ │ ├── inversion_sd.sh │ │ │ ├── show_results.py │ │ │ └── show_shotgather.py │ │ └── source_encoding │ │ │ ├── clean.sh │ │ │ ├── download_vel.sh │ │ │ ├── forward.sh │ │ │ ├── forward.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── show_results.py │ │ │ ├── show_shotgather.py │ │ │ ├── source_encoding_fwi.sh │ │ │ ├── source_encoding_fwi_adam.sh │ │ │ ├── source_encoding_fwi_cg.sh │ │ │ └── source_encoding_fwi_sd.sh │ ├── sensitivity_kernel │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── forward_acoustic_fwim_habc.yml │ │ │ ├── forward_acoustic_habc.yml │ │ │ ├── inversion_acoustic_fwim_habc_sm.yml │ │ │ ├── inversion_acoustic_fwim_habc_zero.yml │ │ │ ├── inversion_acoustic_habc_bg.yml │ │ │ └── inversion_acoustic_habc_sm.yml │ │ ├── forward_acoustic.sh │ │ ├── forward_acoustic_fwim_bg.sh │ │ ├── fwi_acoustic_bg.sh │ │ ├── fwi_acoustic_fwim_sm.sh │ │ ├── fwi_acoustic_fwim_zero.sh │ │ ├── fwi_acoustic_sm.sh │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ └── show_gradient.py │ ├── source_encoding │ │ ├── acoustic │ │ │ ├── clean.sh │ │ │ ├── download_vel.sh │ │ │ ├── forward.sh │ │ │ ├── forward.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── show_int.py │ │ │ ├── show_results.py │ │ │ ├── show_shotgather.py │ │ │ └── source_encoding_fwi.sh │ │ ├── elastic │ │ │ ├── clean.sh │ │ │ ├── forward.sh │ │ │ ├── forward.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── show_results.py │ │ │ ├── show_shotgather.py │ │ │ └── source_encoding_fwi.sh │ │ └── towed │ │ │ ├── analysis.py │ │ │ ├── check_stack.py │ │ │ ├── clean.sh │ │ │ ├── forward.sh │ │ │ ├── forward.yml │ │ │ ├── full.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── sefwi.sh │ │ │ ├── sefwi_full.sh │ │ │ ├── show_results.py │ │ │ ├── show_shotgather.py │ │ │ └── towed.sh │ ├── tests │ │ └── test_hilber.py │ ├── towed │ │ ├── towed_2d │ │ │ ├── clean.sh │ │ │ ├── forward.sh │ │ │ ├── forward.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── geometry.gif │ │ │ ├── hosts │ │ │ ├── inversion.sh │ │ │ ├── show_shotgather.py │ │ │ └── showresults.py │ │ └── towed_3d │ │ │ ├── clean.sh │ │ │ ├── forward.sh │ │ │ ├── forward.yml │ │ │ ├── generate_model_geometry.py │ │ │ ├── hosts │ │ │ ├── inversion.sh │ │ │ └── show_shotgather.py │ ├── variable_density │ │ ├── acoustic.sh │ │ ├── acoustic_fwim.sh │ │ ├── acoustic_rho.sh │ │ ├── check_wf.py │ │ ├── clean.sh │ │ ├── compare.py │ │ ├── configs │ │ │ ├── acoustic.yml │ │ │ ├── acoustic_fwim.yml │ │ │ ├── acoustic_rho.yml │ │ │ ├── inversion_rho.yml │ │ │ ├── inversion_rho_AD.yml │ │ │ ├── inversion_rho_AD_a.yml │ │ │ ├── inversion_rho_BS.yml │ │ │ └── inversion_rho_BS_a.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── inversion_AD.sh │ │ ├── inversion_AD_a.sh │ │ ├── inversion_BS.sh │ │ ├── inversion_BS_a.sh │ │ ├── inversion_BS_l.sh │ │ └── show_gradient.py │ └── with_random_boundary │ │ └── acoustic │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── inversion_pml.yml │ │ ├── inversion_random.yml │ │ ├── show_results.py │ │ ├── show_shotgather.py │ │ ├── source_encoding_fwi_pml.sh │ │ └── source_encoding_fwi_random.sh ├── jax │ ├── fwi.py │ ├── utils.py │ └── utils2.py ├── lsrtm │ ├── acoustic │ │ ├── README.md │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── forward_born.yml │ │ │ ├── forward_direct.yml │ │ │ ├── forward_obs.yml │ │ │ ├── lsrtm.yml │ │ │ └── lsrtm_born.yml │ │ ├── figures │ │ │ ├── inverted.png │ │ │ ├── model_geometry.png │ │ │ └── trace.png │ │ ├── forward_born.sh │ │ ├── forward_direct.sh │ │ ├── forward_obs.sh │ │ ├── generate_model_geometry_fixed.py │ │ ├── hosts │ │ ├── lsrtm_adam.sh │ │ ├── lsrtm_cg.sh │ │ ├── lsrtm_cg_born.sh │ │ ├── move_direct.py │ │ ├── show_int.py │ │ ├── show_results.py │ │ └── show_shotgather.py │ ├── elastic │ │ ├── README.md │ │ ├── check_bptt.py │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── forward_born.yml │ │ │ ├── forward_obs.yml │ │ │ ├── lsrtm.yml │ │ │ └── lsrtm_born.yml │ │ ├── figures │ │ │ ├── ground_truth.png │ │ │ ├── inverted.png │ │ │ └── trace.png │ │ ├── forward_born.sh │ │ ├── forward_obs.sh │ │ ├── generate_model_geometry_fixed.py │ │ ├── hosts │ │ ├── lsrtm.sh │ │ ├── lsrtm_born.sh │ │ ├── show_results.py │ │ └── show_shotgather.py │ └── qP │ │ ├── README.md │ │ ├── clean.sh │ │ ├── compare_vti_tti.py │ │ ├── configs │ │ ├── tti.yml │ │ ├── tti_born.yml │ │ ├── tti_direct_wave.yml │ │ ├── tti_lsrtm.yml │ │ ├── vti.yml │ │ ├── vti_direct_wave.yml │ │ └── vti_lsrtm.yml │ │ ├── figures │ │ ├── compare_vti_tti.png │ │ ├── compare_vti_tti_trace.png │ │ ├── model.png │ │ ├── smoothed_vp.png │ │ └── true_m.png │ │ ├── generate_geometry.py │ │ ├── generate_model.py │ │ ├── hosts │ │ ├── move_direct.py │ │ ├── show_gathers.py │ │ ├── show_int.py │ │ ├── show_results.py │ │ ├── tti_direct.sh │ │ ├── tti_forward.sh │ │ ├── tti_forward_born.sh │ │ ├── tti_lsrtm.sh │ │ ├── vti_direct.sh │ │ ├── vti_forward.sh │ │ └── vti_lsrtm.sh ├── models │ ├── bp2.5d1997 │ │ ├── model.npy │ │ ├── model.png │ │ ├── vsmooth.npy │ │ └── vsmooth.png │ ├── marmousi_model │ │ ├── chunk │ │ │ ├── forward_chunk0.yml │ │ │ ├── forward_chunk1.yml │ │ │ ├── forward_chunk2.yml │ │ │ ├── forward_chunk3.yml │ │ │ ├── vp_chunk_0.npy │ │ │ ├── vp_chunk_1.npy │ │ │ ├── vp_chunk_2.npy │ │ │ └── vp_chunk_3.npy │ │ ├── linear_vp.npy │ │ ├── linear_vs.npy │ │ ├── rho.npy │ │ ├── seabed.npy │ │ ├── smooth_true_vp_for_rtm.npy │ │ ├── true_vp.npy │ │ └── true_vs.npy │ └── marmousi_model_half │ │ ├── linear_vp.npy │ │ ├── linear_vs.npy │ │ ├── rho.npy │ │ ├── seabed.npy │ │ ├── smooth_true_vp_for_rtm.npy │ │ ├── true_vp.npy │ │ └── true_vs.npy ├── newversion │ ├── iso │ │ ├── acoustic_habc.sh │ │ ├── acoustic_habc_multiple.sh │ │ ├── acoustic_pml.sh │ │ ├── check.py │ │ ├── clean.sh │ │ ├── configs │ │ │ ├── acoustic_habc.yml │ │ │ ├── acoustic_habc_multiple.yml │ │ │ └── acoustic_pml.yml │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── show_coes.py │ │ └── show_shotgather.py │ └── marmousi │ │ ├── clean.sh │ │ ├── config │ │ ├── habc.yml │ │ ├── inv_habc.yml │ │ ├── inv_pml.yml │ │ └── pml.yml │ │ ├── forward_habc.sh │ │ ├── forward_pml.sh │ │ ├── generate_model_geometry.py │ │ ├── habc_inv_habc.sh │ │ ├── hosts │ │ ├── pml_inv_habc.sh │ │ ├── show_results.py │ │ └── show_shotgather.py ├── nn_embedded_fwi │ ├── model_representation │ │ ├── README.md │ │ ├── encoder_decoder_acoustic │ │ │ ├── README.md │ │ │ ├── bandpass.py │ │ │ ├── clean.sh │ │ │ ├── configure.py │ │ │ ├── forward.py │ │ │ ├── generate_model.py │ │ │ ├── ifwi.py │ │ │ ├── ifwi_cycleskipping.py │ │ │ ├── networks.py │ │ │ ├── utils_torch.py │ │ │ └── what_nn_learns.py │ │ ├── encoder_decoder_elastic │ │ │ ├── README.md │ │ │ ├── clean.sh │ │ │ ├── configure.py │ │ │ ├── forward.py │ │ │ ├── generate_model.py │ │ │ ├── ifwi.py │ │ │ ├── networks.py │ │ │ └── utils.py │ │ ├── figures │ │ │ ├── acoustic_epoch500.png │ │ │ ├── acoustic_model.png │ │ │ ├── elastic2_true.png │ │ │ ├── elastic3_3networks_2000.png │ │ │ ├── elastic3_true.png │ │ │ ├── elastic_1net_epoch_4000.png │ │ │ ├── elastic_2network_trace.png │ │ │ ├── encoder_decoder_acoustic_epoch1.png │ │ │ ├── encoder_decoder_acoustic_epoch500.png │ │ │ ├── encoder_decoder_acoustic_epoch500_cs.png │ │ │ ├── encoder_decoder_epoch_2000.png │ │ │ ├── encoder_decoder_loss.png │ │ │ ├── encoder_decoder_shot_latent_e000.png │ │ │ ├── encoder_decoder_shot_latent_e250.png │ │ │ ├── encoder_decoder_shot_latent_e500.png │ │ │ ├── epoch_2nets_2000.png │ │ │ └── shotgather.png │ │ ├── implicit_acoustic │ │ │ ├── clean.sh │ │ │ ├── configure.py │ │ │ ├── forward.py │ │ │ ├── generate_model.py │ │ │ ├── ifwi.py │ │ │ ├── siren.py │ │ │ └── utils_torch.py │ │ ├── implicit_acoustic_marmousi │ │ │ ├── README.md │ │ │ ├── clean.sh │ │ │ ├── configure.py │ │ │ ├── figures │ │ │ │ ├── 0000.png │ │ │ │ └── 2000.png │ │ │ ├── forward.py │ │ │ ├── fwi.py │ │ │ ├── generate_model.py │ │ │ ├── ifwi.py │ │ │ ├── siren.py │ │ │ └── utils_torch.py │ │ ├── implicit_elastic │ │ │ ├── clean.sh │ │ │ ├── configure.py │ │ │ ├── configure2.py │ │ │ ├── forward.py │ │ │ ├── generate_model.py │ │ │ ├── ifwi.py │ │ │ ├── ifwi2.py │ │ │ ├── show_results.py │ │ │ ├── siren.py │ │ │ └── utils.py │ │ └── implicit_elastic3 │ │ │ ├── clean.sh │ │ │ ├── configure.py │ │ │ ├── forward.py │ │ │ ├── generate_model.py │ │ │ ├── ifwi.py │ │ │ ├── ifwi3.py │ │ │ ├── show_results.py │ │ │ ├── siren.py │ │ │ └── utils.py │ └── siamesefwi │ │ ├── README.md │ │ ├── bandpass.py │ │ ├── clean.sh │ │ ├── compare.py │ │ ├── compare_adjoint.py │ │ ├── compare_fm.py │ │ ├── configure.py │ │ ├── forward.py │ │ ├── fwi_classic.py │ │ ├── fwi_siamese.py │ │ ├── how_initilize_map2_fm.py │ │ ├── implicit_loss.py │ │ ├── implicit_loss_fwi.py │ │ ├── show_fm.py │ │ ├── siamese.pth │ │ └── utils.py ├── pinn │ ├── README.md │ ├── clean.sh │ ├── compare.py │ ├── create_video.py │ ├── forward.py │ ├── forward.sh │ ├── forward.yml │ ├── generate_model_geometry.py │ ├── hosts │ ├── pinn.ipynb │ ├── pinn.py │ ├── show_shotgather.py │ ├── utils_torch.py │ └── wavefields.py ├── random_boundaries │ ├── checkwf.py │ ├── clean.sh │ ├── forward_pml.sh │ ├── forward_rand.sh │ ├── generate_model_geometry.py │ ├── hosts │ ├── pml.yml │ ├── rand.yml │ ├── rand2d.py │ └── show_shotgather.py ├── regularization │ ├── model_reg_fwi │ │ ├── README.md │ │ ├── fwi.py │ │ ├── reg.png │ │ └── utils.py │ └── model_reg_lsrtm │ │ ├── README.md │ │ ├── clean.sh │ │ ├── configures.py │ │ ├── forward.py │ │ ├── generate_model.py │ │ ├── lsrtm.py │ │ ├── true_model.png │ │ └── utils.py ├── rtm │ ├── bp │ │ ├── cig.py │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_datamask.py │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── rtm.sh │ │ ├── rtm.yml │ │ ├── show_results.py │ │ └── show_shotgather.py │ └── marmousi │ │ ├── cig.py │ │ ├── clean.sh │ │ ├── forward.sh │ │ ├── forward.yml │ │ ├── generate_datamask.py │ │ ├── generate_model_geometry.py │ │ ├── hosts │ │ ├── models │ │ ├── seabed.npy │ │ ├── smooth_true_vp_for_rtm.npy │ │ └── true_vp_for_rtm.npy │ │ ├── rtm_initmodel.sh │ │ ├── rtm_initmodel.yml │ │ ├── rtm_truemodel.sh │ │ ├── rtm_truemodel.yml │ │ ├── show_results.py │ │ ├── show_shotgather.py │ │ └── wavelet │ │ ├── ricker_for_forward.npy │ │ └── ricker_for_rtm.npy ├── sthelse │ ├── fwi.py │ └── utils.py └── tools │ └── smooth.py ├── forward.sh ├── fwi.py ├── fwi_torchrun.py ├── mpiconfig_gpu ├── requirements.txt ├── run.sh ├── seistorch ├── __init__.py ├── cell.py ├── checkpoint.py ├── checkpoint_new.py ├── compile.py ├── coords.py ├── dataset.py ├── default.py ├── dimension.py ├── distributed.py ├── eqconfigure.py ├── equations2d │ ├── acoustic.py │ ├── acoustic1st.py │ ├── acoustic_fwim_habc.py │ ├── acoustic_habc.py │ ├── acoustic_lsrtm_habc.py │ ├── acoustic_rho_habc.py │ ├── acoustic_tti_lsrtm_habc.py │ ├── acoustic_vti_lsrtm_habc.py │ ├── aec.py │ ├── aec_b.py │ ├── convkernel.py │ ├── decouple.py │ ├── elastic.py │ ├── elastic_lsrtm.py │ ├── tti_habc.py │ ├── ttielastic.py │ ├── utils.py │ ├── vacoustic_habc.py │ ├── vdr.py │ ├── viscoacoustic.py │ ├── vti_habc.py │ └── vti_habc2.py ├── equations3d │ ├── acoustic.py │ └── utils.py ├── geom.py ├── habc.py ├── io.py ├── log.py ├── loss.py ├── model.py ├── networks.py ├── optimizer.py ├── pml.py ├── probe.py ├── process.py ├── random.py ├── regularization.py ├── rnn.py ├── setup.py ├── show.py ├── signal.py ├── source.py ├── transform.py ├── type.py └── utils.py ├── seistorch_dist.py ├── seistorch_dist_lbfgs.py └── template.yml /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[python]": { 3 | "editor.defaultFormatter": "ms-python.python" 4 | }, 5 | "python.formatting.provider": "none" 6 | } -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | 2 | TODO: 3 | 1. eval mode. 4 | 2. Checkpoint mode for resuming 5 | 4. Start frequency and start epoch 6 | 5. Reverse time migration -------------------------------------------------------------------------------- /coding.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python codingfwi.py /public1/home/wangsw/FWI/NO_LOWFREQ/config/02b_acoustic_invert.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path /home/ \ 10 | --checkpoint /home/ckpt_9.pt \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /doc/figures/advsbs_acoustic/compare_AD_BS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/advsbs_acoustic/compare_AD_BS.png -------------------------------------------------------------------------------- /doc/figures/advsbs_acoustic/compare_AD_BS_HABCFORWARD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/advsbs_acoustic/compare_AD_BS_HABCFORWARD.png -------------------------------------------------------------------------------- /doc/figures/advsbs_acoustic/compare_AD_BS_PML.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/advsbs_acoustic/compare_AD_BS_PML.png -------------------------------------------------------------------------------- /doc/figures/advsbs_acoustic/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/advsbs_acoustic/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/advsbs_elastic/compare_AD_BS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/advsbs_elastic/compare_AD_BS.png -------------------------------------------------------------------------------- /doc/figures/advsbs_elastic/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/advsbs_elastic/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/batched_inversion/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/batched_inversion/Inverted.png -------------------------------------------------------------------------------- /doc/figures/batched_inversion/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/batched_inversion/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/batched_inversion/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/batched_inversion/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/cal_adjoint_source/adjoint_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/cal_adjoint_source/adjoint_source.png -------------------------------------------------------------------------------- /doc/figures/cal_adjoint_source/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/cal_adjoint_source/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/camembert/adjoint_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/camembert/adjoint_source.png -------------------------------------------------------------------------------- /doc/figures/camembert/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/camembert/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/different_equations/acoustic_tti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/different_equations/acoustic_tti.png -------------------------------------------------------------------------------- /doc/figures/different_equations/acoustic_vti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/different_equations/acoustic_vti.png -------------------------------------------------------------------------------- /doc/figures/different_equations/decopule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/different_equations/decopule.png -------------------------------------------------------------------------------- /doc/figures/different_equations/elastic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/different_equations/elastic.png -------------------------------------------------------------------------------- /doc/figures/different_equations/ttielastic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/different_equations/ttielastic.png -------------------------------------------------------------------------------- /doc/figures/different_equations/vacoustic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/different_equations/vacoustic.png -------------------------------------------------------------------------------- /doc/figures/distribute_inversion/geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/distribute_inversion/geometry.gif -------------------------------------------------------------------------------- /doc/figures/elastic_modeling2d/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/elastic_modeling2d/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/elastic_modeling2d/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/elastic_modeling2d/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/forward_modeling2d/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/forward_modeling2d/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/forward_modeling2d/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/forward_modeling2d/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/forward_modeling3d/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/forward_modeling3d/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/forward_modeling3d/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/forward_modeling3d/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/gradient_clamp/cg/Gradientat0epoch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/gradient_clamp/cg/Gradientat0epoch.png -------------------------------------------------------------------------------- /doc/figures/gradient_clamp/cg/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/gradient_clamp/cg/Inverted.png -------------------------------------------------------------------------------- /doc/figures/gradient_clamp/cg/Model_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/gradient_clamp/cg/Model_error.png -------------------------------------------------------------------------------- /doc/figures/gradient_clamp/sd/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/gradient_clamp/sd/Inverted.png -------------------------------------------------------------------------------- /doc/figures/gradient_clamp/sd/Model_error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/gradient_clamp/sd/Model_error.png -------------------------------------------------------------------------------- /doc/figures/implicitNN/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/implicitNN/Inverted.png -------------------------------------------------------------------------------- /doc/figures/implicitNN/Inverted_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/implicitNN/Inverted_profile.png -------------------------------------------------------------------------------- /doc/figures/implicitNN/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/implicitNN/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/implicitNN/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/implicitNN/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/inversion_with_multiples/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/inversion_with_multiples/Inverted.png -------------------------------------------------------------------------------- /doc/figures/inversion_with_multiples/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/inversion_with_multiples/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/inversion_with_multiples/shot_gather_with_multiples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/inversion_with_multiples/shot_gather_with_multiples.png -------------------------------------------------------------------------------- /doc/figures/inversion_with_multiples/shot_gather_without_multiples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/inversion_with_multiples/shot_gather_without_multiples.png -------------------------------------------------------------------------------- /doc/figures/lsrtm/lsrtm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/lsrtm/lsrtm.png -------------------------------------------------------------------------------- /doc/figures/lsrtm/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/lsrtm/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/lsrtm/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/lsrtm/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/misfits/cumulative/cumulative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/cumulative/cumulative.png -------------------------------------------------------------------------------- /doc/figures/misfits/cumulative/cumulative_highpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/cumulative/cumulative_highpass.png -------------------------------------------------------------------------------- /doc/figures/misfits/cumulative/freq_spectrum_cumsum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/cumulative/freq_spectrum_cumsum.png -------------------------------------------------------------------------------- /doc/figures/misfits/cumulative/freq_spectrum_cumsum_highpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/cumulative/freq_spectrum_cumsum_highpass.png -------------------------------------------------------------------------------- /doc/figures/misfits/env_plus_ig/Envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/env_plus_ig/Envelope.png -------------------------------------------------------------------------------- /doc/figures/misfits/env_plus_ig/Integration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/env_plus_ig/Integration.png -------------------------------------------------------------------------------- /doc/figures/misfits/env_plus_ig/original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/env_plus_ig/original.png -------------------------------------------------------------------------------- /doc/figures/misfits/envelope/envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/envelope/envelope.png -------------------------------------------------------------------------------- /doc/figures/misfits/envelope/freq_spectrum_envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/envelope/freq_spectrum_envelope.png -------------------------------------------------------------------------------- /doc/figures/misfits/envelope/freq_spectrum_envelope_highpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/envelope/freq_spectrum_envelope_highpass.png -------------------------------------------------------------------------------- /doc/figures/misfits/envelope/highpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/envelope/highpass.png -------------------------------------------------------------------------------- /doc/figures/misfits/towed/Gradient_envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/towed/Gradient_envelope.png -------------------------------------------------------------------------------- /doc/figures/misfits/towed/Gradient_l2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/towed/Gradient_l2.png -------------------------------------------------------------------------------- /doc/figures/misfits/traveltime/cc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/traveltime/cc.png -------------------------------------------------------------------------------- /doc/figures/misfits/traveltime/ricker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/traveltime/ricker.png -------------------------------------------------------------------------------- /doc/figures/misfits/traveltime/traveltime.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/misfits/traveltime/traveltime.gif -------------------------------------------------------------------------------- /doc/figures/multiples/model_geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/multiples/model_geometry.gif -------------------------------------------------------------------------------- /doc/figures/multiples/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/multiples/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/multiples/trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/multiples/trace.png -------------------------------------------------------------------------------- /doc/figures/ncc_loss/Gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/ncc_loss/Gradient.png -------------------------------------------------------------------------------- /doc/figures/ncc_loss/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/ncc_loss/Inverted.png -------------------------------------------------------------------------------- /doc/figures/ncc_loss/Trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/ncc_loss/Trace.png -------------------------------------------------------------------------------- /doc/figures/ncc_loss/geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/ncc_loss/geometry.gif -------------------------------------------------------------------------------- /doc/figures/ncc_loss/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/ncc_loss/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/ncc_loss/wavelet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/ncc_loss/wavelet.png -------------------------------------------------------------------------------- /doc/figures/optimizers/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/optimizers/Inverted.png -------------------------------------------------------------------------------- /doc/figures/others/batch_time_1gpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/others/batch_time_1gpu.png -------------------------------------------------------------------------------- /doc/figures/others/batch_time_2gpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/others/batch_time_2gpu.png -------------------------------------------------------------------------------- /doc/figures/others/batch_time_4gpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/others/batch_time_4gpu.png -------------------------------------------------------------------------------- /doc/figures/others/nodes_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/others/nodes_setting.png -------------------------------------------------------------------------------- /doc/figures/random_boundary/model_geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/random_boundary/model_geometry.gif -------------------------------------------------------------------------------- /doc/figures/random_boundary/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/random_boundary/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/reverse_time_migration/CIG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/reverse_time_migration/CIG.png -------------------------------------------------------------------------------- /doc/figures/reverse_time_migration/Gradients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/reverse_time_migration/Gradients.png -------------------------------------------------------------------------------- /doc/figures/reverse_time_migration/RTM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/reverse_time_migration/RTM.png -------------------------------------------------------------------------------- /doc/figures/reverse_time_migration/Velocity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/reverse_time_migration/Velocity.png -------------------------------------------------------------------------------- /doc/figures/reverse_time_migration/geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/reverse_time_migration/geometry.gif -------------------------------------------------------------------------------- /doc/figures/reverse_time_migration/shotgather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/reverse_time_migration/shotgather.png -------------------------------------------------------------------------------- /doc/figures/source_encoding_acoustic/Inverted.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_acoustic/Inverted.jpg -------------------------------------------------------------------------------- /doc/figures/source_encoding_acoustic/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_acoustic/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/source_encoding_acoustic/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_acoustic/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/source_encoding_acoustic2/Gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_acoustic2/Gradient.png -------------------------------------------------------------------------------- /doc/figures/source_encoding_acoustic2/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_acoustic2/Inverted.png -------------------------------------------------------------------------------- /doc/figures/source_encoding_acoustic2/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_acoustic2/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/source_encoding_acoustic2/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_acoustic2/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/source_encoding_elastic/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_elastic/Inverted.png -------------------------------------------------------------------------------- /doc/figures/source_encoding_elastic/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_elastic/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/source_encoding_elastic/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_encoding_elastic/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/source_inversion/Final_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_inversion/Final_result.png -------------------------------------------------------------------------------- /doc/figures/source_inversion/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_inversion/model_geometry.png -------------------------------------------------------------------------------- /doc/figures/source_inversion/true_initial_wavelet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/source_inversion/true_initial_wavelet.png -------------------------------------------------------------------------------- /doc/figures/towed_acquisition/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/towed_acquisition/Inverted.png -------------------------------------------------------------------------------- /doc/figures/towed_acquisition/geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/towed_acquisition/geometry.gif -------------------------------------------------------------------------------- /doc/figures/towed_acquisition/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/towed_acquisition/shot_gather.png -------------------------------------------------------------------------------- /doc/figures/travel_time_misfit/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/travel_time_misfit/Inverted.png -------------------------------------------------------------------------------- /doc/figures/travel_time_misfit/checkadj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/travel_time_misfit/checkadj.png -------------------------------------------------------------------------------- /doc/figures/travel_time_misfit/geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/travel_time_misfit/geometry.gif -------------------------------------------------------------------------------- /doc/figures/travel_time_misfit/velocity_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/travel_time_misfit/velocity_model.png -------------------------------------------------------------------------------- /doc/figures/travel_time_misfit/wiggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/doc/figures/travel_time_misfit/wiggle.png -------------------------------------------------------------------------------- /doc/index.rst: -------------------------------------------------------------------------------- 1 | .. seistorch documentation master file, created by 2 | sphinx-quickstart on Thu Sep 7 08:58:41 2023. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to Seistorch's documentation! 7 | ===================================== 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | :caption: Contents: 12 | 13 | head.md 14 | quick_start.md 15 | getting_started.md 16 | configure.md 17 | data_format.md 18 | running_commands.md 19 | advanced.md -------------------------------------------------------------------------------- /doc/requirements.txt: -------------------------------------------------------------------------------- 1 | recommonmark==0.7.1 2 | Sphinx==7.2.5 3 | sphinx-rtd-theme==1.3.0 4 | sphinxcontrib-applehelp==1.0.7 5 | sphinxcontrib-devhelp==1.0.5 6 | sphinxcontrib-htmlhelp==2.0.4 7 | sphinxcontrib-jquery==4.1 8 | sphinxcontrib-jsmath==1.0.1 9 | sphinxcontrib-katex==0.9.7 10 | sphinxcontrib-qthelp==1.0.6 11 | sphinxcontrib-serializinghtml==1.1.9 12 | myst-parser==2.0.0 13 | -------------------------------------------------------------------------------- /examples/advances/cal_adjoint_source/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png 5 | rm -rf results 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/advances/cal_adjoint_source/configs/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/advances/cal_adjoint_source/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f configs/hosts \ 5 | python ../../../../fwi.py configs/config.yml \ 6 | --mode forward \ 7 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/cycleskipping/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed* 4 | rm -rf datamask.npy 5 | rm -rf results 6 | rm -rf *.png 7 | echo 'Done' -------------------------------------------------------------------------------- /examples/advances/cycleskipping/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward_invert.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/cycleskipping/geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/advances/cycleskipping/geometry.gif -------------------------------------------------------------------------------- /examples/advances/cycleskipping/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:3 -------------------------------------------------------------------------------- /examples/advances/cycleskipping/inversion.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=l2 \ 8 | --num-batches 1 \ 9 | --lr vp=20.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/cycleskipping/with_low_frequency.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py configs/with_low_frequency.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=l2 \ 8 | --num-batches 2 \ 9 | --lr vp=20.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed_withlow \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/cycleskipping/without_low_frequency.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py configs/without_low_frequency.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=l2 \ 8 | --num-batches 2 \ 9 | --lr vp=20.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed_withoutlow \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/cycleskipping/without_low_frequency_ttcc.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py configs/without_low_frequency_ttcc.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=traveltime \ 8 | --num-batches 2 \ 9 | --lr vp=20.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed_withoutlow_ttcc \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/largescale/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 4 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/largescale/forward_torch.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=4 ../../fwi_torchrun.py forward.yml \ 2 | --mode forward \ 3 | --modelparallel \ 4 | --num-batches 4 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/largescale/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/advances/minifwi/multigpu.py: -------------------------------------------------------------------------------- 1 | from jax import random, pmap 2 | import jax.numpy as jnp 3 | 4 | # Jax on multiple gpus 5 | 6 | # Create 8 random 5000 x 6000 matrices, one per GPU 7 | keys = random.split(random.PRNGKey(0), 8) 8 | mats = pmap(lambda key: random.normal(key, (5000, 6000)))(keys) 9 | 10 | # Run a local matmul on each device in parallel (no data transfer) 11 | result = pmap(lambda x: jnp.dot(x, x.T))(mats) # result.shape is (8, 5000, 5000) 12 | 13 | # Compute the mean on each device in parallel and print the result 14 | print(pmap(jnp.mean)(result)) 15 | # prints [1.1566595 1.1805978 ... 1.2321935 1.2015157] -------------------------------------------------------------------------------- /examples/advances/minifwi/test.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | a = torch.rand(2, 1, 4, 4) 4 | src_list = [[0, 0], [1, 1]] 5 | 6 | # Unpack src_list into separate arrays for rows and columns 7 | rows, cols = zip(*src_list) 8 | 9 | # Create indices tensor 10 | indices = torch.tensor([0, 1]) 11 | 12 | # Use advanced indexing and broadcasting to increment values 13 | a[indices, :, rows, cols] += 1 14 | 15 | print(a) 16 | -------------------------------------------------------------------------------- /examples/advances/numbatch_setting/batch10.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/numbatch_setting/batch100.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 100 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/numbatch_setting/batch20.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 20 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/numbatch_setting/batch200.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 200 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/numbatch_setting/batch50.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 50 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/numbatch_setting/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/advances/numbatch_setting/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/advances/numbatch_setting/run_this_example.sh: -------------------------------------------------------------------------------- 1 | echo 'Run this example' 2 | 3 | echo 'Run forward modeling with 10 batches' 4 | sh batch10.sh 5 | echo 'Done' 6 | 7 | echo 'Run forward modeling with 20 batches' 8 | sh batch20.sh 9 | echo 'Done' 10 | 11 | echo 'Run forward modeling with 50 batches' 12 | sh batch50.sh 13 | echo 'Done' 14 | 15 | echo 'Run forward modeling with 100 batches' 16 | sh batch100.sh 17 | echo 'Done' 18 | 19 | echo 'Run forward modeling with 200 batches' 20 | sh batch200.sh 21 | echo 'Done' -------------------------------------------------------------------------------- /examples/advances/source_inversion/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model results 3 | rm -rf shot_gather.npy 4 | rm -rf *.png 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/advances/source_inversion/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py configs/forward.yml \ 6 | --mode forward \ 7 | --use-cuda -------------------------------------------------------------------------------- /examples/advances/source_inversion/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/advances/source_inversion/wavelet_bspline.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/advances/source_inversion/wavelet_bspline.npy -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.hdf5 4 | rm -rf *.png 5 | rm -rf results 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic/configs/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f configs/hosts \ 5 | python ../../../../fwi.py configs/forward.yml \ 6 | --mode forward \ 7 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic/inversion_ADHABC.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch_dist.py configs/inversion_ADHABC.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --lr vp=10.0 \ 5 | --mode inversion \ 6 | --save-path ./results/fwi_classic_ADHABC \ 7 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic/inversion_ADPML.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch_dist.py configs/inversion_ADPML.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_ADPML \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic/inversion_BSHABC.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch_dist.py configs/inversion_BSHABC.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_BSHABC \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic/inversion_BSPML.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch_dist.py configs/inversion_BSPML.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_BSPML \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic/run_this_example.sh: -------------------------------------------------------------------------------- 1 | echo 'Cleaning the old files' 2 | sh clean.sh 3 | 4 | echo 'Generate the geometry and velocity' 5 | python3 generate_model_geometry.py 6 | echo 'Done.' 7 | 8 | echo 'Running forward modeling' 9 | sh forward.sh 10 | echo 'Done.' 11 | 12 | echo 'Running FWI with automatic differentiation' 13 | sh inversion_AD.sh 14 | echo 'Done.' 15 | 16 | echo 'Running FWI with boundary saving-based automatic differentiation' 17 | sh inversion_BS.sh 18 | echo 'Done.' 19 | 20 | echo 'Compare the results of AD and BS.' 21 | python3 AD_vs_BS.py 22 | echo 'Done.' 23 | -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic_multiples/check_wf.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | import glob 4 | wf_files = sorted(glob.glob('./wf_habc/*.npy')) 5 | dt = 0.002 6 | for idx, file in enumerate(wf_files): 7 | if idx %100==0: 8 | wf = np.load(file) 9 | 10 | plt.imshow(wf[5], aspect='auto') 11 | plt.title(f'time={idx*dt}s') 12 | plt.show() 13 | -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic_multiples/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png 5 | rm -rf results 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic_multiples/configs/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic_multiples/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f configs/hosts \ 5 | python ../../../../fwi.py configs/forward.yml \ 6 | --mode forward \ 7 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic_multiples/inversion_ADHABC.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=4 /home/shaowinw/seistorch/seistorch_dist.py configs/inversion_ADHABC.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --lr vp=10.0 \ 5 | --mode inversion \ 6 | --save-path ./results/fwi_classic_ADHABC \ 7 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic_multiples/inversion_ADPML.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=4 /home/shaowinw/seistorch/seistorch_dist.py configs/inversion_ADPML.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_ADPML \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic_multiples/inversion_BSHABC.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=4 /home/shaowinw/seistorch/seistorch_dist.py configs/inversion_BSHABC.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_BSHABC \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic_multiples/inversion_BSPML.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=4 /home/shaowinw/seistorch/seistorch_dist.py configs/inversion_BSPML.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_BSPML \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/acoustic_multiples/run_this_example.sh: -------------------------------------------------------------------------------- 1 | echo 'Cleaning the old files' 2 | sh clean.sh 3 | 4 | echo 'Generate the geometry and velocity' 5 | python3 generate_model_geometry.py 6 | echo 'Done.' 7 | 8 | echo 'Running forward modeling' 9 | sh forward.sh 10 | echo 'Done.' 11 | 12 | echo 'Running FWI with automatic differentiation' 13 | sh inversion_AD.sh 14 | echo 'Done.' 15 | 16 | echo 'Running FWI with boundary saving-based automatic differentiation' 17 | sh inversion_BS.sh 18 | echo 'Done.' 19 | 20 | echo 'Compare the results of AD and BS.' 21 | python3 AD_vs_BS.py 22 | echo 'Done.' 23 | -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/elastic/check_bs.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | nt = 1499 5 | ct = 1200 6 | 7 | wfb = np.load(f"./backward/backward{ct:04d}.npy")[:,50:-50, 50:-50] 8 | wff = np.load(f"./forward/forward{nt-ct:04d}.npy")[:,50:-50, 50:-50] 9 | 10 | fig, axes = plt.subplots(1, 3, figsize=(10, 4)) 11 | axes[0].imshow(wfb[0].squeeze(), cmap='gray', aspect='auto') 12 | axes[1].imshow(wff[0].squeeze(), cmap='gray', aspect='auto') 13 | axes[2].imshow(wfb[0].squeeze()-wff[0].squeeze(), cmap='gray', aspect='auto') 14 | plt.show() -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/elastic/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png 5 | rm -rf results 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/elastic/configs/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/elastic/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f configs/hosts \ 5 | python ../../../../fwi.py configs/forward.yml \ 6 | --mode forward \ 7 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/elastic/inversion_AD.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 /home/shaowinw/seistorch/seistorch_dist.py configs/inversion_AD.yml \ 2 | --opt adam \ 3 | --loss vp=l2 vs=l2 rho=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 vs=5.0 rho=3.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_AD \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/elastic/inversion_BS.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 /home/shaowinw/seistorch/seistorch_dist.py configs/inversion_BS.yml \ 2 | --opt adam \ 3 | --loss vp=l2 vs=l2 rho=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 vs=5.0 rho=3.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_BS \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/elastic/run_this_example.sh: -------------------------------------------------------------------------------- 1 | echo 'Cleaning the old files' 2 | sh clean.sh 3 | 4 | echo 'Generate the geometry and velocity' 5 | python3 generate_model_geometry.py 6 | echo 'Done.' 7 | 8 | echo 'Running forward modeling' 9 | sh forward.sh 10 | echo 'Done.' 11 | 12 | echo 'Running FWI with automatic differentiation' 13 | sh inversion_AD.sh 14 | echo 'Done.' 15 | 16 | echo 'Running FWI with boundary saving-based automatic differentiation' 17 | sh inversion_BS.sh 18 | echo 'Done.' 19 | 20 | echo 'Compare the results of AD and BS.' 21 | python3 AD_vs_BS.py 22 | echo 'Done.' 23 | -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/fwim/acoustic.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/acoustic_fwim.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/fwim/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf *.hdf5 4 | rm -rf AD ADa BS BSa 5 | rm -rf *.png *.gif 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/fwim/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/fwim/inversion_AD.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion_AD.yml \ 3 | --opt adam \ 4 | --loss vp=l2 rx=l2 rz=l2 \ 5 | --lr vp=0.00 rx=0.00 rz=0.00 \ 6 | --mode inversion \ 7 | --save-path ./AD \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/ADvsBS/fwim/inversion_BS.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion_BS.yml \ 3 | --opt adam \ 4 | --loss vp=l2 rx=l2 rz=l2 \ 5 | --lr vp=0.00 rx=0.00 rz=0.00 \ 6 | --mode inversion \ 7 | --save-path ./BS \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/abcs/acoustic.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py configs/acoustic.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/abcs/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png *.gif 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/abcs/elastic.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py configs/elastic.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/abcs/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/abcs/ttielastic.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py configs/ttielastic.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/abcs/viscoacoustic.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py configs/viscoacoustic.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/gradient_clamp/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results* 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/gradient_clamp/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 4 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/gradient_clamp/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/gradient_clamp/noclamp.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt cg \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_noclamp \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --disable-grad-clamp \ 13 | --grad-cut 14 | # --grad-smooth 15 | -------------------------------------------------------------------------------- /examples/check_features/gradient_clamp/withclamp.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt cg \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_withclamp \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/check_features/gradient_smooth/README: -------------------------------------------------------------------------------- 1 | # workflow: 2 | # When you specify the gradient smoothing parameter "--grad-smooth" in <.sh> file, 3 | # you should also specify the parameters under 'smooth' in <.yml> file. 4 | 5 | # 1. Generate model geometry 6 | python generate_model_geometry.py 7 | 8 | # 2. Generate shot gathers 9 | sh forward.sh 10 | 11 | # 3. Show shot gathers 12 | python show_shotgather.py 13 | 14 | # 4. Inversion with gradient smoothing 15 | sh inversion_gradsm.sh 16 | 17 | # 5. Inversion without gradient smoothing 18 | sh inversion_nogradsm.sh 19 | 20 | # 6. Show inversion results 21 | python results.py -------------------------------------------------------------------------------- /examples/check_features/gradient_smooth/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png 5 | rm -rf results 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/gradient_smooth/configs/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/gradient_smooth/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f configs/hosts \ 5 | python ../../../../fwi.py configs/forward.yml \ 6 | --mode forward \ 7 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/gradient_smooth/inversion_gradsm.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f configs/hosts \ 5 | python ../../../../fwi.py configs/inversion_gradsm.yml \ 6 | --opt adam \ 7 | --loss vp=l2 \ 8 | --num-batches 1 \ 9 | --lr vp=10.0 \ 10 | --mode inversion \ 11 | --save-path ./results/with_grad_sm \ 12 | --grad-smooth \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/gradient_smooth/inversion_nogradsm.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f configs/hosts \ 5 | python ../../../../fwi.py configs/inversion_nogradsm.yml \ 6 | --opt adam \ 7 | --loss vp=l2 \ 8 | --num-batches 1 \ 9 | --lr vp=10.0 \ 10 | --mode inversion \ 11 | --save-path ./results/no_grad_sm \ 12 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/habc/acoustic_habc.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic_habc.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/habc/acoustic_habc_multiple.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic_habc_multiple.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/habc/acoustic_pml.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic_pml.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/habc/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf *.npy 2 | rm -rf wf_pml 3 | rm -rf geometry 4 | rm -rf velocity_model 5 | rm -rf *.gif -------------------------------------------------------------------------------- /examples/check_features/habc/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/habc/show_coes.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | coes = np.load('habc.npy') 5 | 6 | plt.imshow(coes) 7 | plt.show() -------------------------------------------------------------------------------- /examples/check_features/habc/show_shotgather.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | """Load the shot gather""" 5 | cog_habc = np.load('shot_gather_habc.npy', allow_pickle=True)[0] 6 | cog_pml = np.load('shot_gather_pml.npy', allow_pickle=True)[0] 7 | 8 | 9 | """Show the shot gather""" 10 | fig, ax = plt.subplots(1, 2, figsize=(10, 5)) 11 | vmin, vmax = np.percentile(cog_habc, [1, 99]) 12 | ax[0].imshow(cog_habc, vmin=vmin, vmax=vmax, cmap="seismic", aspect='auto') 13 | ax[1].imshow(cog_pml, vmin=vmin, vmax=vmax, cmap="seismic", aspect='auto') 14 | ax[0].set_title('HABC') 15 | ax[1].set_title('PML') 16 | plt.show() 17 | -------------------------------------------------------------------------------- /examples/check_features/habc_gradients/acoustic_nomultiple/check.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | obs = np.load('./results/fwi_classic_ADHABC/obs0.npy') 5 | syn = np.load('./results/fwi_classic_ADHABC/syn0.npy') 6 | 7 | plt.imshow(obs[0], aspect='auto') 8 | plt.show() 9 | plt.imshow(syn[0], aspect='auto') 10 | plt.show() -------------------------------------------------------------------------------- /examples/check_features/habc_gradients/acoustic_nomultiple/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.hdf5 5 | rm -rf *.png 6 | rm -rf results 7 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/habc_gradients/acoustic_nomultiple/configs/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/habc_gradients/acoustic_nomultiple/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f configs/hosts \ 2 | python /root/seistorch/fwi.py configs/forward.yml \ 3 | --mode forward \ 4 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/habc_gradients/acoustic_nomultiple/inversion_ADHABC.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 /root/seistorch/seistorch_dist.py configs/inversion_ADHABC.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --lr vp=10.0 \ 5 | --mode inversion \ 6 | --save-path ./results/fwi_classic_ADHABC \ 7 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/habc_gradients/acoustic_nomultiple/inversion_ADPML.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 /root/seistorch/seistorch_dist.py configs/inversion_ADPML.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_ADPML \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/habc_gradients/acoustic_nomultiple/inversion_BSHABC.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 /root/seistorch/seistorch_dist.py configs/inversion_BSHABC.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_BSHABC \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/habc_gradients/acoustic_nomultiple/inversion_BSPML.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 /root/seistorch/seistorch_dist.py configs/inversion_BSPML.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/fwi_classic_BSPML \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/habc_gradients/acoustic_nomultiple/run_this_example.sh: -------------------------------------------------------------------------------- 1 | echo 'Cleaning the old files' 2 | sh clean.sh 3 | 4 | echo 'Generate the geometry and velocity' 5 | python3 generate_model_geometry.py 6 | echo 'Done.' 7 | 8 | echo 'Running forward modeling' 9 | sh forward.sh 10 | echo 'Done.' 11 | 12 | echo 'Running FWI with automatic differentiation' 13 | sh inversion_AD.sh 14 | echo 'Done.' 15 | 16 | echo 'Running FWI with boundary saving-based automatic differentiation' 17 | sh inversion_BS.sh 18 | echo 'Done.' 19 | 20 | echo 'Compare the results of AD and BS.' 21 | python3 AD_vs_BS.py 22 | echo 'Done.' 23 | -------------------------------------------------------------------------------- /examples/check_features/hdf5_filesystem/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.hdf5 4 | rm -rf results 5 | rm -rf *.png *.gif 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/hdf5_filesystem/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/hdf5_filesystem/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:3 -------------------------------------------------------------------------------- /examples/check_features/hdf5_filesystem/inversion.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --opt adam \ 7 | --loss vp=l2 \ 8 | --num-batches 2 \ 9 | --lr vp=10.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/implicitNN/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf geometry 2 | rm -rf __pycache__ -------------------------------------------------------------------------------- /examples/check_features/multiples/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png *.gif 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/multiples/forward_with_multiple.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward_with_multiple.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/multiples/forward_without_multiple.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward_without_multiple.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/multiples/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/check_features/torchrun_dist/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf ./results geometry 2 | rm -rf *.gif *.png 3 | rm -rf *.hdf5 -------------------------------------------------------------------------------- /examples/check_features/torchrun_dist/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/forward.yml \ 3 | --mode forward \ 4 | --num-batches 10 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/torchrun_dist/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:3 -------------------------------------------------------------------------------- /examples/check_features/torchrun_dist/inversion.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=2 \ 2 | ../../../seistorch_dist.py \ 3 | configs/forward.yml \ 4 | --opt adam \ 5 | --loss vp=l2 \ 6 | --lr vp=10.0 \ 7 | --step-per-epoch 1 \ 8 | --mode inversion \ 9 | --save-path ./results/towed \ 10 | --grad-cut \ 11 | --grad-smooth \ 12 | --filteratfirst \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/varying_acquistion/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf observed.hdf5 5 | rm -rf results 6 | rm -rf *.png *.gif 7 | echo 'Done' -------------------------------------------------------------------------------- /examples/check_features/varying_acquistion/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 5 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/check_features/varying_acquistion/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:3 -------------------------------------------------------------------------------- /examples/check_features/varying_acquistion/inversion.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --opt adam \ 7 | --loss vp=l2 \ 8 | --num-batches 2 \ 9 | --lr vp=10.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/compare_elastic/check.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import glob 3 | import matplotlib.pyplot as plt 4 | 5 | wffiles = sorted(glob.glob("wf_pml/*.npy")) 6 | pmln = 50 7 | 8 | for i, wffile in enumerate(wffiles): 9 | if i %200==0: 10 | wf = np.load(wffile)[:, pmln:-pmln, pmln:-pmln] 11 | print(wf.shape) 12 | vmin,vmax=np.percentile(wf[0], [2, 98]) 13 | plt.imshow(wf[0], vmin=vmin, vmax=vmax, 14 | # interpolation="nearest", 15 | cmap="gray") 16 | plt.title(f"i={i}") 17 | plt.show() -------------------------------------------------------------------------------- /examples/forward_modeling/compare_elastic/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry models 3 | rm -rf ./*.npy 4 | rm -rf *.png 5 | rm -rf wf_pml 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/forward_modeling/compare_elastic/elastic.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/elastic.yml \ 3 | --mode forward \ 4 | --num-batches 5 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/compare_elastic/elastic_bg.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/elastic_bg.yml \ 3 | --mode forward \ 4 | --num-batches 5 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/compare_elastic/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/forward_modeling/compare_elastic/ricker.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | ricker = np.loadtxt('ricker.txt') 4 | np.save('wavelet.npy', ricker.astype(np.float32)) 5 | 6 | # Plot the wavelet 7 | import matplotlib.pyplot as plt 8 | plt.plot(ricker) 9 | plt.show() -------------------------------------------------------------------------------- /examples/forward_modeling/compare_elastic/vdr.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vdr.yml \ 3 | --mode forward \ 4 | --num-batches 5 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/compare_elastic/vdr_bg.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vdr_bg.yml \ 3 | --mode forward \ 4 | --num-batches 5 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/acoustic.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/acoustic_rho.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic_rho.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/aec.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/aec.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf *.npy 4 | rm -rf wf_pml 5 | rm -rf *.png *.gif 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/decouple.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/decouple.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/elastic.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/elastic.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/tti.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/tti.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/ttielastic.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py configs/ttielastic.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/vdr.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vdr.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/viscoacoustic.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py configs/viscoacoustic.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/vti.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vti.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/different_eq/vti2.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vti2.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/elastic_modeling2d/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry models 3 | rm -rf shot_gather.npy 4 | rm -rf *.png 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/forward_modeling/elastic_modeling2d/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/elastic_modeling2d/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/forward_modeling/forward_modeling2d/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png *.gif 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/forward_modeling/forward_modeling2d/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/forward_modeling2d/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/forward_modeling/forward_modeling3d/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/forward_modeling/forward_modeling3d/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py forward.yml \ 3 | --mode forward \ 4 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/forward_modeling3d/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/forward_modeling/pseudospectral/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf geometry models figures results 2 | rm -rf __pycache__ 3 | rm -rf *.npy *.png -------------------------------------------------------------------------------- /examples/forward_modeling/qP_wave/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf vti_a vti_b vti_c 2 | rm -rf velocity_model 3 | rm -rf geometry 4 | rm -rf shot_gather.npy 5 | rm -rf *.gif -------------------------------------------------------------------------------- /examples/forward_modeling/qP_wave/figures/wavefield_0700.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/forward_modeling/qP_wave/figures/wavefield_0700.png -------------------------------------------------------------------------------- /examples/forward_modeling/qP_wave/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/forward_modeling/qP_wave/tti.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/tti.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/qP_wave/vti_a.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vti_a.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/qP_wave/vti_b.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vti_b.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/qP_wave/vti_c.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vti_c.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/variable_density/acoustic.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/variable_density/acoustic_rho.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic_rho.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/variable_density/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf *.npy 4 | rm -rf *.png *.gif 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/forward_modeling/variable_density/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/forward_modeling/viscoacoustic/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png *.gif 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/forward_modeling/viscoacoustic/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/forward_modeling/viscoacoustic/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/camembert/check_code.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | obs = np.load("./results_l2/obs.npy", allow_pickle=True) 5 | syn = np.load("./results_l2/syn.npy", allow_pickle=True) 6 | 7 | for i in range(obs.shape[0]): 8 | fig, axes = plt.subplots(1, 2, figsize=(8, 4)) 9 | axes[0].imshow(obs[i], cmap="seismic", aspect="auto") 10 | axes[0].set_title("Observed") 11 | axes[1].imshow(syn[i], cmap="seismic", aspect="auto") 12 | axes[1].set_title("Synthetic") 13 | plt.tight_layout() 14 | plt.show() 15 | -------------------------------------------------------------------------------- /examples/inversion/camembert/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf results* 3 | rm -rf geometry velocity_model 4 | rm -rf shot_gather.npy 5 | rm -rf *.npy 6 | rm -rf *.png 7 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/camembert/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/camembert/initial.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py initial.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/camembert/inversion_l2.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py inversion.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=l2 \ 8 | --num-batches 1 \ 9 | --lr vp=20.0 \ 10 | --mode inversion \ 11 | --save-path ./results_l2 \ 12 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/camembert/inversion_nim.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py inversion.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=nim \ 8 | --num-batches 1 \ 9 | --lr vp=20.0 \ 10 | --mode inversion \ 11 | --save-path ./results_nim \ 12 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/camembert/inversion_ot.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py inversion.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=w1d \ 8 | --num-batches 1 \ 9 | --lr vp=20.0 \ 10 | --mode inversion \ 11 | --save-path ./results_ot \ 12 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/camembert/observed.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../fwi.py observed.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/easy_fwi/3d_torch/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf figures models *.png -------------------------------------------------------------------------------- /examples/inversion/easy_fwi/3d_torch/configures.py: -------------------------------------------------------------------------------- 1 | nz,ny,nx=65,101,101 2 | pmln=50 3 | 4 | # configure 5 | delay = 150 # ms 6 | fm = 3 # Hz 7 | dt = 0.002 # s 8 | nt = 500 # timesteps 9 | dh = 15 # m 10 | pmln = 10 # pml layers 11 | srcz = 1+pmln # grid point 12 | recz = 1+pmln # grid point -------------------------------------------------------------------------------- /examples/inversion/inversion_with_multiples/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | 4 | rm -rf *.png *.gif 5 | 6 | rm -rf with_multiples/*.npy 7 | rm -rf with_multiples/results 8 | 9 | rm -rf without_multiples/*.npy 10 | rm -rf without_multiples/results 11 | 12 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/inversion_with_multiples/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:3 -------------------------------------------------------------------------------- /examples/inversion/inversion_with_multiples/with_multiples/forward_withmultiple.sh: -------------------------------------------------------------------------------- 1 | mpirun -f ../hosts \ 2 | python ../../../../../fwi.py forward_withmultiple.yml \ 3 | --mode forward \ 4 | --num-batches 10 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/inversion_with_multiples/with_multiples/source_encoding_fwi.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../codingfwi.py forward_withmultiple.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/inversion_with_multiples/without_multiples/forward_nomultiple.sh: -------------------------------------------------------------------------------- 1 | mpirun -f ../hosts \ 2 | python ../../../../../fwi.py forward_nomultiple.yml \ 3 | --mode forward \ 4 | --num-batches 10 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/inversion_with_multiples/without_multiples/source_encoding_fwi.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../codingfwi.py forward_nomultiple.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/check.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import torch 3 | 4 | model = torch.load('results/model_F00E02.pt')['rz'].cpu().detach().numpy() 5 | 6 | print(model.max(), model.min()) -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry models 3 | rm -rf observed.npy 4 | rm -rf results* 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/figures/Comparison.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/joint_fwi_lsrtm/figures/Comparison.png -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/figures/Gradient_at_first_epoch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/joint_fwi_lsrtm/figures/Gradient_at_first_epoch.png -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/figures/Inverted_Profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/joint_fwi_lsrtm/figures/Inverted_Profile.png -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/figures/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/joint_fwi_lsrtm/figures/model_geometry.png -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/figures/velocity_models.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/joint_fwi_lsrtm/figures/velocity_models.png -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/forward.yml \ 3 | --mode forward \ 4 | --num-batches 2 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/sefwi.sh: -------------------------------------------------------------------------------- 1 | python ../../../codingfwi.py configs/inversion.yml \ 2 | --gpuid 0 \ 3 | --opt adam \ 4 | --loss vp=l2 rx=l2 rz=l2 \ 5 | --mode inversion \ 6 | --batchsize 10 \ 7 | --lr vp=10.0 rx=0.0002 rz=0.0002 \ 8 | --save-path ./results \ 9 | --checkpoint ./none \ 10 | --grad-cut \ 11 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/joint_fwi_lsrtm/show_int.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | obs = np.load('results/obs.npy') 5 | syn = np.load('results/syn.npy')[0] 6 | 7 | fig, axes = plt.subplots(1, 2, figsize=(6, 3)) 8 | vmin, vmax = np.percentile(obs, [2, 98]) 9 | axes[0].imshow(obs, cmap='gray', aspect='auto', vmin=vmin, vmax=vmax) 10 | axes[0].set_title('Observed') 11 | axes[1].imshow(syn, cmap='gray', aspect='auto', vmin=vmin, vmax=vmax) 12 | axes[1].set_title('Synthetic') 13 | plt.tight_layout() 14 | plt.show() 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry results inverted wavelet 3 | rm -rf *.npy *.hdf5 4 | rm -rf *.png *.gif 5 | echo 'Done' 6 | -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/figures/Inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/cs/figures/Inverted.png -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/figures/Trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/cs/figures/Trace.png -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/figures/cs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/cs/figures/cs.png -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/figures/geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/cs/figures/geometry.gif -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/figures/wavelet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/cs/figures/wavelet.png -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/forward.yml \ 3 | --mode forward \ 4 | --num-batches 10 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:3 -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/inversion_cs.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=cs \ 5 | --lr vp=20.0 \ 6 | --mode inversion \ 7 | --save-path ./results/towed_cs \ 8 | --filteratfirst \ 9 | --grad-cut \ 10 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/cs/inversion_l2.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 --master-port 12306 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --lr vp=20.0 \ 6 | --mode inversion \ 7 | --save-path ./results/towed_l2 \ 8 | --filteratfirst \ 9 | --grad-cut \ 10 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/checkdata.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | obs = np.load('results/l2/obs0.npy') 5 | syn = np.load('results/l2/syn0.npy') 6 | 7 | fig, axes = plt.subplots(1, 2, figsize=(9, 3)) 8 | axes[0].imshow(obs[5], cmap='gray', aspect='auto') 9 | axes[1].imshow(syn[5], cmap='gray', aspect='auto') 10 | plt.tight_layout() 11 | plt.show() -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf velocity_model geometry 2 | rm -rf model_geometry.png 3 | rm -rf *.npy 4 | rm -rf *.hdf5 5 | rm -rf results -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/Adj_compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/Adj_compare.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/Adjoint_sources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/Adjoint_sources.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/Envelopes_Profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/Envelopes_Profile.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/Envelopes_Trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/Envelopes_Trace.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/Gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/Gradient.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/Gradient_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/Gradient_line.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/Profiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/Profiles.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/adj_freq_spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/adj_freq_spectrum.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/highpass_ricker_envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/highpass_ricker_envelope.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/highpass_ricker_envelope_spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/highpass_ricker_envelope_spectrum.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/model_geometry.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/ricker_envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/ricker_envelope.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/figures/ricker_envelope_spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/envelope/figures/ricker_envelope_spectrum.png -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/fwi_envelope.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=envelope \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/envelope \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/fwi_l2.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/l2 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/initial.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/initial.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/envelope/observed.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/observed.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/implicitLoss/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results* 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/misfits/implicitLoss/download_vel.sh: -------------------------------------------------------------------------------- 1 | rm -rf seismic_inversion 2 | rm -rf velocity_model 3 | 4 | git lfs install 5 | # download the velocity model from website 6 | wget https://huggingface.co/datasets/shaowinw/seismic_inversion/blob/main/marmousi_customer/marmousi_20m/true_vp.npy -o ../../../models/marmousi_model/true_vp.npy 7 | wget https://huggingface.co/datasets/shaowinw/seismic_inversion/blob/main/marmousi_customer/marmousi_20m/linear_vp.npy -o ../../../models/marmousi_model/linear_vp.npy 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/inversion/misfits/implicitLoss/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py fullband.yml \ 6 | --mode forward \ 7 | --num-batches 4 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/implicitLoss/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/misfits/implicitLoss/source_encoding_fwi_ip.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../codingfwi.py multiscale.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=implicit \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_ip \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/misfits/implicitLoss/source_encoding_fwi_l2.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../codingfwi.py multiscale.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_l2 \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/misfits/ip/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf results 3 | rm -rf geometry velocity_model 4 | rm -rf *.npy *.hdf5 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/misfits/ip/forward_with_init_vel.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/forward_with_init_vel.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ip/forward_with_true_vel.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/forward_with_true_vel.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ip/fwi_ip.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=ip2 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/ip \ 8 | --filteratfirst \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ip/fwi_l2.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/l2 \ 8 | --filteratfirst \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ip/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/check.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | import torch 4 | 5 | obs = np.load('results/l2_outlier/obs.npy') 6 | syn = np.load('results/l2_outlier/syn.npy')[0] 7 | 8 | fig, axes = plt.subplots(1, 2, figsize=(6, 4)) 9 | vmin, vmax = np.percentile(obs, [2, 98]) 10 | kwargs = {"cmap": "seismic", "aspect": "auto", "vmin": vmin, "vmax": vmax} 11 | axes[0].imshow(obs, **kwargs) 12 | axes[0].set_title("Observed") 13 | 14 | axes[1].imshow(syn, **kwargs) 15 | axes[1].set_title("Synthetic") -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf *.npy 4 | rm -rf results 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/ModelError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/ModelError.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/gaussian/Inverted_withnoise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/gaussian/Inverted_withnoise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/gaussian/Inverted_without_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/gaussian/Inverted_without_noise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/gaussian/Traces_with(out)_noise_l1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/gaussian/Traces_with(out)_noise_l1.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/gaussian/Traces_with(out)_noise_l2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/gaussian/Traces_with(out)_noise_l2.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/gaussian/Traces_with_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/gaussian/Traces_with_noise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/gaussian/Traces_without_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/gaussian/Traces_without_noise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/gaussian/add_noise_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/gaussian/add_noise_profile.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/gaussian/add_noise_trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/gaussian/add_noise_trace.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/model_geometry.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/outlier/Inverted_withnoise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/outlier/Inverted_withnoise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/outlier/Inverted_without_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/outlier/Inverted_without_noise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/outlier/Traces_with(out)_noise_l1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/outlier/Traces_with(out)_noise_l1.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/outlier/Traces_with(out)_noise_l2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/outlier/Traces_with(out)_noise_l2.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/outlier/Traces_with_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/outlier/Traces_with_noise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/outlier/Traces_without_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/outlier/Traces_without_noise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/shot_gather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/shot_gather.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/without_noise/Inverted_without_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/without_noise/Inverted_without_noise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/figures/without_noise/Traces_without_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/l1/figures/without_noise/Traces_without_noise.png -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py forward.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/sefwi_l1.sh: -------------------------------------------------------------------------------- 1 | python ../../../../codingfwi.py forward.yml \ 2 | --gpuid 0 \ 3 | --opt adam \ 4 | --loss vp=l1 \ 5 | --mode inversion \ 6 | --batchsize 10 \ 7 | --lr vp=10.0 \ 8 | --save-path ./results/l1 \ 9 | --checkpoint ./none \ 10 | --use-cuda \ 11 | --grad-cut 12 | # --grad-smooth 13 | -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/sefwi_l1_gaussian.sh: -------------------------------------------------------------------------------- 1 | python ../../../../codingfwi.py gaussian.yml \ 2 | --gpuid 0 \ 3 | --opt adam \ 4 | --loss vp=l1 \ 5 | --mode inversion \ 6 | --batchsize 10 \ 7 | --lr vp=10.0 \ 8 | --save-path ./results/l1_gaussian \ 9 | --checkpoint ./none \ 10 | --use-cuda \ 11 | --grad-cut 12 | # --grad-smooth 13 | -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/sefwi_l1_outlier.sh: -------------------------------------------------------------------------------- 1 | python ../../../../codingfwi.py outlier.yml \ 2 | --gpuid 0 \ 3 | --opt adam \ 4 | --loss vp=l1 \ 5 | --mode inversion \ 6 | --batchsize 10 \ 7 | --lr vp=10.0 \ 8 | --save-path ./results/l1_outlier \ 9 | --checkpoint ./none \ 10 | --use-cuda \ 11 | --grad-cut 12 | # --grad-smooth 13 | -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/sefwi_l2.sh: -------------------------------------------------------------------------------- 1 | python ../../../../codingfwi.py forward.yml \ 2 | --gpuid 0 \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --mode inversion \ 6 | --batchsize 10 \ 7 | --lr vp=10.0 \ 8 | --save-path ./results/l2 \ 9 | --checkpoint ./none \ 10 | --use-cuda \ 11 | --grad-cut 12 | # --grad-smooth 13 | -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/sefwi_l2_gaussian.sh: -------------------------------------------------------------------------------- 1 | python ../../../../codingfwi.py gaussian.yml \ 2 | --gpuid 0 \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --mode inversion \ 6 | --batchsize 10 \ 7 | --lr vp=10.0 \ 8 | --save-path ./results/l2_gaussian \ 9 | --checkpoint ./none \ 10 | --use-cuda \ 11 | --grad-cut 12 | # --grad-smooth 13 | -------------------------------------------------------------------------------- /examples/inversion/misfits/l1/sefwi_l2_outlier.sh: -------------------------------------------------------------------------------- 1 | python ../../../../codingfwi.py outlier.yml \ 2 | --gpuid 0 \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --mode inversion \ 6 | --batchsize 10 \ 7 | --lr vp=10.0 \ 8 | --save-path ./results/l2_outlier \ 9 | --checkpoint ./none \ 10 | --use-cuda \ 11 | --grad-cut 12 | # --grad-smooth 13 | -------------------------------------------------------------------------------- /examples/inversion/misfits/localcoherence/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf velocity_model geometry 2 | rm -rf model_geometry.png 3 | rm -rf *.npy 4 | rm -rf *.hdf5 5 | rm -rf results -------------------------------------------------------------------------------- /examples/inversion/misfits/localcoherence/figures/LocalCoherence_Ricker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/localcoherence/figures/LocalCoherence_Ricker.png -------------------------------------------------------------------------------- /examples/inversion/misfits/localcoherence/figures/LocalCoherence_Shots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/localcoherence/figures/LocalCoherence_Shots.png -------------------------------------------------------------------------------- /examples/inversion/misfits/localcoherence/fwi_l2.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/l2 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/localcoherence/fwi_lc.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=lc \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/lc \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/localcoherence/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/misfits/localcoherence/initial.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/initial.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/localcoherence/observed.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/observed.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf results 3 | rm -rf geometry velocity_model 4 | rm -rf *.npy *.hdf5 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/figures/Gradient_diff_norm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/ot/figures/Gradient_diff_norm.png -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/figures/Gradient_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/ot/figures/Gradient_line.png -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/figures/Gradient_vs_l2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/ot/figures/Gradient_vs_l2.png -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/figures/adjoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/ot/figures/adjoints.png -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/figures/adjoints_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/ot/figures/adjoints_line.png -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/figures/loss_vs_delay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/ot/figures/loss_vs_delay.png -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/figures/obs_syn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/misfits/ot/figures/obs_syn.png -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/forward_with_init_vel.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/forward_with_init_vel.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/forward_with_true_vel.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/forward_with_true_vel.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/fwi_envelope.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=envelope \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/envelope \ 8 | --filteratfirst \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/fwi_l2.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/l2 \ 8 | --filteratfirst \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/fwi_ot.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=w1d \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/w1d \ 8 | --filteratfirst \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/misfits/ot/inversion.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=w1d \ 8 | --num-batches 1 \ 9 | --lr vp=20.0 \ 10 | --mode inversion \ 11 | --save-path ./results_w1d \ 12 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/sdtw/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf velocity_model geometry 2 | rm -rf model_geometry.png 3 | rm -rf *.npy 4 | rm -rf *.hdf5 5 | rm -rf results -------------------------------------------------------------------------------- /examples/inversion/misfits/sdtw/fwi_l2.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/l2 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/sdtw/fwi_sdtw.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py configs/inversion.yml \ 3 | --opt adam \ 4 | --loss vp=sdtw \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/sdtw \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/sdtw/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/misfits/sdtw/initial.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/initial.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/sdtw/observed.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py configs/observed.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/source_encoding/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf envelope_1shot l2_1shot nim w1d integration 5 | rm -rf results* 6 | rm -rf *.png 7 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/misfits/source_encoding/download_vel.sh: -------------------------------------------------------------------------------- 1 | rm -rf seismic_inversion 2 | rm -rf velocity_model 3 | 4 | git lfs install 5 | # download the velocity model from website 6 | wget https://huggingface.co/datasets/shaowinw/seismic_inversion/blob/main/marmousi_customer/marmousi_20m/true_vp.npy -o ../../../models/marmousi_model/true_vp.npy 7 | wget https://huggingface.co/datasets/shaowinw/seismic_inversion/blob/main/marmousi_customer/marmousi_20m/linear_vp.npy -o ../../../models/marmousi_model/linear_vp.npy 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/inversion/misfits/source_encoding/envelope.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=envelope \ 6 | --mode inversion \ 7 | --batchsize 1 \ 8 | --lr vp=10.0 \ 9 | --save-path ./envelope_1shot \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/misfits/source_encoding/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 4 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/source_encoding/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/misfits/source_encoding/integration.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=integration \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./integration \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/misfits/source_encoding/l2.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 10 \ 8 | --lr vp=10.0 \ 9 | --save-path ./l2_1shot \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/misfits/source_encoding/nim.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=nim \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./nim \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/misfits/source_encoding/w1d.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=w1d_test \ 6 | --mode inversion \ 7 | --batchsize 10 \ 8 | --lr vp=10.0 \ 9 | --save-path ./w1d \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model results wavelet 3 | rm -rf *.npy *.png *.gif 4 | rm -rf *.png 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/forward_init.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py config/forward_init.yml \ 6 | --mode forward \ 7 | --num-batches 4 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/forward_l2.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py config/forward_l2.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --filteratfirst 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/forward_obs.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py config/forward_obs.yml \ 6 | --mode forward \ 7 | --num-batches 4 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/forward_tt.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py config/forward_tt.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:5 -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/inversion_ip.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py config/nodatamask_forip.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=ip \ 8 | --num-batches 1 \ 9 | --lr vp=30.0 \ 10 | --mode inversion \ 11 | --save-path ./results/ip \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/inversion_l2.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=4 --master-port 2345 ../../../../seistorch_dist.py config/inversion_l2.yml \ 2 | --opt steepestdescent \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=30.0 \ 6 | --mode inversion \ 7 | --save-path ./results/l2 \ 8 | --grad-cut \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/inversion_tt.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=4 ../../../../seistorch_dist.py config/inversion_tt.yml \ 2 | --opt steepestdescent \ 3 | --loss vp=traveltime \ 4 | --num-batches 1 \ 5 | --lr vp=30.0 \ 6 | --mode inversion \ 7 | --save-path ./results/traveltime \ 8 | --grad-cut \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/travel_time_misfit/inversion_tt_l2.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=4 ../../../../seistorch_dist.py config/inversion_tt_l2.yml \ 2 | --opt steepestdescent \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=30.0 \ 6 | --mode inversion \ 7 | --save-path ./results/traveltime_l2 \ 8 | --grad-cut \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/weighted/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.hdf5 4 | rm -rf *.png 5 | rm -rf results 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/misfits/weighted/configs/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/misfits/weighted/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f configs/hosts \ 2 | python ../../../fwi.py configs/forward.yml \ 3 | --mode forward \ 4 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/weighted/fwi_envelope.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../seistorch_dist.py configs/inversion_ADPML.yml \ 2 | --opt adam \ 3 | --loss vp=envelope \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/envelope \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/weighted/fwi_l2.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../seistorch_dist.py configs/inversion_ADPML.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/l2 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/weighted/fwi_weighted.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../seistorch_dist.py configs/inversion_ADPML.yml \ 2 | --opt adam \ 3 | --loss l2=1 envelope=0.1 \ 4 | --num-batches 1 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/weighted \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/misfits/weighted/run_this_example.sh: -------------------------------------------------------------------------------- 1 | echo 'Cleaning the old files' 2 | sh clean.sh 3 | 4 | echo 'Generate the geometry and velocity' 5 | python3 generate_model_geometry.py 6 | echo 'Done.' 7 | 8 | echo 'Running forward modeling' 9 | sh forward.sh 10 | echo 'Done.' 11 | 12 | echo 'Running FWI with automatic differentiation' 13 | sh inversion_AD.sh 14 | echo 'Done.' 15 | 16 | echo 'Running FWI with boundary saving-based automatic differentiation' 17 | sh inversion_BS.sh 18 | echo 'Done.' 19 | 20 | echo 'Compare the results of AD and BS.' 21 | python3 AD_vs_BS.py 22 | echo 'Done.' 23 | -------------------------------------------------------------------------------- /examples/inversion/optimizers/optimizers_towed/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results 5 | rm -rf *.png *.gif 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/optimizers/optimizers_towed/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/optimizers/optimizers_towed/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/optimizers/optimizers_towed/inversion_adam.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --opt adam \ 7 | --loss vp=l2 \ 8 | --num-batches 1 \ 9 | --lr vp=10.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed_adam \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/optimizers/optimizers_towed/inversion_ncg.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --opt cg \ 7 | --loss vp=l2 \ 8 | --num-batches 1 \ 9 | --lr vp=10.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed_cg \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/optimizers/optimizers_towed/inversion_sd.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --opt steepestdescent \ 7 | --loss vp=l2 \ 8 | --num-batches 1 \ 9 | --lr vp=10.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed_sd \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/optimizers/source_encoding/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results* 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/optimizers/source_encoding/download_vel.sh: -------------------------------------------------------------------------------- 1 | rm -rf seismic_inversion 2 | rm -rf velocity_model 3 | 4 | git lfs install 5 | # download the velocity model from website 6 | wget https://huggingface.co/datasets/shaowinw/seismic_inversion/blob/main/marmousi_customer/marmousi_20m/true_vp.npy -o ../../../models/marmousi_model/true_vp.npy 7 | wget https://huggingface.co/datasets/shaowinw/seismic_inversion/blob/main/marmousi_customer/marmousi_20m/linear_vp.npy -o ../../../models/marmousi_model/linear_vp.npy 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/inversion/optimizers/source_encoding/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 4 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/optimizers/source_encoding/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/optimizers/source_encoding/source_encoding_fwi.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/optimizers/source_encoding/source_encoding_fwi_adam.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=cs \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_adam \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/optimizers/source_encoding/source_encoding_fwi_cg.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt cg \ 5 | --loss vp=cs \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_cg \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/optimizers/source_encoding/source_encoding_fwi_sd.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt steepestdescent \ 5 | --loss vp=cs \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_sd \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/sensitivity_kernel/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf *.hdf5 4 | rm -rf kernels 5 | rm -rf *.png *.gif 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/sensitivity_kernel/forward_acoustic.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/forward_acoustic_habc.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/sensitivity_kernel/forward_acoustic_fwim_bg.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/forward_acoustic_fwim_habc.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/sensitivity_kernel/fwi_acoustic_bg.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../seistorch_dist.py configs/inversion_acoustic_habc_bg.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --lr vp=0.00 \ 6 | --mode inversion \ 7 | --save-path ./kernels/acoustic_habc_bg \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/sensitivity_kernel/fwi_acoustic_fwim_sm.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../seistorch_dist.py configs/inversion_acoustic_fwim_habc_sm.yml \ 3 | --opt adam \ 4 | --loss vp=l2 rx=l2 rz=l2 \ 5 | --lr vp=0.00 rx=0.00 rz=0.00 \ 6 | --mode inversion \ 7 | --save-path ./kernels/acoustic_fwim_habc_sm \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/sensitivity_kernel/fwi_acoustic_fwim_zero.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../seistorch_dist.py configs/inversion_acoustic_fwim_habc_zero.yml \ 3 | --opt adam \ 4 | --loss vp=l2 rx=l2 rz=l2 \ 5 | --lr vp=0.00 rx=0.00 rz=0.00 \ 6 | --mode inversion \ 7 | --save-path ./kernels/acoustic_fwim_habc_zero \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/sensitivity_kernel/fwi_acoustic_sm.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../seistorch_dist.py configs/inversion_acoustic_habc_sm.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --lr vp=0.00 \ 6 | --mode inversion \ 7 | --save-path ./kernels/acoustic_habc_sm \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/sensitivity_kernel/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/source_encoding/acoustic/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results* 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/source_encoding/acoustic/download_vel.sh: -------------------------------------------------------------------------------- 1 | rm -rf seismic_inversion 2 | rm -rf velocity_model 3 | 4 | git lfs install 5 | # download the velocity model from website 6 | wget https://huggingface.co/datasets/shaowinw/seismic_inversion/blob/main/marmousi_customer/marmousi_20m/true_vp.npy -o ../../../models/marmousi_model/true_vp.npy 7 | wget https://huggingface.co/datasets/shaowinw/seismic_inversion/blob/main/marmousi_customer/marmousi_20m/linear_vp.npy -o ../../../models/marmousi_model/linear_vp.npy 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/inversion/source_encoding/acoustic/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py forward.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/source_encoding/acoustic/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/source_encoding/acoustic/show_int.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | obs = np.load('results/obs.npy') 5 | syn = np.load('results/syn.npy')[0] 6 | 7 | fig, axes = plt.subplots(1, 2, figsize=(6, 3)) 8 | vmin, vmax = np.percentile(obs, [2, 98]) 9 | axes[0].imshow(obs, cmap='gray', aspect='auto', vmin=vmin, vmax=vmax) 10 | axes[0].set_title('Observed') 11 | axes[1].imshow(syn, cmap='gray', aspect='auto', vmin=vmin, vmax=vmax) 12 | axes[1].set_title('Synthetic') 13 | plt.tight_layout() 14 | plt.show() 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/inversion/source_encoding/acoustic/source_encoding_fwi.sh: -------------------------------------------------------------------------------- 1 | python ../../../../codingfwi.py forward.yml \ 2 | --gpuid 0 \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --mode inversion \ 6 | --batchsize 10 \ 7 | --lr vp=10.0 \ 8 | --save-path ./results \ 9 | --checkpoint ./none \ 10 | --use-cuda \ 11 | --grad-cut 12 | # --grad-smooth 13 | -------------------------------------------------------------------------------- /examples/inversion/source_encoding/elastic/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/source_encoding/elastic/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/source_encoding/elastic/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:5 -------------------------------------------------------------------------------- /examples/inversion/source_encoding/elastic/source_encoding_fwi.sh: -------------------------------------------------------------------------------- 1 | python ../../../../codingfwi.py forward.yml \ 2 | --gpuid 0 \ 3 | --opt adam \ 4 | --loss vp=l2 vs=l2 \ 5 | --mode inversion \ 6 | --batchsize 20 \ 7 | --lr vp=10.0 vs=5.78 \ 8 | --save-path ./results \ 9 | --checkpoint ./none \ 10 | --use-cuda \ 11 | --grad-cut 12 | # --grad-smooth 13 | -------------------------------------------------------------------------------- /examples/inversion/source_encoding/towed/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results* 5 | rm -rf *.png *.gif 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/source_encoding/towed/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/source_encoding/towed/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:3 -------------------------------------------------------------------------------- /examples/inversion/source_encoding/towed/sefwi.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../../codingfwi.py forward.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=cs \ 6 | --mode inversion \ 7 | --batchsize 20 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_adam \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/source_encoding/towed/sefwi_full.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../../codingfwi.py full.yml \ 3 | --gpuid 0 \ 4 | --opt steepestdescent \ 5 | --loss vp=cs \ 6 | --mode inversion \ 7 | --batchsize 87 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_full \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/source_encoding/towed/towed.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --opt adam \ 7 | --loss vp=l2 \ 8 | --num-batches 2 \ 9 | --lr vp=10.0 \ 10 | --mode inversion \ 11 | --save-path ./results/towed \ 12 | --grad-cut \ 13 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/towed/towed_2d/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results 5 | rm -rf *.png *.gif *.hdf5 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/towed/towed_2d/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py forward.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/towed/towed_2d/geometry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/inversion/towed/towed_2d/geometry.gif -------------------------------------------------------------------------------- /examples/inversion/towed/towed_2d/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:5 -------------------------------------------------------------------------------- /examples/inversion/towed/towed_2d/inversion.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../../seistorch_dist.py forward.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/towed \ 8 | --grad-cut \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/towed/towed_3d/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model results 3 | rm -rf shot_gather.npy 4 | rm -rf *.png *.gif 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/towed/towed_3d/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py forward.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/towed/towed_3d/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/towed/towed_3d/inversion.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py forward.yml \ 3 | --opt adam \ 4 | --loss vp=l2 \ 5 | --num-batches 2 \ 6 | --lr vp=10.0 \ 7 | --mode inversion \ 8 | --save-path ./results/towed \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/variable_density/acoustic.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/variable_density/acoustic_fwim.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic_fwim.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/variable_density/acoustic_rho.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/acoustic_rho.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/variable_density/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf *.hdf5 4 | rm -rf AD ADa BS BSa 5 | rm -rf *.png *.gif 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/variable_density/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/inversion/variable_density/inversion_AD.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../seistorch_dist.py configs/inversion_rho_AD.yml \ 3 | --opt adam \ 4 | --loss vp=l2 rho=l2 \ 5 | --lr vp=0.00 rho=0.00 \ 6 | --mode inversion \ 7 | --save-path ./AD \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/variable_density/inversion_AD_a.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../seistorch_dist.py configs/inversion_rho_AD_a.yml \ 3 | --opt adam \ 4 | --loss vp=l2 rho=l2 \ 5 | --lr vp=0.00 rho=0.00 \ 6 | --mode inversion \ 7 | --save-path ./ADa \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/variable_density/inversion_BS.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../seistorch_dist.py configs/inversion_rho_BS.yml \ 3 | --opt adam \ 4 | --loss vp=l2 rho=l2 \ 5 | --lr vp=0.00 rho=0.00 \ 6 | --mode inversion \ 7 | --save-path ./BS \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/variable_density/inversion_BS_a.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../seistorch_dist.py configs/inversion_rho_BS_a.yml \ 3 | --opt adam \ 4 | --loss vp=l2 rho=l2 \ 5 | --lr vp=0.00 rho=0.00 \ 6 | --mode inversion \ 7 | --save-path ./BSa \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/variable_density/inversion_BS_l.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 \ 2 | ../../../seistorch_dist.py configs/inversion_rho.yml \ 3 | --opt adam \ 4 | --loss vp=l2 rho=l2 \ 5 | --lr vp=10.0 rho=2.0 \ 6 | --mode inversion \ 7 | --save-path ./BS \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/with_random_boundary/acoustic/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results* 5 | rm -rf *.png 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/inversion/with_random_boundary/acoustic/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../fwi.py forward.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/inversion/with_random_boundary/acoustic/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:5 -------------------------------------------------------------------------------- /examples/inversion/with_random_boundary/acoustic/source_encoding_fwi_pml.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../../codingfwi.py inversion_pml.yml \ 3 | --gpuid 1 \ 4 | --opt adam \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 1 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_pml \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/inversion/with_random_boundary/acoustic/source_encoding_fwi_random.sh: -------------------------------------------------------------------------------- 1 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 2 | python ../../../../codingfwi.py inversion_random.yml \ 3 | --gpuid 0 \ 4 | --opt adam \ 5 | --loss vp=l2 \ 6 | --mode inversion \ 7 | --batchsize 1 \ 8 | --lr vp=10.0 \ 9 | --save-path ./results_rand \ 10 | --checkpoint ./none \ 11 | --use-cuda \ 12 | --grad-cut 13 | # --grad-smooth 14 | -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | 4 | rm -rf *.png *.gif *.hdf5 5 | 6 | rm -rf with_multiples/*.npy 7 | rm -rf with_multiples/results 8 | 9 | rm -rf results* 10 | 11 | rm -rf velocity 12 | echo 'Done' -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/figures/inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/acoustic/figures/inverted.png -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/figures/model_geometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/acoustic/figures/model_geometry.png -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/figures/trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/acoustic/figures/trace.png -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/forward_born.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../seistorch/fwi.py configs/forward_born.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda 6 | -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/forward_direct.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../seistorch/fwi.py configs/forward_direct.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda 6 | -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/forward_obs.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../seistorch/fwi.py configs/forward_obs.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda 6 | -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:5 2 | -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/lsrtm_adam.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch/seistorch_dist.py configs/lsrtm.yml \ 2 | --opt adam \ 3 | --loss m=l2 \ 4 | --lr m=0.01 \ 5 | --mode inversion \ 6 | --save-path ./results_traditional_adam \ 7 | --use-cuda \ 8 | --grad-cut 9 | -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/lsrtm_cg.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch/seistorch_dist.py configs/lsrtm.yml \ 2 | --opt cg \ 3 | --loss m=l2 \ 4 | --lr m=0.01 \ 5 | --mode inversion \ 6 | --save-path ./results_traditional_cg \ 7 | --use-cuda \ 8 | --grad-cut 9 | -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/lsrtm_cg_born.sh: -------------------------------------------------------------------------------- 1 | torchrun --master-port 2048 --nproc_per_node=1 ../../../../seistorch/seistorch_dist.py configs/lsrtm_born.yml \ 2 | --opt cg \ 3 | --loss m=l2 \ 4 | --lr m=0.01 \ 5 | --mode inversion \ 6 | --save-path ./results_traditional_cg_born \ 7 | --use-cuda \ 8 | --grad-cut 9 | -------------------------------------------------------------------------------- /examples/lsrtm/acoustic/show_int.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | obs = np.load('results_traditional_cg/obs0.npy') 5 | syn = np.load('results_traditional_cg/syn0.npy') 6 | no = 5 7 | fig, axes = plt.subplots(1,2,figsize=(6,3)) 8 | vmin, vmax=np.percentile(obs[no], [2, 98]) 9 | kwargs = dict(vmin=vmin, vmax=vmax, cmap='gray', aspect='auto') 10 | axes[0].imshow(obs[no], **kwargs) 11 | axes[0].set_title('Observed') 12 | axes[1].imshow(syn[no], **kwargs) 13 | axes[1].set_title('Synthetic') 14 | plt.tight_layout() 15 | plt.show() 16 | 17 | -------------------------------------------------------------------------------- /examples/lsrtm/elastic/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | 4 | rm -rf *.png *.gif *.hdf5 5 | 6 | rm -rf with_multiples/*.npy 7 | rm -rf with_multiples/results 8 | 9 | rm -rf results* 10 | rm -rf velocity 11 | echo 'Done' -------------------------------------------------------------------------------- /examples/lsrtm/elastic/figures/ground_truth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/elastic/figures/ground_truth.png -------------------------------------------------------------------------------- /examples/lsrtm/elastic/figures/inverted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/elastic/figures/inverted.png -------------------------------------------------------------------------------- /examples/lsrtm/elastic/figures/trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/elastic/figures/trace.png -------------------------------------------------------------------------------- /examples/lsrtm/elastic/forward_born.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../seistorch/fwi.py configs/forward_born.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda 6 | -------------------------------------------------------------------------------- /examples/lsrtm/elastic/forward_obs.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../../seistorch/fwi.py configs/forward_obs.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda 6 | -------------------------------------------------------------------------------- /examples/lsrtm/elastic/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:5 2 | -------------------------------------------------------------------------------- /examples/lsrtm/elastic/lsrtm.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch/seistorch_dist.py configs/lsrtm.yml \ 2 | --opt adam \ 3 | --loss rvp=l2 rvs=l2 \ 4 | --lr rvp=0.01 rvs=0.01 \ 5 | --mode inversion \ 6 | --save-path ./results \ 7 | --use-cuda \ 8 | --grad-cut -------------------------------------------------------------------------------- /examples/lsrtm/elastic/lsrtm_born.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch/seistorch_dist.py configs/lsrtm_born.yml \ 2 | --opt cg \ 3 | --loss rvp=l2 rvs=l2 \ 4 | --lr rvp=0.01 rvs=0.01 \ 5 | --mode inversion \ 6 | --save-path ./results_born \ 7 | --use-cuda \ 8 | --grad-cut -------------------------------------------------------------------------------- /examples/lsrtm/qP/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf geometry models results 2 | rm -rf *.hdf5 -------------------------------------------------------------------------------- /examples/lsrtm/qP/figures/compare_vti_tti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/qP/figures/compare_vti_tti.png -------------------------------------------------------------------------------- /examples/lsrtm/qP/figures/compare_vti_tti_trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/qP/figures/compare_vti_tti_trace.png -------------------------------------------------------------------------------- /examples/lsrtm/qP/figures/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/qP/figures/model.png -------------------------------------------------------------------------------- /examples/lsrtm/qP/figures/smoothed_vp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/qP/figures/smoothed_vp.png -------------------------------------------------------------------------------- /examples/lsrtm/qP/figures/true_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/lsrtm/qP/figures/true_m.png -------------------------------------------------------------------------------- /examples/lsrtm/qP/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/lsrtm/qP/show_int.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | obs = np.load('results/tti_cg_bornobs/obs0.npy') 5 | syn = np.load('results/tti_cg_bornobs/syn0.npy') 6 | no = 5 7 | fig, axes = plt.subplots(1,2,figsize=(6,3)) 8 | vmin, vmax=np.percentile(obs[no], [2, 98]) 9 | kwargs = dict(vmin=vmin, vmax=vmax, cmap='gray', aspect='auto') 10 | axes[0].imshow(obs[no], **kwargs) 11 | axes[0].set_title('Observed') 12 | axes[1].imshow(syn[no], **kwargs) 13 | axes[1].set_title('Synthetic') 14 | plt.tight_layout() 15 | plt.show() 16 | 17 | -------------------------------------------------------------------------------- /examples/lsrtm/qP/tti_direct.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/tti_direct_wave.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/lsrtm/qP/tti_forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/tti.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/lsrtm/qP/tti_forward_born.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/tti_born.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/lsrtm/qP/tti_lsrtm.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch/seistorch_dist.py configs/tti_lsrtm.yml \ 2 | --opt cg \ 3 | --loss m=l2 \ 4 | --lr m=0.01 \ 5 | --mode inversion \ 6 | --save-path ./results/tti_cg_bornobs \ 7 | --use-cuda \ 8 | --grad-cut -------------------------------------------------------------------------------- /examples/lsrtm/qP/vti_direct.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vti_direct_wave.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/lsrtm/qP/vti_forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py configs/vti.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/lsrtm/qP/vti_lsrtm.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../../seistorch/seistorch_dist.py configs/vti_lsrtm.yml \ 2 | --opt cg \ 3 | --loss m=l2 \ 4 | --lr m=0.01 \ 5 | --mode inversion \ 6 | --save-path ./results/vti_cg_bornobs \ 7 | --use-cuda \ 8 | --grad-cut -------------------------------------------------------------------------------- /examples/models/bp2.5d1997/model.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/bp2.5d1997/model.npy -------------------------------------------------------------------------------- /examples/models/bp2.5d1997/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/bp2.5d1997/model.png -------------------------------------------------------------------------------- /examples/models/bp2.5d1997/vsmooth.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/bp2.5d1997/vsmooth.npy -------------------------------------------------------------------------------- /examples/models/bp2.5d1997/vsmooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/bp2.5d1997/vsmooth.png -------------------------------------------------------------------------------- /examples/models/marmousi_model/chunk/vp_chunk_0.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/chunk/vp_chunk_0.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/chunk/vp_chunk_1.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/chunk/vp_chunk_1.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/chunk/vp_chunk_2.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/chunk/vp_chunk_2.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/chunk/vp_chunk_3.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/chunk/vp_chunk_3.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/linear_vp.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/linear_vp.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/linear_vs.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/linear_vs.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/rho.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/rho.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/seabed.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/seabed.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/smooth_true_vp_for_rtm.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/smooth_true_vp_for_rtm.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/true_vp.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/true_vp.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model/true_vs.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model/true_vs.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model_half/linear_vp.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model_half/linear_vp.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model_half/linear_vs.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model_half/linear_vs.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model_half/rho.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model_half/rho.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model_half/seabed.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model_half/seabed.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model_half/smooth_true_vp_for_rtm.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model_half/smooth_true_vp_for_rtm.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model_half/true_vp.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model_half/true_vp.npy -------------------------------------------------------------------------------- /examples/models/marmousi_model_half/true_vs.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/models/marmousi_model_half/true_vs.npy -------------------------------------------------------------------------------- /examples/newversion/iso/acoustic_habc.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python /home/shaowinw/Desktop/wangsw/backup/seistorch/fwi.py configs/acoustic_habc.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/newversion/iso/acoustic_habc_multiple.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python /home/shaowinw/Desktop/wangsw/backup/seistorch/fwi.py configs/acoustic_habc_multiple.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/newversion/iso/acoustic_pml.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python /home/shaowinw/Desktop/wangsw/backup/seistorch/fwi.py configs/acoustic_pml.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/newversion/iso/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf *.npy 2 | rm -rf wf_pml 3 | rm -rf geometry 4 | rm -rf velocity_model 5 | rm -rf *.gif -------------------------------------------------------------------------------- /examples/newversion/iso/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/newversion/iso/show_coes.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | coes = np.load('habc.npy') 5 | 6 | plt.imshow(coes) 7 | plt.show() -------------------------------------------------------------------------------- /examples/newversion/iso/show_shotgather.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | 4 | """Load the shot gather""" 5 | cog_habc = np.load('shot_gather_habc.npy', allow_pickle=True)[0] 6 | cog_pml = np.load('shot_gather_pml.npy', allow_pickle=True)[0] 7 | 8 | 9 | """Show the shot gather""" 10 | fig, ax = plt.subplots(1, 2, figsize=(10, 5)) 11 | vmin, vmax = np.percentile(cog_habc, [1, 99]) 12 | ax[0].imshow(cog_habc, vmin=vmin, vmax=vmax, cmap="seismic", aspect='auto') 13 | ax[1].imshow(cog_pml, vmin=vmin, vmax=vmax, cmap="seismic", aspect='auto') 14 | ax[0].set_title('HABC') 15 | ax[1].set_title('PML') 16 | plt.show() 17 | -------------------------------------------------------------------------------- /examples/newversion/marmousi/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf observed.npy 4 | rm -rf results 5 | rm -rf *.png *.gif 6 | rm -rf *.hdf5 7 | echo 'Done' -------------------------------------------------------------------------------- /examples/newversion/marmousi/forward_habc.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python /home/shaowinw/seistorch/fwi.py config/habc.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/newversion/marmousi/forward_pml.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python /home/shaowinw/seistorch/fwi.py config/pml.yml \ 3 | --mode forward \ 4 | --num-batches 4 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/newversion/marmousi/habc_inv_habc.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 /home/shaowinw/seistorch/seistorch_dist.py config/inv_habc.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --lr vp=10.0 \ 5 | --mode inversion \ 6 | --save-path ./results/habc_inv_habc \ 7 | --grad-cut \ 8 | --filteratfirst \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/newversion/marmousi/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:5 -------------------------------------------------------------------------------- /examples/newversion/marmousi/pml_inv_habc.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=4 /home/shaowinw/seistorch/seistorch_dist.py config/inv_pml.yml \ 2 | --opt adam \ 3 | --loss vp=l2 \ 4 | --num-batches 4 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/pml_inv_habc \ 8 | --grad-cut \ 9 | --use-cuda -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/encoder_decoder_acoustic/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf figures models results 2 | rm -rf *.png 3 | rm -rf *.npy -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/encoder_decoder_elastic/README.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | Step 1. Generate the models 3 | ```bash 4 | python generate_model.py 5 | ``` 6 | Step 2. Simulate the observed data 7 | ```bash 8 | python forward.py 9 | ``` 10 | Step 3. Run inversion 11 | ```bash 12 | python ifwi.py 13 | ``` -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/encoder_decoder_elastic/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf figures models results 2 | rm -rf *.png 3 | rm -rf obs.npy -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/acoustic_epoch500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/acoustic_epoch500.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/acoustic_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/acoustic_model.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/elastic2_true.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/elastic2_true.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/elastic3_3networks_2000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/elastic3_3networks_2000.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/elastic3_true.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/elastic3_true.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/elastic_1net_epoch_4000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/elastic_1net_epoch_4000.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/elastic_2network_trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/elastic_2network_trace.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_acoustic_epoch1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_acoustic_epoch1.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_acoustic_epoch500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_acoustic_epoch500.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_acoustic_epoch500_cs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_acoustic_epoch500_cs.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_epoch_2000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_epoch_2000.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_loss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_loss.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_shot_latent_e000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_shot_latent_e000.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_shot_latent_e250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_shot_latent_e250.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_shot_latent_e500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/encoder_decoder_shot_latent_e500.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/epoch_2nets_2000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/epoch_2nets_2000.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/figures/shotgather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/figures/shotgather.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/implicit_acoustic/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf geometry models figures results 2 | rm -rf __pycache__ 3 | rm -rf *.npy *.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/implicit_acoustic_marmousi/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf geometry models results 2 | rm -rf __pycache__ 3 | rm -rf *.npy *.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/implicit_acoustic_marmousi/figures/0000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/implicit_acoustic_marmousi/figures/0000.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/implicit_acoustic_marmousi/figures/2000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/model_representation/implicit_acoustic_marmousi/figures/2000.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/implicit_elastic/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf figures models results 2 | rm -rf *.png 3 | rm -rf obs.npy -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/model_representation/implicit_elastic3/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf figures models results 2 | rm -rf *.png 3 | rm -rf obs.npy -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/siamesefwi/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf *.npy *.png -------------------------------------------------------------------------------- /examples/nn_embedded_fwi/siamesefwi/siamese.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/nn_embedded_fwi/siamesefwi/siamese.pth -------------------------------------------------------------------------------- /examples/pinn/README.md: -------------------------------------------------------------------------------- 1 | # How to run this example 2 | 3 | This is an example of showing how PINN (physical informed neural network) works. The PINN is a data-driven solutions of partial differential equations proposed by [Raissi et al., 2018](https://doi.org/10.1016/j.jcp.2018.10.045). 4 | 5 | 1. Run `generate_model_geometry.py` for generating the velocity model and geometry files. 6 | 2. In this step, the script `forward.py` will help you model snapshots of pressure wavefields. The data will be stored in a folder named `wavefields`. These wavefield are training data for PINN. 7 | 3. Run the cells in `pinn.ipynb` and enjoy your PINN trip. -------------------------------------------------------------------------------- /examples/pinn/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model wavefield 3 | rm -rf shot_gather.npy 4 | rm -rf *.png *.gif figures 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/pinn/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/root/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/root/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 1 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/pinn/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/pinn/wavefields.py: -------------------------------------------------------------------------------- 1 | import glob 2 | import numpy as np 3 | import matplotlib.pyplot as plt 4 | 5 | pmln = 50 6 | wf_files = sorted(glob.glob("./wavefield/*.npy")) 7 | 8 | for i, wf_file in enumerate(wf_files): 9 | wf = np.load(wf_file)[0][0] 10 | wf = wf[pmln:-pmln, pmln:-pmln] 11 | if i %100==0: 12 | plt.imshow(wf) 13 | plt.show() 14 | 15 | -------------------------------------------------------------------------------- /examples/random_boundaries/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry velocity_model 3 | rm -rf shot_gather.npy 4 | rm -rf *.png *.gif *.npy 5 | echo 'Done' -------------------------------------------------------------------------------- /examples/random_boundaries/forward_pml.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../fwi.py pml.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/random_boundaries/forward_rand.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../fwi.py rand.yml \ 3 | --mode forward \ 4 | --num-batches 1 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/random_boundaries/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/regularization/model_reg_fwi/reg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/regularization/model_reg_fwi/reg.png -------------------------------------------------------------------------------- /examples/regularization/model_reg_lsrtm/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf models -------------------------------------------------------------------------------- /examples/regularization/model_reg_lsrtm/configures.py: -------------------------------------------------------------------------------- 1 | # model path 2 | # true_path = r"../../models/marmousi_model/true_vp.npy" 3 | # smooth_path = r"../../models/marmousi_model/smooth_true_vp_for_rtm.npy" 4 | 5 | nz, nx = 128, 256 6 | 7 | seed = 20240901 8 | model_scale = 2 # 1/2 9 | expand = 50 10 | delay = 150 # ms 11 | fm = 20 # Hz 12 | dt = 0.001 # s 13 | nt = 1000 # timesteps 14 | dh = 5 # m 15 | bwidth = 50 16 | srcz = 5+bwidth # grid point 17 | recz = 5+bwidth # grid point 18 | srcx_step = 5 19 | batch_size = 8 20 | # Training 21 | lr = 0.01 22 | epochs = 51 23 | save_path = r'results/no_reg' 24 | -------------------------------------------------------------------------------- /examples/regularization/model_reg_lsrtm/true_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/regularization/model_reg_lsrtm/true_model.png -------------------------------------------------------------------------------- /examples/rtm/bp/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf *.npy 4 | rm -rf results 5 | rm -rf *.hdf5 6 | rm -rf *.png *.gif 7 | echo 'Done' 8 | -------------------------------------------------------------------------------- /examples/rtm/bp/forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py forward.yml \ 6 | --mode forward \ 7 | --num-batches 10 \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/rtm/bp/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/rtm/bp/rtm.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f hosts \ 5 | python ../../../../fwi.py rtm.yml \ 6 | --opt adam \ 7 | --loss vp=rtm \ 8 | --num-batches 30 \ 9 | --lr vp=10.0 \ 10 | --mode inversion \ 11 | --save-path ./results/rtm_true \ 12 | --use-cuda -------------------------------------------------------------------------------- /examples/rtm/marmousi/clean.sh: -------------------------------------------------------------------------------- 1 | echo 'Reset the folder' 2 | rm -rf geometry 3 | rm -rf *.npy 4 | rm -rf results 5 | rm -rf *.png *.gif *.hdf5 6 | echo 'Done' -------------------------------------------------------------------------------- /examples/rtm/marmousi/forward.sh: -------------------------------------------------------------------------------- 1 | mpirun -f hosts \ 2 | python ../../../fwi.py forward.yml \ 3 | --mode forward \ 4 | --num-batches 10 \ 5 | --use-cuda -------------------------------------------------------------------------------- /examples/rtm/marmousi/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /examples/rtm/marmousi/models/seabed.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/rtm/marmousi/models/seabed.npy -------------------------------------------------------------------------------- /examples/rtm/marmousi/models/smooth_true_vp_for_rtm.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/rtm/marmousi/models/smooth_true_vp_for_rtm.npy -------------------------------------------------------------------------------- /examples/rtm/marmousi/models/true_vp_for_rtm.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/rtm/marmousi/models/true_vp_for_rtm.npy -------------------------------------------------------------------------------- /examples/rtm/marmousi/rtm_initmodel.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../seistorch_dist.py rtm_initmodel.yml \ 2 | --opt adam \ 3 | --loss vp=rtm \ 4 | --num-batches 87 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/rtm_init \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/rtm/marmousi/rtm_truemodel.sh: -------------------------------------------------------------------------------- 1 | torchrun --nproc_per_node=1 ../../../seistorch_dist.py rtm_truemodel.yml \ 2 | --opt adam \ 3 | --loss vp=rtm \ 4 | --num-batches 5 \ 5 | --lr vp=10.0 \ 6 | --mode inversion \ 7 | --save-path ./results/rtm_true \ 8 | --use-cuda -------------------------------------------------------------------------------- /examples/rtm/marmousi/wavelet/ricker_for_forward.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/rtm/marmousi/wavelet/ricker_for_forward.npy -------------------------------------------------------------------------------- /examples/rtm/marmousi/wavelet/ricker_for_rtm.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeophyAI/seistorch/3aa7009821fd5aca5941ecc98b0fadf9b6523c4f/examples/rtm/marmousi/wavelet/ricker_for_rtm.npy -------------------------------------------------------------------------------- /examples/tools/smooth.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import matplotlib.pyplot as plt 3 | from scipy.ndimage import gaussian_filter 4 | 5 | true = np.load("../models/marmousi_model_half/true_vp.npy") 6 | 7 | for sigma in range(10): 8 | init = true.copy() 9 | 10 | gaussian_filter(init, sigma=sigma, output=init) 11 | 12 | fig, axes = plt.subplots(1, 1, figsize=(5, 3)) 13 | kwargs = dict(vmin=1500, vmax=5500, cmap="seismic", aspect="auto") 14 | axes.imshow(init, **kwargs) 15 | plt.tight_layout() 16 | plt.axis("off") 17 | plt.show() 18 | fig.savefig(f"sigma={sigma}.png", dpi=300) -------------------------------------------------------------------------------- /forward.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f mpiconfig_gpu \ 5 | python fwi.py /home/config/test.yml \ 6 | --mode forward \ 7 | --use-cuda 8 | # forward inversion -------------------------------------------------------------------------------- /mpiconfig_gpu: -------------------------------------------------------------------------------- 1 | 127.0.0.1:2 -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | tqdm 2 | obspy 3 | segyio 4 | prettytable 5 | joblib 6 | pyyaml 7 | geomloss 8 | pot 9 | h5py 10 | tensorboard 11 | setproctitle -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/mpich/bin:$PATH && \ 2 | export LD_LIBRARY_PATH=/usr/local/mpich/lib:$LD_LIBRARY_PATH && \ 3 | export LD_LIBRARY_PATH=/home/wangsw/anaconda3/lib:$LD_LIBRARY_PATH && \ 4 | mpirun -f mpiconfig_gpu \ 5 | python fwi.py /public1/home/wangsw/FWI/NO_LOWFREQ/config/02b_acoustic_invert.yml \ 6 | --opt adam \ 7 | --loss vp=fatt_customer \ 8 | --lr vp=10.0 \ 9 | --mode inversion \ 10 | --save-path /public1/home/wangsw/FWI/NO_LOWFREQ/fatt \ 11 | --use-cuda \ 12 | --grad-cut -------------------------------------------------------------------------------- /seistorch/__init__.py: -------------------------------------------------------------------------------- 1 | from . import geom, source, probe, utils, model, loss, optimizer, setup, distributed 2 | from .default import ConfigureCheck 3 | from .cell import WaveCell 4 | from .geom import WaveGeometryFreeForm 5 | from .probe import WaveProbe, WaveIntensityProbe 6 | from .source import WaveSource 7 | from .rnn import WaveRNN 8 | from .model import build_model 9 | 10 | __all__ = ["WaveCell", "WaveGeometryHoley", "WaveGeometryFreeForm", "WaveProbe", "WaveIntensityProbe", "WaveRNN", 11 | "WaveSource", "WaveLineSource"] 12 | 13 | __version__ = "0.2.1" 14 | -------------------------------------------------------------------------------- /seistorch/dimension.py: -------------------------------------------------------------------------------- 1 | 2 | class DimensionChoose: 3 | """DimensionChoose class is used to choose the dimension 4 | of the sovler and corresponding class.""" 5 | 6 | def __init__(self, **kwargs): 7 | pass 8 | 9 | def decide(self,): 10 | pass 11 | 12 | def decide_wavesource(self,): 13 | pass 14 | --------------------------------------------------------------------------------