Skip to main content

yspec-seismo

Synthetic seismograms, snapshots of the wavefield and adjoint sensitivity kernels for spherically symmetric earth models, from Python. It is the Python package of YSpec, which integrates the equations of motion of a self-gravitating, anelastic, transversely isotropic earth directly in radius, in the frequency domain, for every degree and frequency, and sums the responses: complete seismograms, with every body wave, surface wave and normal mode the band holds.

pip install yspec-seismo            # the library and the programs
pip install "yspec-seismo[plot]"    # and yspec-plot, to draw what they write

It is imported as yspec:

import numpy as np
import yspec

model = yspec.Model.prem()
source = yspec.Source(latitude=36.87, longitude=35.58, depth_km=29.5,
                      moment_tensor=dict(rr=4.22e17, rt=3.08e17, rp=6.99e17,
                                         tt=-2.976e18, tp=6.54e17, pp=2.55e18))
receivers = yspec.great_circle(source, azimuth_deg=60,
                               distances_deg=np.arange(5, 180, 5))
calculation = yspec.Calculation(degrees=300, frequencies_mhz=(0.2, 15),
                                length_min=60, filter_mhz=(1, 2, 12, 15),
                                quantity="velocity")

seismograms = yspec.seismograms(model, calculation, source, receivers,
                                progress=True)
seismograms.time_s           # the time of each sample (s)
seismograms.data             # [source, receiver, component, sample]: Z, N, E
seismograms.rotated()        # the same with Z, R and T
seismograms.to_obspy()       # an ObsPy Stream (with ObsPy installed)

Lengths are in km, angles in degrees, frequencies in mHz and times in s, as in the programs' input files; the results are numpy arrays in SI units.

  • yspec.seismograms and yspec.strains: at receivers anywhere but the centre, in the ocean, the crust or the core, from moment tensors and forces, through seismometers given by their poles and zeros.
  • yspec.snapshots: the wavefield at chosen times on a grid of depths, distances and azimuths around each source: cross-sections through the earth, or maps.
  • yspec.traveltimes, yspec.radial_kernels and yspec.sampled_kernels: cross-correlation traveltimes and their sensitivity kernels by the adjoint method, to spherically symmetric perturbations of density, the elastic parameters and the quality factors, and to laterally varying ones of the elastic parameters and quality factors, through the earth, on sections about the path or on maps.
  • The programs yspec, yspec-snapshot and yspec-kernels, which read JSON input files and write their results as text, and yspec-plot, which draws them (with the plot extra).

The calculations run on as many threads as OpenMP gives them (OMP_NUM_THREADS, or yspec.set_threads), except on macOS, where the wheels have one. Ctrl-C stops a calculation.

References

  • Al-Attar, D. & Woodhouse, J. H., 2008. Calculation of seismic displacement fields in self-gravitating earth models -- applications of minors vectors and symplectic structure. Geophys. J. Int., 175, 1176-1208.
  • Friederich, W. & Dalkolmo, J., 1995. Complete synthetic seismograms for a spherically symmetric earth by a numerical computation of the Green's function in the frequency domain. Geophys. J. Int., 122, 537-550.

BSD 3-Clause licence.

Metadata

Release files for yspec-seismo 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yspec-seismo 0.1.0
File Size Uploaded Provenance Actions
yspec_seismo-0.1.0.tar.gz 648.4 kB With provenance Details for yspec_seismo-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for yspec-seismo 0.1.0
File Interpreter ABI Platform Actions
yspec_seismo-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for yspec_seismo-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
yspec_seismo-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for yspec_seismo-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
yspec_seismo-0.1.0-cp312-abi3-macosx_14_0_arm64.whl CPython 3.12 abi3 macOS 14.0+ ARM64 Details for yspec_seismo-0.1.0-cp312-abi3-macosx_14_0_arm64.whl

Total release size: 4.9 MB

Release files / yspec_seismo-0.1.0.tar.gz

Download URL yspec_seismo-0.1.0.tar.gz
Size 648.4 kB
Tags Source
SHA-256 checksum
How to use checksums
efab58a15e8c705ca9ed7b1d211330b1dc9c380c0873894f1f3ea5eac802b8ce
BLAKE2b-256 checksum
How to use checksums
a0a9043792c3f82c7a8c175bd5ee977941804ba5cb10faf32993ea6f67a47f86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / yspec_seismo-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL yspec_seismo-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.2 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
82ae0797db0ab09f09aee92e0945c9ef99d78c71ef64fe3d036e137b8e5b78a1
BLAKE2b-256 checksum
How to use checksums
ef7dae46bb3106cbdcf744204f9eaac863abf67258eba149b97918fc7e9f8e78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / yspec_seismo-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL yspec_seismo-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.1 MB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
88c43baa363e53c56ba06ed672ea8961f3f88b9167416fff41e2e6a62889e5d9
BLAKE2b-256 checksum
How to use checksums
5f442afaa7a662ec2abf079a5f489e1f6178de5685fc2a717b4db4ba1c56b9c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / yspec_seismo-0.1.0-cp312-abi3-macosx_14_0_arm64.whl

Download URL yspec_seismo-0.1.0-cp312-abi3-macosx_14_0_arm64.whl
Size 2.0 MB
Tags CPython 3.12 abi3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
98f9dd81054d477576c480cac64e39ddc5ca2507d59136756410f4e5de1afb25
BLAKE2b-256 checksum
How to use checksums
51dfe438ce08529e09bd672f6f399e8ce2a77bb1f1e2f106c2fbd09c46444558
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for yspec-seismo 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for yspec_seismo-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

4 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page