-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also, move ObsPy mass downloader code to a separate file.
- Loading branch information
1 parent
4b800e4
commit 374d219
Showing
7 changed files
with
49 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ Copyright (c) 2022-2024 Claudio Satriano <[email protected]> | |
|
||
## unreleased | ||
|
||
- `seiscat download` renamed to `seiscat fetchdata` | ||
- New option for `seiscat initdb` and `seiscat updatedb`: `--fromfile` to | ||
initialize or update the database from a CSV file | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -*- coding: utf8 -*- | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
""" | ||
Fetch event waveforms from FDSN web services or from a local SDS archive. | ||
:copyright: | ||
2022-2024 Claudio Satriano <[email protected]> | ||
:license: | ||
GNU General Public License v3.0 or later | ||
(https://www.gnu.org/licenses/gpl-3.0-standalone.html) | ||
""" | ||
import pathlib | ||
from .mass_downloader import mass_download_waveforms | ||
from ..database.dbfunctions import read_events_from_db | ||
from ..utils import ExceptionExit | ||
|
||
|
||
def fetch_event_waveforms(config): | ||
""" | ||
Fetch event waveforms from FDSN web services | ||
or from a local SDS archive. | ||
:param config: config object | ||
""" | ||
with ExceptionExit(): | ||
events = read_events_from_db(config) | ||
event_dir = pathlib.Path(config['event_dir']) | ||
event_dir.mkdir(parents=True, exist_ok=True) | ||
for event in events: | ||
mass_download_waveforms(config, event) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters