Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

SPARspec — early source-spectrum component

SPAR is developed by Mariano Supino to estimate earthquake source parameters from seismic amplitude spectra. SPARspec is an early distribution of a small component of this project: its generalized Brune source-spectrum calculation. The full SPAR inversion software is still in development and is not included in this distribution.

This alpha provides the same source-spectrum calculation as the initial spar4das alpha, under the sparspec Python namespace. The model is relevant to the moment-equivalent spectra used for both conventional instruments and distributed acoustic sensing (DAS).

Install and use

python -m pip install --pre sparspec
import numpy as np
from sparspec import log_moment_spectrum

frequencies_hz = np.array([0.0, 1.0, 4.0, 10.0])
log_amplitude = log_moment_spectrum(
    frequencies_hz, log_m0=12.7, fc_hz=4.0, gamma=2.0, t_star_s=0.02
)
amplitude_nm = 10.0 ** log_amplitude

The model returns

log10 A(f) = log10 M0 - log10[1 + (f/fc)^gamma] - pi*f*t_star*log10(e)

Here M0 is seismic moment in N m, fc is corner frequency in Hz, gamma is the high-frequency decay exponent, and t_star is effective attenuation time in seconds. For fixed Q it may be specified as travel time divided by Q, plus any separately justified kappa term. All parameters except frequency are scalars. Frequencies must be finite and nonnegative; corner frequency and gamma must be positive; attenuation time must be nonnegative.

This is a moment-equivalent spectral model. It does not read waveform files, convert raw instrument or DAS measurements to moment, or estimate parameters. The alpha API may change as the complete SPAR package is developed.

License

GNU General Public License version 3 only; see LICENSE.

Metadata

Release files for sparspec 0.0.1a1

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

Source distribution (sdist)

Source distribution for sparspec 0.0.1a1
File Size Uploaded Provenance Actions
sparspec-0.0.1a1.tar.gz 14.8 kB Without provenance Details for sparspec-0.0.1a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sparspec 0.0.1a1
File Interpreter ABI Platform Actions
sparspec-0.0.1a1-py3-none-any.whl Python 3 none any Details for sparspec-0.0.1a1-py3-none-any.whl

Total release size: 30.0 kB

Release files / sparspec-0.0.1a1.tar.gz

Download URL sparspec-0.0.1a1.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
01bf69aee35145bb521b77cb8083196ac084f501cab9beb1e56f99c5765f8b2b
BLAKE2b-256 checksum
How to use checksums
f0ba383e720c819ca049082cc7905f051df81cd9a8c1cd883d7c98425ab928ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / sparspec-0.0.1a1-py3-none-any.whl

Download URL sparspec-0.0.1a1-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c31a734e2851a3d8947074330373443a3e93d94f9c0c04fe4814ce5e223af36
BLAKE2b-256 checksum
How to use checksums
e0e68f7053202777aae2fb424e8253e2c4b61511060c74c4b0040892fedaf9d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Security for sparspec 0.0.1a1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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
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