Skip to main content

seismic wave modelling

Project description

SWavePy - Seismic Wave Propagation Simulation

Usage

Installing with pip

pip install swavepy

Original tutorial taken from Nienke Blom, see this link. Updated by Deborah Wehner for use in Cambridge practicals, and updated again here to ensure animated plots work properly, and compiled into a pip-installable module.

Changes made:

  • Plotting code rewritten - ensuring that animated plots work properly in updated binder environments
  • Small changes to instructions to reflect this
  • Branch version which turns the repo into a pip package, for use on colab

Basic seismic wave propagation code for teaching purposes (python based). With this code, you can:

  • run elastic seismic wavefield simulations
  • select data windows
  • compute sensitivity kernels

Visualisation functionality

At each stage, visualisation functionality is included.

Visualising seismograms

If (after a forward simulation) a seismogram has been attached to a receiver, this can be visualised with:

rec.plot_seismogram()

Visualising window picks

Equally, window picks (and the resulting adjoint sources) can be visualised with

pick = {}
pick['component'] = ['x']   # 'x' or 'z'
pick['times'] = [3.5, 7.5]  # seconds
print('window goes from {} to {} s'.format(pick['times'][0], pick['times'][1]))

receivers_Pwave = waveprop.make_adjoint_source(receivers, pick, plot=3)

Visualising sensitivity kernels

Once sensitivity kernels have been computed, these can be visualised in different parametrisations and as absolute, or relative to a background model. For simple direct waves, it can be instructive to compare the sensitivity kernel to the Fresnel zone. This Fresnel zone can be visualised by setting plot_Fresnel_zone to True.

kernels..plot_kernels(
    parametrisation='rhovsvp' # could be 'rhomulambda'
    mode='relative',          # could be 'absolute'
    model=model,              # necessary for all kernels other than absolute rhomulambda
    source=src, receiver=receivers[0], 
    plot_Fresnel_zone=True,
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swavepy-0.0.2.tar.gz (53.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swavepy-0.0.2-py3-none-any.whl (43.3 kB view details)

Uploaded Python 3

File details

Details for the file swavepy-0.0.2.tar.gz.

File metadata

  • Download URL: swavepy-0.0.2.tar.gz
  • Upload date:
  • Size: 53.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for swavepy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1a25ed4e27716091080f896eae6b61b2c20c3e42833fda716056321cb7b0daa2
MD5 90cbd8c3bd7675a208f260295e78fbc7
BLAKE2b-256 d9dcda3a18a41af2297bd03ccb8168b8e4e0b973fffa785ccdef718f280cddf0

See more details on using hashes here.

File details

Details for the file swavepy-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: swavepy-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 43.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for swavepy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35f87e7a577b45fe7c9a4c0209b868264217cdb6630eef136b88e572b6678254
MD5 8636e7c6572d7a7a5d2d3ef11aac9650
BLAKE2b-256 9271fff73cdb511859f66817d372487aa507a760eba608fe021906dcd0e8d654

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page