SeisCat API
Start here to navigate the SeisCat source code.
seiscat
Main script for seiscat.
- copyright:
2022-2023 Claudio Satriano <satriano@ipgp.fr>
- license:
GNU General Public License v3.0 or later (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
db
Database functions for seiscat.
- copyright:
2022-2023 Claudio Satriano <satriano@ipgp.fr>
- license:
GNU General Public License v3.0 or later (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
- seiscat.db.check_db_exists(config, initdb)[source]
Check if database file exists.
- Parameters:
config – config object
initdb – if True, create new database file
- seiscat.db.delete_event_from_db(config, eventid, version=None)[source]
Delete an event from the database.
- Parameters:
config – config object
eventid – event id of the event to delete
version – version of the event to delete (if None, delete all versions of the event)
- seiscat.db.get_catalog_stats(config)[source]
Get a string with catalog statistics.
- Parameters:
config – config object
- Returns:
string with catalog statistics
- seiscat.db.read_events_from_db(config)[source]
Read events from database. Return a list of events.
- Parameters:
config – config object
- Returns:
list of events, each event is a dictionary
- seiscat.db.read_fields_and_rows_from_db(config, eventid=None, version=None)[source]
Read fields and rows from database. Return a list of fields and a list of rows.
- Parameters:
config – config object
eventid – limit to events with this evid
version – limit to events with this version (ignored if eventid is None)
- Returns:
list of fields, list of rows
- seiscat.db.replicate_event_in_db(config, eventid, version=1)[source]
Replicate an event in the database. The new event will have the same evid as the original event, but a different version.
- Parameters:
config – config object
eventid – event id of the original event
version – version of the original event
download_and_store
Download and store events.
- copyright:
2022-2023 Claudio Satriano <satriano@ipgp.fr>
- license:
GNU General Public License v3.0 or later (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
editdb
Edit functions for seiscat.
- copyright:
2022-2023 Claudio Satriano <satriano@ipgp.fr>
- license:
GNU General Public License v3.0 or later (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
fdsnws
FDSN webservices functions for seiscat.
- copyright:
2022-2023 Claudio Satriano <satriano@ipgp.fr>
- license:
GNU General Public License v3.0 or later (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
- class seiscat.fdsnws.QueryArgs(config, suffix, first_query)[source]
Bases:
objectBuild query arguments for FDSN client.
parse_arguments
Argument parsing for seiscat.
- copyright:
2022-2023 Claudio Satriano <satriano@ipgp.fr>
- license:
GNU General Public License v3.0 or later (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
plot
Plotting functions for seiscat.
- copyright:
2022-2023 Claudio Satriano <satriano@ipgp.fr>
- license:
GNU General Public License v3.0 or later (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
print
Printing functions for seiscat.
- copyright:
2022-2023 Claudio Satriano <satriano@ipgp.fr>
- license:
GNU General Public License v3.0 or later (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
utils
Utility functions for seiscat.
- copyright:
2022-2023 Claudio Satriano <satriano@ipgp.fr>
- license:
GNU General Public License v3.0 or later (https://www.gnu.org/licenses/gpl-3.0-standalone.html)
- seiscat.utils.err_exit(msg)[source]
Print an error message and exit.
- Parameters:
msg – error message
- seiscat.utils.read_config(config_file, configspec=None)[source]
Read a config file.
- Parameters:
config_file – path to the config file
configspec – configspec object
- Returns:
config object