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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a25ed4e27716091080f896eae6b61b2c20c3e42833fda716056321cb7b0daa2
|
|
| MD5 |
90cbd8c3bd7675a208f260295e78fbc7
|
|
| BLAKE2b-256 |
d9dcda3a18a41af2297bd03ccb8168b8e4e0b973fffa785ccdef718f280cddf0
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35f87e7a577b45fe7c9a4c0209b868264217cdb6630eef136b88e572b6678254
|
|
| MD5 |
8636e7c6572d7a7a5d2d3ef11aac9650
|
|
| BLAKE2b-256 |
9271fff73cdb511859f66817d372487aa507a760eba608fe021906dcd0e8d654
|