obspy.io.csv.core
Note
This module can be easily extended to write and read more event information. If you are interested, please send a PR to the github repository.
- Add ‘extended’ or similar key to FIELDS dict, e.g. as a start use
- ‘extended’: (
‘{time!s:.25} {lat:.6f} {lat_err:.6f} {lon:.6f} {lon_err:.6f} ‘ ‘{dep:.3f} {dep_err:.3f} {mag:.2f} {mag_err:.2f} {magtype} {id}’ )
You can also test by just passing the string to fields option.
Implement writing functionality in write_csv by adding the new properties to the dict d. Missing values have to be handled.
Implement reading functionality for the new properties in read_csv.
Write some tests testing all new properties. Check that an event with all new properties defined or missing can be written and read again.
Similar can be done for the picks using PFIELDS, _write_picks, _read_picks
Public Functions
Load CSV or CSZ file into numpy array |
|
Load EVENTTXT file into numpy array |
Private Functions
Warning
Private functions are mainly for internal/developer use and their API might change without notice.
Convert ObsPy catalog to numpy array |
|
Accept files or file names or pathlib objects |
|
Read a CSV file and return ObsPy catalog |
|
Read a CSZ file and return ObsPy catalog with picks |
|
Read EVENTTXT file and return ObsPy catalog |
|
Read picks from CSV file and add them to event |
|
Write ObsPy catalog to CSV file |
|
Write ObsPy catalog to CSZ file |
|
Write ObsPy catalog to EVENTTXT file |
|
Write picks from event to a CSV file |