0% found this document useful (0 votes)
69 views25 pages

Sourcespec Readthedocs Io en Latest

Tutorial How to Run SourceSpec

Uploaded by

Ade Surya Putra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views25 pages

Sourcespec Readthedocs Io en Latest

Tutorial How to Run SourceSpec

Uploaded by

Ade Surya Putra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

SourceSpec Documentation

Release 1.5+32.g5864e1a.dirty

Claudio Satriano

Jun 01, 2022


Contents

1 SourceSpec 3
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Spectral model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Configuration File 5

3 SourceSpec API 13
3.1 ssp_setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 ssp_read_traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 ssp_process_traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 ssp_build_spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 ssp_plot_traces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.6 ssp_local_magnitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.7 ssp_inversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.8 ssp_spectral_model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.9 ssp_residuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.10 ssp_correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.11 ssp_output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.12 ssp_plot_spectra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.13 ssp_util . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.14 spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.15 config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4 Indices and tables 17

Python Module Index 19

Index 21

i
ii
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

SourceSpec is a collection of command line programs (written in Python) to determine earthquake source parameters
(seismic moment 𝑀0 , corner frequency 𝑓𝑐 ) and the inelastic attenuation term (𝑡* ), from the modeling of waveform
spectra.
Other parameters (source radius 𝑟0 , stress drop ∆𝜎) are computed from the inverted ones. The quality factor 𝑄 is
determined from 𝑡* .
As a bonus, local magnitude 𝑀𝑙 is computed as well.
SourceSpec is composed of the following programs:
• source_spec: inverts the S-wave displacement spectra from station recordings of a single event.
• ssp_residuals: computes station residuals from source_spec output.
• source_model: direct spectral modelling.
Contents:

Contents 1
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

2 Contents
CHAPTER 1

SourceSpec

Earthquake source parameters from inversion of S-wave spectra.


copyright 2011-2022 Claudio Satriano <satriano@ipgp.fr>
license CeCILL Free Software License Agreement, Version 2.1 (http://www.cecill.info/index.en.html)

1.1 Overview

source_spec inverts the S-wave displacement spectra from station recordings of a single event.

1.2 Spectral model

The Fourier spectrum of the S-wave displacement in far field can be modelled as the product of a source term (Brune
model) and a propagation term (geometric and anelastic attenuation of body waves):
(︂ )︂
1 2𝑅ΘΦ 1 −𝜋𝑟𝑓
𝑆(𝑓 ) = × 1/2 1/2 5/2 1/2
× 𝑀𝑂 × (︁ )︁2 × exp
𝑟 4𝜋𝜌ℎ 𝜌𝑟 𝛽ℎ 𝛽𝑟 𝑄𝑂 𝑉𝑆
1 + 𝑓𝑓𝑐

where 𝑟 is the hypocentral distance; 𝑅ΘΦ is the radiation pattern coefficient for S-waves; 𝜌ℎ and 𝜌𝑟 are the medium
densities at the hypocenter and at the receiver, respectively; 𝛽ℎ and 𝛽𝑟 are the S-wave velocities at the hypocenter
and at the receiver, respectively; 𝑀𝑂 is the seismic moment; 𝑓 is the frequency; 𝑓𝑐 is the corner frequency; 𝑉𝑆 is the
average S-wave velocity along the wave propagation path; 𝑄𝑂 is the quality factor.
In source_spec, the observed spectra 𝑆(𝑓 ) are converted in moment magnitude 𝑀𝑤 .
The first step is to multiply the spectrum for the hypocentral distance and convert them to seismic moment units:
1/2 1/2 5/2 1/2 (︂ )︂
4𝜋𝜌ℎ 𝜌𝑟 𝛽ℎ 𝛽𝑟 1 −𝜋𝑟𝑓
𝑀 (𝑓 ) ≡ 𝑟 × × 𝑆(𝑓 ) = 𝑀𝑂 × (︁ )︁2 × exp
2𝑅ΘΦ 𝑓 𝑄𝑂 𝑉𝑆
1+ 𝑓𝑐

3
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

Then the spectrum is converted in unities of magnitude (the 𝑌𝑑𝑎𝑡𝑎 (𝑓 ) vector used in the inversion):
2
𝑌𝑑𝑎𝑡𝑎 (𝑓 ) ≡ × (log10 𝑀 (𝑓 ) − 9.1)
3
The data vector is compared to the teoretical model:
⎡ ⎛ ⎞ ⎤
(︂ )︂
2⎢ 1 −𝜋𝑟𝑓 ⎟
𝑌𝑑𝑎𝑡𝑎 (𝑓 ) = ⎣log10 ⎝𝑀𝑂 × (︁ )︁2 × exp ⎠ − 9.1⎦ =
⎜ ⎥
3 𝑓 𝑄𝑂 𝑉𝑆
1+ 𝑓𝑐
⎡ ⎛ ⎞ ⎤
(︂ (︂ )︂)︂
2 2⎢ 1 −𝜋𝑟𝑓
= (log10 𝑀0 − 9.1) + ⎣log10 ⎝ (︁ )︁2 ⎠ + log10 exp
⎜ ⎟ ⎥
3 3 𝑄𝑂 𝑉𝑆

𝑓
1+ 𝑓𝑐

Finally coming to the following model used for the inversion:


[︃ (︃ (︂ )︂2 )︃ ]︃
2 𝑓 *
𝑌𝑑𝑎𝑡𝑎 (𝑓 ) = 𝑀𝑤 + − log10 1 + − 𝜋 𝑓 𝑡 log10 𝑒
3 𝑓𝑐

Where 𝑀𝑤 ≡ 32 (log10 𝑀0 − 9.1) and 𝑡* ≡ 𝑟


𝑄𝑂 𝑉𝑆 .

The parameters to determine are 𝑀𝑤 , 𝑓𝑐 and 𝑡* .

4 Chapter 1. SourceSpec
CHAPTER 2

Configuration File

Configuration file (default name: source_spec.conf) is a plain text file with keys and values in the form key =
value. Comment lines start with #.
Some fields are comma-separated lists: even if only one element is specified, a comma is always required (e.g.,
ignore_stations = STA01,).
Here is the default config file, generated through source_spec -S:
# Config file for source_spec

# GENERAL PARAMETERS --------


# Print debug information
DEBUG = False

# Show interactive plots (slower)


PLOT_SHOW = False
# Save plots to disk
PLOT_SAVE = True
# Plot file format: 'png', 'pdf' or 'pdf_multipage'
PLOT_SAVE_FORMAT = png

# Channel naming for mis-oriented channels (vertical, horiz1, horiz2):


# Example:
# mis_oriented_channels = Z,1,2
mis_oriented_channels = None

# Option to specify non standard instrument codes (e.g., "L" for accelerometer)
instrument_code_acceleration = None
instrument_code_velocity = None

# For more complex network.station.location.channel (SCNL) naming scenarios,


# you can provide a file, in json format, with traceid (SCNL) mapping
traceid_mapping_file = None

# List of traceids to ignore.


(continues on next page)

5
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

(continued from previous page)


# Use network.station.location.channel; wildcards are accepted
# Example:
# ignore_traceids = FR.CIEL.*.*, AM.RA0D3.00.*
ignore_traceids = None

# List of traceids to use.


# Use network.station.location.channel; wildcards are accepted
# Example:
# use_traceids = FR.CIEL.*.*, AM.RA0D3.00.*
use_traceids = None

# Maximum epicentral distance (km) to process a trace


max_epi_dist = None

# Optionally, it is possible to read event information and traces


# from a pickle file.
# When using a pickle catalog, you must use the "--evid" command line
# option to select an event from the catalog and you can use the "--station"
# option to select a station.
pickle_catalog = None
# If you have custom classes in your pickle catalog which are not in your
# system path, specify here the path to python files containing
# class definitions.
pickle_classpath = None

# Directory or file for station metadata.


# It can be one ore more files in one of the following formats:
# StationXML, dataless SEED, SEED RESP
# Note that SEED RESP does not contain station coordinates, which should
# therefore be in the trace header (traces in SAC format)
station_metadata = None

# Alternatively, a directory with PAZ files can be specified:


# Note that PAZ files do not contain station coordinates, which should
# therefore be in the trace header (traces in SAC format)
paz = None

# It is also possible to provide a constant sensitivity (i.e., flat sensor


# response curve) as a numerical value or a combination of SAC header fields
# (in this case, traces must be in SAC format).
# This parameter overrides the response curve computed from metadata or from
# PAZ files. Leave it to None to compute sensor response from metadata or PAZ.
# Examples:
# sensitivity = 1
# sensitivity = 1e3
# sensitivity = resp0
# sensitivity = resp1*resp2
# sensitivity = user3/user2
sensitivity = None

# Database file for storing output parameters (optional):


database_file = None

# Correct_instrumental_reponse (optional, default=True):


# 'True', 'False' or 'sensitivity only'
# If 'sensitivity only', traces are not fully deconvolved
# for the instrumental response: only the
(continues on next page)

6 Chapter 2. Configuration File


SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

(continued from previous page)


# sensitivity is corrected (faster, especially
# on a large number of traces).
correct_instrumental_response = True

# Trace units.
# Leave it to 'auto' to let the code decide, based on instrument type.
# Manually set it to 'disp', 'vel' or 'acc' if you have already preprocessed
# the traces.
trace_units = auto
# -------- GENERAL PARAMETERS

# TIME WINDOW PARAMETERS --------


# P and S wave velocity (in km/s) for travel time calculation
# (if None, the global velocity model 'iasp91' is used)
vp_tt = None
vs_tt = None
# As an alternative, a directory containing NonLinLoc travel time grids
# can be specified.
# Note that reading NonLinLoc grids takes time. For simple 1D models, you
# can speed up considerably the process using a generic station
# named "DEFAULT". The coordinates of this default station are not important,
# since they will be superseded by each station's coordinates.
NLL_time_dir = None

# Arrival tolerances (in seconds) to accept a manual P or S pick


p_arrival_tolerance = 4.0
s_arrival_tolerance = 4.0

# Start time (in seconds) of the noise window, respect to the P arrival time
pre_p_time = 6.0

# Start time (in seconds) of the S-wave window, respect to the S arrival time
pre_s_time = 1.0

# Length (in seconds) for both noise and S-wave windows


win_length = 5.0
# -------- TIME WINDOWS PARAMTERS

# SPECTRUM PARAMETERS --------


# Wave type to analyse: 'S', 'SH' or 'SV'
# If 'SH' or 'SV' are selected, traces are rotated in the radial-transverse
# system. Transverse component is used for 'SH', radial (and vertical)
# components are used for 'SV'
wave_type = S

# Integrate in time domain (default: integration in spectral domain)


time_domain_int = False

# Ignore vertical components


ignore_vertical = False

# Taper half width: between 0 (no taper) and 0.5


taper_halfwidth = 0.05

# Spectral window length (seconds)


(continues on next page)

7
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

(continued from previous page)


# Signal is tapered, and then zero padded to
# this window length, so that the spectral
# sampling is fixed to 1/spectral_win_length.
# Comment out (or set to None) to use
# S-wave window as spectral window length.
spectral_win_length = None

# Spectral smoothing window width in frequency decades


# (i.e., log10 frequency scale).
# Example:
# spectral_smooth_width_decades=1 means a width of 1 decade
# (generally, too large, producing a spectrum which is too smooth).
# spectrum(f0) is smoothed using values between f1 and f2, so that
# log10(f1)=log10(f0)-0.5 and log10(f2)=log10(f0)+0.5
# i.e.,
# f1=f0/(10^0.5) and f2=f0*(10^0.5)
# or,
# f2/f1=10 (1 decade width)
# Default value of 0.2 is generally a good choice
spectral_smooth_width_decades = 0.2

# Residuals file path


# (a pickle file with the mean residuals per station,
# used for station correction):
residuals_filepath = None

# Band-pass frequencies for accelerometers and velocimeters (Hz).


# Use bp_freqmin_STATION and bp_freqmax_STATION to provide
# filter frequencies for a specific STATION code.
# TODO: calculate from sampling rate?
bp_freqmin_acc = 1.0
bp_freqmax_acc = 50.0
bp_freqmin_shortp = 1.0
bp_freqmax_shortp = 40.0
bp_freqmin_broadb = 0.5
bp_freqmax_broadb = 40.0

# Spectral windowing frequencies for accelerometers and velocimeters (Hz)


# (spectra will be cut between these two frequencies)
# Use freq1_STATION and freq2_STATION to provide
# windowing frequencies for a specific STATION code.
freq1_acc = 1.0
freq2_acc = 30.0
freq1_shortp = 1.0
freq2_shortp = 30.0
freq1_broadb = 0.5
freq2_broadb = 30.0
# -------- SPECTRUM PARAMETERS

# SIGNAL/NOISE PARAMETERS --------


# Minimum rms (in trace units before instrument corrections)
# to consider a trace as noise
rmsmin = 0.

# Time domain S/N ratio min


sn_min = 0
(continues on next page)

8 Chapter 2. Configuration File


SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

(continued from previous page)

# Maximum accepted percentage of clipped data respect to the total trace lenght
clip_max_percent = 5.0

# Maximum gap length for the whole trace, in seconds


gap_max = None
# Maximum overlap length for the whole trace, in seconds
overlap_max = None

# Sspectral S/N ratio min, below which a spectrum will be skipped


spectral_sn_min = 0
# Frequency range (Hz) to compute the spectral S/N ratio
# (comment out or use None to indicate the whole frequency range)
spectral_sn_freq_range = None
# -------- SIGNAL/NOISE PARAMETERS

# INVERSION PARAMETERS --------


# P and S wave velocity close to the source (km/s)
vp = 5.5
vs = 3.2
# As an alternative, a directory containing a NonLinLoc model can be specified
NLL_model_dir = None
# Density (kg/m3):
rho = 2500
# S-wave average radiation pattern coefficient:
rps = 0.62
# Radiation pattern from focal mechanism, if available
rps_from_focal_mechanism = False

# Weighting type: 'noise' or 'frequency'


weighting = noise
# Parameters for 'frequency' weighting (ignored for 'noise' weighting):
# weight for f<=f_weight (Hz)
# 1 for f> f_weight (Hz)
f_weight = 7.
weight = 10.

# Initial value for t_star (seconds)


t_star_0 = 0.045
# Try to invert for t_star_0.
# If the inverted t_star_0 is non-positive, then fixed t_star_0 will be used
invert_t_star_0 = False
# Allowed variability around inverted t_star_0 in the main inversion
# (expressed as a fraction of t_star_0, between 0 and 1).
# If the inverted t_star_0 is non-positive, then t_star_min_max is used
# (see below).
t_star_0_variability = 0.1
# Allowed variability around Mw_0 during the main inversion,
# in units of magnitude. Mw bounds will be:
# Mw_0 - Mw_0_variability, Mw_0 + Mw_0_variability
Mw_0_variability = 0.1
# Inversion algorithm:
# TNC: truncated Newton algorithm (with bounds)
# LM: Levenberg-Marquardt algorithm
# (warning: Trust Region Reflective algorithm will be used instead if
# bounds are provided)
(continues on next page)

9
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

(continued from previous page)


# BH: basin-hopping algorithm
# GS: grid search
# IS: importance sampling of misfit grid, using k-d tree
inv_algorithm = TNC
# Parameter bounds:
# specify bounds as a list, ex.:
# fc_min_max = 0.1, 40
# (comment out or use None to indicate no bound)
# If not specified, fc bounds will be autoset
fc_min_max = None
# t_star_min_max does not superseed t_star_0_variability
t_star_min_max = None
# optional : Qo bounds (converted into t_star bounds in the code).
# (comment out or use None to indicate no bound)
# Note: if you want to explore negative t_star values, you have to specify
# -Qo_min, Qo_min. This beacause t_star is proportional to 1/Qo.
# Example, for searching only positive t_star values:
# Qo_min_max = 10, 1000
# If you want to search also negative t_star values:
# Qo_min_max = -10, 10
Qo_min_max = None
# -------- INVERSION PARAMETERS

# POST-INVERSION PARAMETERS --------


# Post-inversion bounds: use this bounds to reject certain inversion
# results, per station.
# Sometimes it is better to be more permissive with inversion parameters and
# reject "bad" solutions after the inversion, rather than forcing the
# inversion to converge within strict bounds.
# fc bounds, in Hz
pi_fc_min_max = None
# t_star bounds, in s
pi_t_star_min_max = None
# Brune stress drop bounds, in MPa
pi_bsd_min_max = None
# Maximum acceptable misfit between inverted and observed spectrum
pi_misfit_max = None
# -------- POST-INVERSION PARAMETERS

# RADIATED-ENERGY PARAMETERS --------


# Maximum frequency (Hz) to measure radiated energy Er
# (above this frequency, the finite-band correction
# of Di Bona & Rovelli, 1988, will be applied)
max_freq_Er = None
# -------- RADIATED-ENERGY PARAMETERS

# LOCAL MAGNITUDE PARAMETERS --------


compute_local_magnitude = False
# Local magnitude parameters:
# ml = log10(A) + a * log10(R/100) + b * (R-100) + c
# where A is the maximum W-A amplitude (in mm)
# and R is the hypocentral distance (in km)
# Default values (for California) are:
# a = 1., b = 0.00301, c = 3.
a = 1.
(continues on next page)

10 Chapter 2. Configuration File


SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

(continued from previous page)


b = 0.00301
c = 3.
# Band-pass filtering frequencies (Hz) for local magnitude
ml_bp_freqmin = 0.1
ml_bp_freqmax = 20.0
# -------- LOCAL MAGNITUDE PARAMETERS

# AVERAGES PARAMETERS --------


# Reject outliers before averaging, using the IQR method.
# IQR is the interquartile range Q3-Q1, where Q1 is the 25% percentile
# and Q3 is the 75% percentile.
# Values that are smaller than (Q1 - nIQR*IQR) or larger than (Q3 + nIQR*IQR)
# will be rejected as outliers.
# Set nIQR to None to disable outlier rejection.
# Note: this parameter also controls the position of "whiskers" on the source
# parameter box plots.
nIQR = 1.5
# -------- AVERAGES PARAMETERS

# PLOT PARAMETERS --------


# Plots an extra synthetic spectrum with no attenuation
plot_spectra_no_attenuation = False
# Plots an extra synthetic spectrum with no fc
plot_spectra_no_fc = False
# Max number of rows in plots
plot_spectra_maxrows = 3
plot_traces_maxrows = 3
# Plot ignored traces (low S/N)
plot_traces_ignored = True
# Plot ignored spectra (low S/N)
plot_spectra_ignored = True
# Plot station map
plot_station_map = False
# Plot station names on map
plot_station_names_on_map = False
# Text size for station names
plot_station_text_size = 8
# Coastline resolution
# Use None to let the code autoset the coastline resolution.
# Otherwhise choose one of: 'full', 'high', 'intermediate', 'low' or 'crude'
plot_coastline_resolution = None
# Zoom level for map tiles
# Use None to let the code autoset the zoom level
# Otherwhise choose an integer beteen 1 (minimum zoom) and 18 (maximum zoom)
# Note: for zoom levels larger than 11, some map tiles could be missing
plot_map_tiles_zoom_level = None
# -------- PLOT PARAMETERS

# HTML REPORT --------


# Generate an HTML page summarizing the results of this run
html_report = False
# -------- HTML REPORT

(continues on next page)

11
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

(continued from previous page)


# QUAKEML PARAMETERS ----------------
# Parameters for QuakeML output.
#
# A QuakeML file will be generated only if QuakeML is used for input.
# The output file will be based on the input file, with additional information
# on seismic moment, Mw and source parameters computed by SourceSpec.
# Note: if you don't understand the parameters below, then probably you
# don't need QuakeML output and you can leave all the parameters to their
# default value

# Specify author name. Leave it to None to use login name on this computer.
author = None
# Optionally, specify agency id
agency_id = None
# Set SourceSpec Mw as preferred
set_preferred_magnitude = False
# Base for all the object ids (smi)
smi_base = "smi:local"
# String to strip from the Origin id when constructing the
# Magnitude and stationMagnitude ids.
smi_strip_from_origin_id = ""
# Template for the Magnitude object id (smi).
# Use $SMI_BASE to indicate smi_base defined above
# Use $ORIGIN_ID to indicate the id of the associated Origin.
smi_magnitude_template = "$SMI_BASE/Magnitude/Origin/$ORIGIN_ID#sourcespec"
# Template for the stationMagnitude object id (smi).
# Use $SMI_BASE to indicate smi_base defined above
# Use $ORIGIN_ID to indicate the id of the associated Origin.
# Use $SMI_MAGNITUDE_TEMPLATE to reuse the template for Magnitude object
# Use $WAVEFORM_ID to indicate the id of the associated waveform.
smi_station_magnitude_template = "$SMI_MAGNITUDE_TEMPLATE#$WAVEFORM_ID"
# Template for the MomentTensor object id (smi) which is used to store
# the scalar moment value.
# Use $SMI_BASE to indicate smi_base defined above
# Use $ORIGIN_ID to indicate the id of the associated Origin.
smi_moment_tensor_template = "$SMI_BASE/MomentTensor/Origin/$ORIGIN_ID#sourcespec"
# Template for the FocalMechanism object id (smi) which is used to store
# the scalar moment value.
# Use $SMI_BASE to indicate smi_base defined above
# Use $ORIGIN_ID to indicate the id of the associated Origin.
smi_focal_mechanism_template = "$SMI_BASE/FocalMechanism/Origin/$ORIGIN_ID#sourcespec"
# -----------------QUAKEML PARAMETERS

12 Chapter 2. Configuration File


CHAPTER 3

SourceSpec API

SourceSpec has a modular structure. Each module corresponds to a specific function or class of functions.
SourceSpec modules are presented below, following the logical order on which they’re used within source_spec.
py.

3.1 ssp_setup

3.2 ssp_read_traces

3.3 ssp_process_traces

3.4 ssp_build_spectra

3.5 ssp_plot_traces

3.6 ssp_local_magnitude

Local magnitude calculation for sourcespec.


copyright 2012 Claudio Satriano <satriano@ipgp.fr>
2013-2014 Claudio Satriano <satriano@ipgp.fr>, Emanuela Matrullo <ma-
trullo@geologie.ens.fr>
2015-2022 Claudio Satriano <satriano@ipgp.fr>
license CeCILL Free Software License Agreement v2.1 (http://www.cecill.info/licences.en.html)

13
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

ssp_local_magnitude.local_magnitude(config, st, proc_st, sourcepar)


Compute local magnitude from max absolute W-A amplitude.

3.7 ssp_inversion

3.8 ssp_spectral_model

Spectral model and objective function.


copyright 2012 Claudio Satriano <satriano@ipgp.fr>
2013-2014 Claudio Satriano <satriano@ipgp.fr>, Emanuela Matrullo <ma-
trullo@geologie.ens.fr>, Agnes Chounet <chounet@ipgp.fr>
2015-2022 Claudio Satriano <satriano@ipgp.fr>
license CeCILL Free Software License Agreement v2.1 (http://www.cecill.info/licences.en.html)
ssp_spectral_model.objective_func(xdata, ydata, weight)
Objective function generator for bounded inversion.
ssp_spectral_model.spectral_model(freq, Mw, fc, t_star, alpha=1.0)
Spectral model.
[︃ (︃ (︂ )︂2 )︃ ]︃
2 𝑓 *
𝑌𝑑𝑎𝑡𝑎 = 𝑀𝑤 + − log10 1 + − 𝜋 𝑓 𝑡 log10 𝑒
3 𝑓𝑐

see source_spec for a detailed derivation of this model.

3.9 ssp_residuals

Spectral residual routine for sourcespec.


copyright
2013-2014 Claudio Satriano <satriano@ipgp.fr>, Agnes Chounet <chounet@ipgp.fr>
2015-2022 Claudio Satriano <satriano@ipgp.fr>
license CeCILL Free Software License Agreement v2.1 (http://www.cecill.info/licences.en.html)
ssp_residuals.spectral_residuals(config, spec_st, sourcepar)
Compute spectral residuals with respect to an average spectral model.
Saves a stream of residuals to disk using pickle.

14 Chapter 3. SourceSpec API


SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

3.10 ssp_correction

3.11 ssp_output

3.12 ssp_plot_spectra

3.13 ssp_util

Utility functions for sourcespec.


copyright 2012-2022 Claudio Satriano <satriano@ipgp.fr>
license CeCILL Free Software License Agreement v2.1 (http://www.cecill.info/licences.en.html)
ssp_util.bsd(Mo_in_N_m, ra_in_m)
Compute Brune stress drop in MPa.
Madariaga (2009), doi:10.1007/978-1-4419-7695-6_22, eq. 27
ssp_util.get_vel(lon, lat, depth, wave, config)
Get velocity at a given point from NonLinLoc grid.
Fall back to config.vp or config.vs if no grid is defined.
ssp_util.hypo_dist(trace)
Compute hypocentral and epicentral distance (in km) for a trace.
ssp_util.mag_to_moment(magnitude)
Convert magnitude to moment.
ssp_util.moment_to_mag(moment)
Convert moment to magnitude.
ssp_util.quality_factor(hyp_dist_in_km, vs_in_km_per_s, t_star_in_s)
Compute quality factor from t_star, distance and vs.
ssp_util.select_trace(stream, traceid, instrtype)
Select trace from stream using traceid and instrument type.
ssp_util.source_radius(fc_in_hz, vs_in_m_per_s)
Compute source radius in meters.
Madariaga (2009), doi:10.1007/978-1-4419-7695-6_22, eq. 31

3.14 spectrum

A Spectrum() class defined as a modification of the ObsPy class Trace().


Provides the high-level function do_spectrum() and the low-level funciton do_fft().
copyright 2012-2022 Claudio Satriano <satriano@ipgp.fr>
license CeCILL Free Software License Agreement v2.1 (http://www.cecill.info/licences.en.html)
spectrum.do_fft(signal, delta)
Compute the complex Fourier transform of a signal.

3.10. ssp_correction 15
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

spectrum.do_spectrum(trace)
Compute the spectrum of an ObsPy Trace object.

3.15 config

Config class for sourcespec.


copyright 2013-2022 Claudio Satriano <satriano@ipgp.fr>
license CeCILL Free Software License Agreement v2.1 (http://www.cecill.info/licences.en.html)
class config.Config
Config class for sourcespec.

16 Chapter 3. SourceSpec API


CHAPTER 4

Indices and tables

• genindex
• modindex
• search

17
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

18 Chapter 4. Indices and tables


Python Module Index

c
config, 16

s
spectrum, 15
ssp_local_magnitude, 13
ssp_residuals, 14
ssp_spectral_model, 14
ssp_util, 15

19
SourceSpec Documentation, Release 1.5+32.g5864e1a.dirty

20 Python Module Index


Index

B spectral_residuals() (in module ssp_residuals),


bsd() (in module ssp_util), 15 14
spectrum (module), 15
C ssp_local_magnitude (module), 13
ssp_residuals (module), 14
Config (class in config), 16
ssp_spectral_model (module), 14
config (module), 16
ssp_util (module), 15
D
do_fft() (in module spectrum), 15
do_spectrum() (in module spectrum), 15

G
get_vel() (in module ssp_util), 15

H
hypo_dist() (in module ssp_util), 15

L
local_magnitude() (in module
ssp_local_magnitude), 13

M
mag_to_moment() (in module ssp_util), 15
moment_to_mag() (in module ssp_util), 15

O
objective_func() (in module ssp_spectral_model),
14

Q
quality_factor() (in module ssp_util), 15

S
select_trace() (in module ssp_util), 15
source_radius() (in module ssp_util), 15
spectral_model() (in module ssp_spectral_model),
14

21

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy