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
- Support for radiation pattern correction from focal mechanism
- 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 👇
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_spectra` to save the spectra to an HDF5 file
in the output directory
- Changes in the YAML output file:
- `bsd` (Brune stress drop) parameter renamed to `ssd` (static stress drop)
- Store in the `event_info` section the values of vp, vs and rho close to
the hypocenter
- Store in the `inversion_info` section 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 to `ssd` (static stress drop)
- Store the `Stations` table information on whether each parameter is an
outlier (see [38])
- Make place in the `Stations` table for station-level errors on radiated
energy (even if they are currently not computed)
- Store in the `Events` table the number of observations used for computing
each summary parameter
- Store in the `Events` table 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 defined
- New columns for apparent stress in both `Events` and `Stations` tables
- Store in the `Events` table the values of vp, vs and rho close to the
hypocenter
- Store in the `Events` table the type of wave used for the inversion
(P, S, SV or SH)
- New command line option (`-u` or `--updatedb`) to update an existing database
from a previous version
- Input files are now linked symbolically in the `input_files` subdirectory
of the output directory (not implemented for Windows)
- New command line option (`-R` or `--run_id_subdir`) to use `run_id`
(if defined) as a subdirectory of the event directory
- Print 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)
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])
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
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)
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_type` to select the wave type (P, S, SV
or SH) for plots involving the corner frequency
- Possibility of plotting histogram of apparent stress
- Option to filter events by apparent stress
Config file
- New config parameter `epi_dist_ranges` to select stations within one or
more ranges of epicentral distances. It replaces the old parameter
`max_epi_dist`.
- New config parameter `free_surface_amplification` to specify the free surface
amplification factor (default: 2)
- New config parameter `layer_top_depths` to specify the depth of the top of
the layers in a layered velocity and density model
- The config parameters `vp_source`, `vs_source` and `rho_source` can now be
lists of values, to specify a layered velocity and density model for the
source
- Config parameter `rho` renamed to `rho_source`
- New config parameter `rho_stations`
- New config parameter `geom_spread_min_teleseismic_distance` to set the
minimum epicentral distance for using the teleseismic geometrical
spreading model
- New config parameters `kp` and `ks` to set the "k" coefficient for
computing source radius from corner frequency
- Config parameter `pi_bsd_min_max` renamed to `pi_ssd_min_max`
- New option `inv_frequency` for the config parameter `weighting` (see [37])
- Config parameter `max_freq_Er` replaced by `Er_freq_range` (see [49])
- New parameters, `qml_event_description` and `qml_event_description_regex`,
to obtain the event name from the QuakeML event "description" tag
- New parameter `Mw_0_from_event_file` to use the magnitude (or scalar moment)
provided in the event file as initial Mw value for the inversion
- Reintroduced the parameter `Mw_0_variability` to set the variability around
the initial Mw value
- New parameter `plot_save_asap` to save plots as soon as they are ready.
This uses less memory but slows down the code.
- New parameter `plot_map_style` to choose the map style
- New parameter `plot_map_api_key` to provide a Stadia Maps
api key for Stamen Terrain basemap
- New option for the parameter `plot_coastline_resolution`: `no_coastline`
- New config parameter `variable_win_length_factor` to specify window
length as a fraction of the travel time of the P/S wave (see [48])
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_tolerance` was used also for S waves,
instead of `s_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
Requirements
- Python minimum version raised to 3.7
- Matplotlib minimum version raised to 3.2
- Cartopy minimum version raised to 0.21