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

# Trace format
# Currently supported: 'Antilles', 'CRL', 'ISNet', 'IPOC', 'mseed'
trace_format = mseed

# 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 station/channel/network/location (SCNL) naming scenarios,
# you can provide a file, in json format, with traceid (SCNL) mapping
traceids = None

# List of stations to ignore
ignore_stations = None

# List of stations to use
use_stations = None

# Maximum epicentral distance (km) to process a trace
max_epi_dist = None

# Path to pickle catalog (for 'Antilles' format)
pickle_catalog = None
pickle_classpath = None

# Directory or file for dataless:
dataless = None

# Alternatively, a directory with PAZ files can be specified:
paz = 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
# sensitivity is corrected (faster, especially
# on a large number of traces).
correct_instrumental_response = True
# -------- 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 conaining NonLinLoc travel time grids
# can be specified
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)
# 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

# 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

# Tolerance value (percent of trace max)
# to consider a local maximum as a clipped sample
clip_tolerance = 20
# Maximum percentage of clipped data respect to the total trace lenght
clip_nmax = 0.5

# 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
# Radiation pattern coefficient:
rps = 0.62

# 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
# Inversion algorithm:
# LM: Levenberg-Marquardt algorithm
# (warning: Trust Region Reflective algorithm will be used instead if
#  bounds are provided)
# TNC: truncated Newton algorithm (with bounds)
# BH: basin-hopping algorithm
inv_algorithm = LM
# Parameter bounds:
# specify bounds as a list, ex.:
#   fc_min_max = 0.1, 40
# (comment out or use None to indicate no bound)
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)
Qo_min_max = None
# -------- 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.
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


# 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
# Zoom level for map tiles
# (comment out or use None to let the code optimize the zoom level
# based on the map size)
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