SourceSpec Changelog
Earthquake source parameters from P- or S-wave displacement spectra
Copyright (c) 2011-2026 Claudio Satriano satriano@ipgp.fr
unreleased
Important: this release requires at least Python 3.9.
Note: several new config file parameters have been added and others have been
replaced: please run source_spec -U CONFIG_FILE_NAME to update your old
config file.
Warning: the SQLite database used by this version is not compatible with
previous versions. You will need to upgrade your old database manually or using
source_spec -u DATABASE_FILE_NAME.
Input/output
Global inversion quality parameters in YAML, SQLite and HTML output:
Number of input stations
Number of input spectra
Number of spectra inverted
Azimuthal gap (primary and secondary)
Mean normalized RMS (RMSN)
Mean quality of fit (in percent)
Spectral dispersion (RMSN)
Spectral dispersion score (in percent)
Station quality parameters in YAML and SQLite output:
Mean spectral S/N ratio, across the station components
Max spectral S/N ratio, across the station components
Normalized RMS (RMSN)
Quality of fit (in percent)
The field
distin theStationstable of the SQLite database has been renamed tohypo_distNew fields in the
Stationstable of the SQLite database:epi_dist,lon,lat,instr_type,spectral_snratio_mean,spectral_snratio_max,rmsn,quality_of_fit,ignored,ignored_reasonNew fields in the
Eventstable of the SQLite database:n_input_stations,n_input_spectra(renamed fromnobs),n_spectra_inverted,azimuthal_gap_primary,azimuthal_gap_secondary,rmsn_mean,quality_of_fit_mean,spectral_dispersion_rmsn,spectral_dispersion_scoreHTML report improvements:
Inversion Quality Summary
Link to supplementary files and plots in the HTML report
Display configuration, log and output files in a modal window with syntax highlighting (only when the HTML report is served by a web server)
More informative warning messages when signal windows are truncated or noise windows are zero-padded
Improved writing of HDF5 spectrum files: the file is opened only once to write all the spectra
New command line option
--depthto override any event depth provided in the input files
Processing
New config parameter
force_noise_zero_paddingto force noise window zero-padding regardless of the weighting modeNew config parameter
win_length_minto set a minimum window length for the spectral analysis. Useful when signal and noise windows are automatically definedNew option
r_power_n_segmentedfor thegeom_spread_modelconfig parameter to use a segmented geometrical spreading model with different powers for different distance rangesNew config parameter
refine_theoretical_arrivalsto refine the theoretical P and S arrival times using a simple autopicker based on the smoothed envelope of the traceNew config parameter
clipping_min_amplitude_ratioto set a threshold for trace amplitude below which the trace is not checked for clippingUse spectral interpolation to compute and apply station residuals
Limit spectrum and residual to common frequency range when applying correction before fitting (see #69)
Possibility of defining a prior attenuation model, either as a constant Q value or as a frequency-dependent Q model from a text file (see #76). In this case, t* is not inverted but derived from the attenuation model.
Possibility of computing travel times and takeoff angles from a 1D layered velocity model (see #79)
Possibility of specifying station-specific free-surface amplification factors (see #81 and #82)
Post-Inversion
New config parameter
pi_fc_weight_min, which defines the minimum acceptable weight near the inverted fc. This helps flag cases where fc values may be poorly constrainedNew options for
source_residuals:
Plotting
New plot: raw traces
Stacked spectra: color spectral curves according to the weighting function
Spectral plots: show information on the reason why a fit failed
Spectral plots: add “ignored” next to the S/N ratio if the spectrum is ignored because of a S/N ratio too low or impossible to compute
plot_sourcepars: possibility of selecting the latest runid for each eventplot_sourcepars: new plot type: static stress drop vs. depth
plot_sourcepars: option to color data points in scatter plot by another parameterplot_sourcepars: Gutenberg-Richter plot with optional fit of the magnitude of completeness and the a and b valuesplot_sourcepars: new plot type: Mw vs. time
Support for Matplotlib 3.9, 3.10 and 3.11
Maps: use PlateCarree projection for small maps (map diagonal below 100 km), which speeds up the plotting
Maps: possibility to use a GeoTIFF file as a basemap
Use threading to speed up saving plots to disk
Config file
Consolidated seismic wave velocity and rock density parameters under the “EARTH MODEL PARAMETERS” section of the config file
vp_ttandvs_ttrenamed tovpandvs; they can be lists to define a layered model for travel-time and takeoff-angle computations. This is used together with the newrhoandlayer_top_depthsparameters. These parameters are also used to convert station displacements into seismic moment, unless overridden byvp_source/vp_stations,vs_source/vs_stationsorrho_source/rho_stationsNew config parameter:
force_noise_zero_paddingNew config parameter:
win_length_minImproved documentation for the
win_lengthparameterNew option
r_power_n_segmentedfor thegeom_spread_modelconfig parameterNew config parameters:
geom_spread_n_exponents,geom_spread_n_distancesNew config parameters:
refine_theoretical_arrivals,autopick_freqmin,autopick_debug_plotNew config parameter
clipping_min_amplitude_ratioNew option
geotiffforplot_map_styleto use a GeoTIFF file as a basemapNew config parameters:
plot_map_geotiff_filepath,plot_map_geotiff_grayscale,plot_map_geotiff_attributionImproved documentation for the
sn_minandspectral_sn_minparametersNew option
rp_lower_boundto avoid overcorrection for stations close to a nodal plane when radiation coefficient is computed from focal mechanismNew config parameter
pi_fc_weight_minConfig parameter
pi_misfit_maxrenamed topi_quality_of_fit_min: it now defines the minimum acceptable quality of fit in percent (0-100).Config parameter
noise_pre_timenow defaults toNone, which means that it will be autoset to the length of the signal window plus the value ofsignal_pre_timeNew config parameter
Q_modelto define a prior attenuation model (constant or frequency-dependent, see #76)Config parameter
free_surface_amplificationnow also accepts a list of station code patterns with corresponding amplification factors (see #81 and #82)
Bugfixes
Fix
np.float64being printed in logs and YAML output when using NumPy>=2Fix for rejected spectra still being plotted in the stacked spectra plot
Fix for corner case where all the inversion errors are zero
Fix I/O error when reading PAZ files
Fix for event ids in SourceSpec event file being only numbers: they are now correctly interpreted as strings
Fix for ignored picks for certain kind of QuakeML files (like the ones from USGS) where the phase name is not in the
<phase_hint>attribute of the<pick>element but in the<phase>attribute of the corresponding<arrival>elementStabilize the computation of derivatives in the Okal geometrical spreading model, thus avoiding numerical instabilities
Speed up map plotting when using coastlines
Gently skip building spectra for station with very short data windows (less than 10 samples)
Fix for
sensitivityconfig parameter always requiring a SAC file. Now, ifsensitivityis a numerical value, any file format is acceptedImproved estimation of
fc_0(initial corner frequency) when inverse frequency weighting is used (see #67)Fix in
source_residuals: removed extrapolation of individual station residuals beyond their valid frequency range, which was leading to incorrect mean residuals at high frequencies (see #68)Fix bug preventing reading travel times from NonLinLoc grid files
Improved handling of glob patterns in trace ID filtering (
use_traceidsandignore_traceidsconfig parameters)Fix for config parameter
noise_pre_timenot being able to be set toNoneFix a bug causing severe slowdown when saving many plots to disk
Fix for geophone instrument codes (
P) not being recognized
Requirements
Python minimum version raised to 3.9
ObsPy minimum version raised to 1.5
Support added for Python 3.13 and 3.14
v1.8 - 2024-04-07
This long overdue release brings many improvements, new features and bugfixes gradually introduced during the last year.
Release highlights:
New file formats for events and spectra
New configuration options to better specifify velocity and density models
Better support for P-wave inversion and teleseismic events
Radiation pattern correction from focal mechanism in radiated energy computation
Option for travel time-based signal window length
More options to control the calculation of source radius and stress drop
Improved estimation of radiated energy
New source parameter: apparent stress
Fix for map tiles not plotted anymore
This release requires at least Python 3.7.
Warning: the SQLite database used by this version is not compatible with
previous versions. You will need to upgrade your old database manually or using
source_spec -u DATABASE_FILE_NAME.
Make sure to read the detailed Changelog below 👇
v1.8: Input/output
Introducing a new file format for providing event information (hypocentral location, magnitude, focal mechanism, moment tensor): the SourceSpec Event File.
New HDF5 and TEXT file formats to store spectra
Station residuals are now saved in an HDF5 spectrum file, instead of a pickle file
New config file option
save_spectrato save the spectra to an HDF5 file in the output directoryChanges in the YAML output file:
bsd(Brune stress drop) parameter renamed tossd(static stress drop)Store in the
event_infosection the values of vp, vs and rho close to the hypocenterStore in the
inversion_infosection the type of wave used for the inversion (P, S, SV or SH)
Changes in the SQLite database (warning: these changes break compatibility with previous database versions):
bsd(Brune stress drop) parameter renamed tossd(static stress drop)Store the
Stationstable information on whether each parameter is an outlier (see #38)Make place in the
Stationstable for station-level errors on radiated energy (even if they are currently not computed)Store in the
Eventstable the number of observations used for computing each summary parameterStore in the
Eventstable weighted means for radiated energy and local magnitude, even if those means are currently the same as the simple means, since those parameters do not have station-level errors definedNew columns for apparent stress in both
EventsandStationstablesStore in the
Eventstable the values of vp, vs and rho close to the hypocenterStore in the
Eventstable the type of wave used for the inversion (P, S, SV or SH)
New command line option (
-uor--updatedb) to update an existing database from a previous versionInput files are now linked symbolically in the
input_filessubdirectory of the output directory (not implemented for Windows)New command line option (
-Ror--run_id_subdir) to userun_id(if defined) as a subdirectory of the event directoryPrint event info to console and to log file
HTML report improvements:
Event name in the summary table, if available
Author, agency and run completion date in the summary table
SourceSpec version in the inversion information table
Link to input files
Information on the type of wave used for the inversion (P, S, SV or SH)
v1.8: Processing
Use all the available components to compute P-wave spectra (previously, only the vertical component was used)
Possibility of specifying a free surface amplification factor different from 2
Possibility of specifying a layered velocity and density model for the source
Possibility of specifying a different density for the source and for the stations
If density is not provided (i.e., it is
None), use the density from the global velocity model “iasp91”Teleseismic geometrical spreading model (Okal, 1992)
New weighting option based on inverse frequency, so that lower frequencies have larger weight in the inversion. If traces contain noise, weights will be set to zero where SNR < 3 (see #37)
For weights computed from spectral S/N ratio (noise weighting), set to zero all the weights below 20% of the maximum weight, so that these weakly constrained parts of the spectrum are ignored in the inversion
Possibility of using variable signal window lengths for each station as a function of the travel time of the P or S wave (see #48)
v1.8: Inversion
Possibility of using the magnitude (or scalar moment) provided in the event file as initial Mw value for the inversion
Reintroduced the possibility of providing the variability around the initial Mw value
By combining the previous options, it is now possible to fix the Mw value during the inversion to the value provided in the event file
v1.8: Post-Inversion
Possibility of choosing the “k” coefficient to compute source radius from corner frequency (Kaneko and Shearer, 2014)
Better control on the frequency range used for computing radiated energy (see #49)
Use station-specific radiation pattern (when available) for computing radiated energy
Take into account for energy partition when computing radiated energy (Boatwright and Choy, 1986). This affects mostly the radiated energy computed from P waves
New source parameter: apparent stress
For parameters with no station-level uncertainty defined (currently, radiated energy and local magnitude), use simple mean when computing summary weighted averages (the previous behavior was to not compute weighted averages for these parameters)
v1.8: Plotting
Show the station radiated energy (Er) value on the station spectra plots
Show the summary radiated energy (Er) value on the stacked spectra plot
Station maps improvements:
Possibility of choosing a basemap style or no basemap
Possibility of not plotting the coastlines
Exclude outliers when computing colorbar limits
Improved computation of bounding box for regional and teleseismic events
Use a global orthographic projection when using stations at large teleseismic epicentral distances (more than 3000 km)
Changes to
plot_sourcepars:Read vp, vs and rho from the SQLite database (previously: vs was hardcoded to 3.5 km/s, rho to 2700 kg/m3 and vp was not used)
Read the source radius “k” coefficient from the SQLite database (previously: “k” was hardcoded to 0.3724, value for the Brune model)
New command line option
--wave_typeto select the wave type (P, S, SV or SH) for plots involving the corner frequencyPossibility of plotting histogram of apparent stress
Option to filter events by apparent stress
v1.8: Config file
New config parameter
epi_dist_rangesto select stations within one or more ranges of epicentral distances. It replaces the old parametermax_epi_dist.New config parameter
free_surface_amplificationto specify the free surface amplification factor (default: 2)New config parameter
layer_top_depthsto specify the depth of the top of the layers in a layered velocity and density modelThe config parameters
vp_source,vs_sourceandrho_sourcecan now be lists of values, to specify a layered velocity and density model for the sourceConfig parameter
rhorenamed torho_sourceNew config parameter
rho_stationsNew config parameter
geom_spread_min_teleseismic_distanceto set the minimum epicentral distance for using the teleseismic geometrical spreading modelNew config parameters
kpandksto set the “k” coefficient for computing source radius from corner frequencyConfig parameter
pi_bsd_min_maxrenamed topi_ssd_min_maxNew option
inv_frequencyfor the config parameterweighting(see #37)Config parameter
max_freq_Erreplaced byEr_freq_range(see #49)New parameters,
qml_event_descriptionandqml_event_description_regex, to obtain the event name from the QuakeML event “description” tagNew parameter
Mw_0_from_event_fileto use the magnitude (or scalar moment) provided in the event file as initial Mw value for the inversionReintroduced the parameter
Mw_0_variabilityto set the variability around the initial Mw valueNew parameter
plot_save_asapto save plots as soon as they are ready. This uses less memory but slows down the code.New parameter
plot_map_styleto choose the map styleNew parameter
plot_map_api_keyto provide a Stadia Maps api key for Stamen Terrain basemapNew option for the parameter
plot_coastline_resolution:no_coastlineNew config parameter
variable_win_length_factorto specify window length as a fraction of the travel time of the P/S wave (see #48)
v1.8: Bugfixes
Fix source radius computation when using P waves (use P-wave velocity instead of S-wave velocity)
Do not ignore picks labeled with lowercase “p” or “s”
Fixed: config parameter
p_arrival_tolerancewas used also for S waves, instead ofs_arrival_tolerance(see #35)Fix Boatwright spreading model (log10 instead of natural log)
Fix bug where signal and noise windows were plotted with the wrong length, under certain circumstances (see #35)
Fixes related to records with short signal windows (see #39)
Fix for beachball not plotted anymore with recent versions of Matplotlib.
Fix bug where traces ignored because of low spectral S/N ratio, where still plotted as if they were valid traces
Fix bug when specifying an absolute path for output directory: the path was treated as relative (see #40)
Fix bug where paths starting with tilde (~) were not parsed correctly (see #43 and #44)
Fix bug where local magnitude was not written to the HYPO71 output file, when using weighted mean as reference statistics
Fix for Stamen Terrain basemap now requiring an API key from Stadia Maps
v1.8: Requirements
Python minimum version raised to 3.7
Matplotlib minimum version raised to 3.2
Cartopy minimum version raised to 0.21
v1.7 - 2023-03-31
This release improves trace processing through the use of modern routines for instrument correction, optional baseline removal, a new clipping detection algorithm and a better definition of signal and noise time windows.
A new plot is introduced, “stacked spectra” which allows to compare all the
spectra at once (and easily detect problematic stations 😉).
Also, a new command line tool, plot_sourcepars, allows making aggregate
plots of source parameters for many events (starting from the SQLite database).
New config file parameters have been added, while some have been removed.
Please run source_spec -U CONFIG_FILE_NAME to update your old config file.
As always, many bugfixes and improvements have been made in this release. Thanks to all the users who took time to write and ask questions (by mail or using the official SourceSpec Discussions).
Big kudos to Kris Vanneste @krisvanneste who helped all along the development with code review and testing and submitted pull requests on noise windows and clipping detection.
Below is the detailed Changelog 👇
v1.7: Input/output
Possibility of using a single PAZ file as a “generic” PAZ file for all the stations
Command line option
--station_metadata(or-w) for overriding the config file parameter with the same name (see pull request #16)Removed command line option
--no-responsefor avoiding removing instrument response (use the config optioncorrect_instrumental_responseinstead)New output file in YAML format. The old
.outfile is still available but deprecated.Information on the inversion procedure in YAML and HTML output
Option to add an agency logo to the HTML page
Possibility of generating HTML report without figures (see #30)
v1.7: Processing
Use modern ObsPy
trace.remove_response()routine for instrument correction (see #27)Option to remove the trace baseline after instrument correction and before filtering (
remove_baselineconfig parameter) (see #25)New algorithms for clipping detection based on kernel density estimation of the trace amplitude values (see #23, #24, #25)
Two methods are available:
clipping_score: compute a trace clipping score based on the shape of the kernel density estimation.clipping_peaks: check if trace is clipped, based on the number of peaks in the kernel density estimation;
Use
clipping_detection_algorithmin the config file to choose the algorithm and the otherclipping_*parameters to adjust the results.The algorithms can also be called from the command line, e.g. for debug purposes, using the shell command
clipping_detection.
Relax noise window requirements if noise weighting is not used. This is useful for older triggered records with noise windows that are short or even missing entirely (see pull request #18)
Some small improvements were made in the window definitions (see pull request #18):
Generate error if signal window is incomplete (P- or S-arrival before the start time of the trace)
Warn if noise window overlaps with P-window (instead of S-window, as in previous versions)
Constrain
signal_pre_timefor S-phase to half the S-P interval, if this interval is shorter thansignal_pre_time(i.e., for short-distance records with short S-P interval)
Extract source and station P and S velocities from global ‘iasp91’ velocity model, if both
v(p,s)_sourceandv(p,s)_stationsare set toNone(see #20)Magnitude limits for inversion are now autoset between 90% of the minimum of the spectral plateau and 110% of its maximum (see #22)
v1.7: Post-Inversion
Possibility of choosing the reference summary statistics that will be used for map plots, QuakeML and HYPO output, as well as for the “Event Summary” section in HTML report and for computing station spectral residuals. Available summary statistics are:
mean
weighted_mean
percentiles (new!)
Possibility of defining the number of sigmas for uncertainties on event means and weighted means
v1.7: Plotting
New plot: stacked spectra
Do not zero-pad traces to common length when plotting, so that missing data at beginning or at the end can be easily detected (see #21)
Plot noise and signal windows separately for each component (see #21)
Show on the trace plot the reason why a trace has been ignored
Logscale for boxplots, if parameters span a large interval (see pull request #15)
Support for SVG format for plot files (can be used in HTML output as alternative to PNG)
Improved trace plot quality for vector formats (PDF, SVG)
New command line tool:
plot_sourceparsto make 1D or 2D plot of source parameters from a sqlite parameter file.
v1.7: Config file
Removed
sensitivity_onlyoption fromcorrect_instrumental_responseRemoved config parameter:
Mw_0_variabilityRemoved config parameter:
clip_max_percentNew config parameter:
remove_baselineNew config parameters for clipping detection:
clipping_detection_algorithmclipping_debug_plotclipping_score_thresholdclipping_peaks_sensitivityclipping_peaks_percentile
Config file section
AVERAGES PARAMETERSrenamed toSUMMARY STATISTICS PARAMETERSNew config parameter:
reference_statisticsNew config parameter:
n_sigmaNew config parameters for percentiles calculation:
lower_percentage,mid_percentageandupper_percentageNew config parameters for filtering and spectral windowing of displacement signals:
bp_freqmin_disp,bp_freqmax_dispfreq1_disp,freq2_disp
Default values for
t_star_min_max(instead ofNone)
v1.7: Code improvements
Large refactoring of the whole codebase, to make the code more modern and easier to maintain (see #28)
v1.7: Bugfixes
Properly ignore vertical components when
ignore_verticalisTrueFix a bug preventing reading phase picks from HYPOINVERSE-2000 files
Fix for noise window not showing up in PNG trace plots in some cases
Fix reading velocities from NLL model (see #20)
HTML report: better scrollbars for station table across all the browsers
Fix for cropped map for very large station-to-event distances (greater than 500 km)
Fix a bug in generating evid form origin time when reading origin time from SAC header and the number of seconds was 59
Fix a crash when no map tiles were available at the selected zoom level
Fix for a corner case where the three components of the same instrument have different trace length (see #31)
Fix
source_residuals, which didn’t work anymore
v1.6 - 2022-08-02
This release introduces several modifications to the config file.
You will need to upgrade your old config files manually or using
source_spec -U CONFIG_FILE_NAME.
This release requires at least Python 3.6.
A lot of effort has been devoted to improve the documentation. Please check it out on https://sourcespec.readthedocs.io/
v1.6: Input/output
QuakeML output (when using QuakeML input)
Command line option
--run-idto provide a string identifying the current run (see pull request #6)Write SourceSpec version to parfile
Write SourceSpec version and run complete time to SQLite file
Write author and agency info (if specified) to output files, figures and HTML report
HTML page for misfit plots (when using grid search or importance sampling)
Station table in HTML report is now sortable (and its header remains fixed)!
Reduce PNG figures file size, while improving their resolution 😃
Removed option to read event information and traces from a pickle file (rarely used)
v1.6: Processing
Support for P-wave spectral inversion (see pull request #9)
It is now possible to provide different vp and vs velocities, close to the source and close to the stations (see the new config options above and issue #5)
Possibility to choose a geometrical spreading model between (see issue #8):
rⁿ (default: n=1 – body waves)
Boatwright et al. (2002): “r” below a cutoff distance, frequency-dependent above the cutoff distance
Use travel time to compute quality factor from t* (and viceversa) (see issue #5)
Compute travel time from pick and origin time, when possible (see issue #10)
Warn if noise window ends after P or S arrival
v1.6: Post-Inversion
Subtract the integral of noise spectrum from the integral of signal spectrum when computing radiated energy, under the hypothesis that energy is additive and noise is stationary
v1.6: Config file
Config parameter
pazhas been removed and merged intostation_metadataConfig parameters
vpandvshave been renamed tovp_sourceandvs_source(see issue #5)New, optional, config parameter
vp_stationsandvs_stationsConfig parameter
pre_p_timeandpre_s_timehave been renamed tonoise_pre_timeandsignal_pre_time, respectively (see pull request #9)Config parameter
rps_from_focal_mechanismrenamed torp_from_focal_mechanism(see pull request #9)New config parameter:
geom_spread_model(see issue #8)Config parameters
PLOT_SHOW,PLOT_SAVEandPLOT_SAVE_FORMATare now lowercase (plot_show,plot_saveandplot_save_format)New, optional, general config parameters for specifying author and agency information. This information is written to output files and figures, if specified
New config parameter,
event_url, to link the event page from the HTML reportRemoved
DEBUGconfig parameterParameters from
GENERAL PARAMETERSsection reorganized into a new section calledTRACE AND METADATA PARAMETERSSome parameters from
INVERSION PARAMETERSmoved into a new section calledSPECTRAL MODEL PARAMETERS
v1.6: Bugfixes
Fix for not working
weightingoptions:frequencyandno_weightFix for negative weights occasionally generated by interpolation
Fix bug when event coordinates are written into sqlite as binary blobs
v1.5 - 2022-05-22
This is a pretty big release coming after several months of work on a large dataset of more than 5000 events in Mayotte.
Please read through the changelog to discover all the improvements and new features.
You will need to update your old config files via
source_spec -U CONFIG_FILE_NAME
Note that v1.5 is no more compatible with Python 2!
v1.5: Input/output
Write output files into a subdirectory of OUTDIR, whose name is the event id
Support for HYPOINVERSE-2000 output files
Removed autodetection of hypo71 file paths (specific to CRL case)
SQLite output: added radiated energy, weighted averages, errors on parameters, number of observations, hypocentral location and origin time
Removed
-Cargument to apply station correction to spectra. Now spectra are automatically corrected ifresiduals_filepathis specified in the configuration fileSave an additional event parameter to output files: average quality factor
Save additional station parameters to output files: source radius, Brune stress drop, source radius, quality factor
Mark outliers in
.outfile and in html reportColored console output for log messages! (Not supported on Windows)
v1.5: Processing
New parameter for setting the width of the spectral smoothing window in terms of frequency decades:
spectral_smooth_width_decades(see issue #2)Compute spectral weights after spectral correction (when a station residuals file is specified via
residuals_filepath)Removed configuration parameter
trace_formatNew configuration parameter
sensitivityto provide a constant sensor sensitivity (flat response curve), which overrides any response curve provided in metadataNew parameter for manually specifying trace units:
trace_units(defaults toauto)New approach for trace clipping detection (requires just one configuration parameter, named
clip_max_percent)Check for trace clipping only in the processing window
Use histogram of samples to detect clipping
Fix for wrong component used for ‘SV’ spectra (see issue #3)
v1.5: Inversion
New config option:
Mw_0_variability. Allowed variability aroundMw_0during the main inversion. Previously hardcoded to 0.1New inversion methods for grid sampling:
grid search (very slow!)
importance sampling of the misfit grid using k-d tree (faster, but less accurate)
Fix for Basin-hopping algorithm not running
v1.5: Post-Inversion
New set of post-inversion parameters to reject certain inversion results, per-station:
pi_fc_min_max,pi_t_star_min_max,pi_bsd_min_max,pi_misfit_maxReject inversion results when inverted
fcis within 10% offc_minorfc_maxFix: use logarithmic error width for weighted logarithmic averages
previous way of computing weighted logarithmic averages was not correct!
Option to reject outliers using the IQR (interquartile range) method: parameter
nIQRSupport for non symmetric error on station spectral parameters
Compute additional, per-station parameters: source radius, Brune stress drop and quality factor
Compute errors for all station parameters
Compute weighted averages for all event parameters (except radiated energy)
Compute spectral residuals using weighted average spectral parameters
v1.5: Plotting
Source parameter box plots to evaluate parameter dispersion across stations and visually detect outliers
Misfit plot (2D and 1D) when using grid sampling
cartopyremoved as installation dependency, since it is not easily installable viapipUse GSHHS database to draw coastlines.
New config option:
plot_coastline_resolution
Correctly show circles on maps with diagonal smaller than 1 km
Fix plotting map colorbar on Matplotlib 3.5
Make average and errorbar lines more visible on map colorbar
Fix for error on plotting fc map, when only one station is available
Fix trace plot scaling for traces with larger signal outside the plot window
Do not plot ‘H’ spectrum if there is only one instrument component (since it will coincide with the only component)
Plot uncorrected spectrum when station correction is used
v1.4 - 2021-10-13
New config option
rps_from_focal_mechanismto compute station-specific S-wave radiation pattern from focal mechanism, if a focal mechanism is available in the QuakeML filePlot the focal mechanism on maps, if it is available
Change default inversion algorithm to TNC (truncated Newton algorithm)
Config option
datalessrenamed tostation_metadataConfig option
traceidsrenamed totraceid_mapping_fileConfig options
ignore_stationsanduse_stationsrenamed toignore_traceidsanduse_traceids, respectivelySupport for 2D NonLinLoc grids (via
nllgrid >= 1.4.1)Possibility of using a generic
DEFAULTNonLinLoc time gridAdded
cartopyas an installation dependencyFixed:
nllgridwas always requested at runtimeFixed: gracefully handle the case when there is no internet connection and map tiles cannot be downloaded
Fixed (Windows): suppress colored terminal output, which is not supported
Fixed (Windows): it is now possible to relaunch the same run, without having to delete the output directory first
Fixed (Windows): use same timezone names than Linux and macOS
v1.3.1 - 2021-09-13
Fix for HTML report not showing trace and spectral plots
HTML report: add Corner Frequency in Event Summary
v1.3 - 2021-08-20
HTML reports
Option to provide station-specific spectral windowing
v1.2 - 2021-05-20
Use
python-versioneerto manage version numbers
v1.1 - 2021-04-07
Bug fixes:
Accept band code
Cfor broadband seismometers sampled at >=250 HzRequire
cartopy>=0.18for compatibility withmatplotlib>=3.3
v1.0 - 2021-03-03
Simplification of time window parameters:
an unique window length,
win_length, is used for time-domain S/N ratio calculation and spectral analysisthe old parameters,
noise_win_lengthands_win_length, are no more supported and generate an error
Reorganized config file and improved inline documentation within the file
removed unused option:
fc_0removed
pre_filtoptionpost-processing check on
fcbounds has been removed
Option to specify non standard instrument codes (e.g.,
Lfor acceleration)Option to specify filter frequencies for local magnitude computation
Plotting improvements:
Show S/N ratio on trace plots
Show spectral S/N ratio on spectrum plots
Option to show/hide ignored traces/spectra (low S/N)
Bug fixes:
Pay attention to location code when building average spectra
Plotting: avoid overlapping traces with different location code
Plotting: avoid overlapping spectra with different location code
v0.9 - 2020-04-24
Support for QuakeML input and StationXML
Support for Python 3.5
Only compatible with ObsPy >= 1.1.0
Project reorganization:
Project renamed to SourceSpec
ssp_residualsrenamed tosource_residualsNew installable package (e.g., via
pip)
Spectra are smoothed in log-freq (no more Konno-Ohmachi)
Inversion is performed in a log-freq space
Option to invert for
t_star_0on the plateau levelTraces are filtered before computing S/N ratio
Trace clipping detection
Traces are always plotted, even if no inversion is performed
Use by default a global model for theoretical travel time calculation
Possibility of using NonLinLoc travel time grids (requires
nllgrid)New options for P and S arrival time tolerance
New option for maximum epicentral distance for trace processing
Possibility of using a NonLinLoc model grid for obtaining vs at the source and at the receiver (requires
nllgrid)Use
log10of weighting function, since the inversion is done in magnitude unitsUse
jsonformat fortraceidcorrection fileSave config file to output dir (only for
source_spec)Save run completion time into output file
Logarithmic average and logarithmic (asymmetric) error bars for Mo, fc and source radius
Computation of radiated energy
Station-specific filters
New parameters:
gap_max,overlap_maxAdd legend to spectral plots
Add event information, code version and run completion time to plots
Multifigure plotting for traces and spectra (for large number of stations)
New option to plot a station map, color-coded by station magnitude (requires Cartopy)
Refactoring of local magnitude computation code:
Wood-Anderson amplitude is computed from the whole trace converted to W-A and not converting only the min and max peaks (which is the default in ObsPy)
Trace windowing is computed on HF envelopes
New option for custom Ml coefficients
Remove unnecessary Ml options
Code cleaning and optimization:
Switch from
optparse(deprecated) toargparseCode style fixes and refactoring
New option to update a config file from previous versions
BUGFIX: Fix a major bug in reading hypo pick file
BUGFIX: Fix for pick file not read in
source_model
v0.8 - 2014-07-11
Trace plot showing S and noise time windows
Improved handling of paz files
Per-station Mo on output file
Code cleaning and optimization
v0.7 - 2014-04-07
Code reorganization:
inversion code split to its own functions
Option to use bounded inversion
Station residuals, through
ssp_residuals.pysource_modelcan now output tables of trade-off between parametersFix in the way noise trace is computed and processed
Documentation!
v0.6 - 2013-06-05
Signal to noise weighting
Improved local magnitude computation
New options:
time domain integration
vertical component
Largely improved plotting function
More data formats supported (Antilles, IPOC)
source_model: a code for plotting theoretical spectraCode refactoring
v0.5 - 2013-02-10
Azimuth computation
Construction of an overall database
Local magnitude computation
konnoOhmachiSmoothing
v0.4 - 2012-04-10
Logging infrastructure
Code reorganization
v0.3 - 2012-02-10
Output is no more printed at screen, but to file
The plots can be saved to a file as well
We differentiate between short periods and broad bands
v0.2 - 2012-02-06
Extended and generalized for the CRL application.
v0.1 - 2012-01-17
Initial Python port.