3.2. quakemigrate.export¶
The quakemigrate.export module provides some utility functions to export
the outputs of QuakeMigrate to other catalogue formats/software inputs:
- Input files for NonLinLoc
- ObsPy Catalog object
- Snuffler pick/event files for manual phase picking
- MFAST for shear-wave splitting analysis
Warning
Export modules are an ongoing work in progress. The functionality
of the core module to_obspy has been validated, but there may still be bugs elsewhere. If you are interested in using these, or wish to add additional functionality, please contact the QuakeMigrate developers at quakemigrate.developers@gmail.com .
| copyright: | 2020, QuakeMigrate developers. |
|---|---|
| license: | GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html) |
3.2.1. quakemigrate.export.to_mfast¶
This module provides parsers to generate SAC waveform files from an ObsPy Catalog, with headers correctly populated for MFAST.
| copyright: | 2020, QuakeMigrate developers. |
|---|---|
| license: | GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html) |
-
quakemigrate.export.to_mfast.sac_mfast(event, stations, output_path, filename=None)[source]¶ Function to create the SAC file.
Parameters: - event (ObsPy Event object) – Contains information about the origin time and a list of associated picks.
- stations (pandas DataFrame) – DataFrame containing station information.
- output_path (str) – Location to save the SAC file.
- filename (str, optional) – Name of SAC file - defaults to “eventid/eventid.station.{comp}”.
3.2.2. quakemigrate.export.to_nlloc¶
This module provides parsers to export an ObsPy Catalog to the NonLinLoc input file format. We prefer this to the one offered by ObsPy as it includes the additional weighting term.
| copyright: | 2020, QuakeMigrate developers. |
|---|---|
| license: | GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html) |
3.2.3. quakemigrate.export.to_obspy¶
This module provides parsers to export the output of a QuakeMigrate run to an ObsPy Catalog.
| copyright: | 2020, QuakeMigrate developers. |
|---|---|
| license: | GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html) |
-
quakemigrate.export.to_obspy.read_quakemigrate(run_dir, units, run_subname='', local_mag_ph='S')[source]¶ Reads the .event and .picks outputs, and .amps outputs if available, from a QuakeMigrate run into an obspy Catalog object.
NOTE: if a station_corrections dict was used to calculate the network-averaged local magnitude, this information will not be included in the obspy event object. There might therefore be a discrepancy between the mean of the StationMagnitudes and the event magnitude.
Parameters: - run_dir (str) – Path to QuakeMigrate run directory.
- units ({"km", "m"}) – Grid projection coordinates for QM LUT (determines units of depths and uncertainties in the .event files).
- run_subname (str, optional) – Run_subname string (if applicable).
- local_mag_ph ({"S", "P"}, optional) – Amplitude measurement used to calculate local magnitudes. (Default “S”)
Returns: cat – Catalog containing events in the specified QuakeMigrate run directory.
Return type: obspy.Catalog object
3.2.4. quakemigrate.export.to_snuffler¶
This module provides parsers to generate input files for Snuffler, a manual phase picking interface from the Pyrocko package.
| copyright: | 2020, QuakeMigrate developers. |
|---|---|
| license: | GNU General Public License, Version 3 (https://www.gnu.org/licenses/gpl-3.0.html) |
-
quakemigrate.export.to_snuffler.snuffler_markers(event, output_path, filename=None)[source]¶ Function to create marker files compatible with snuffler
Parameters: - event (ObsPy Event object) – Contains information about the origin time and a list of associated picks
- output_path (str) – Location to save the marker file
- filename (str, optional) – Name of marker file - defaults to eventid/eventid.markers
-
quakemigrate.export.to_snuffler.snuffler_stations(stations, output_path, filename, network_code=None)[source]¶ Function to create station files compatible with snuffler.
Parameters: - stations (pandas DataFrame) – DataFrame containing station information.
- output_path (str) – Location to save snuffler station file.
- filename (str) – Name of output station file.
- network_code (str) – Unique identifier for the seismic network.