Skip to content

Commit

Permalink
Rename waveform_data_path to sds_data_path
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodsf committed Feb 19, 2025
1 parent bea9d31 commit 2fff177
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Copyright (c) 2021-2025 Claudio Satriano <satriano@ipgp.fr>

## unreleased

Note: you might want to run `requake update_config` to update your config file
to the latest version.

- New option `--shorterthan` to select families with a duration shorter than a
given value. For this option and for `--longerthan` it is now possible to
specify the duration in seconds, minutes, hours, or months, in addition to
Expand All @@ -15,6 +18,7 @@ Copyright (c) 2021-2025 Claudio Satriano <satriano@ipgp.fr>
attribute specified in `--colorby` is used.
- New option `--range` to manually specify the range of values for the color
scale
- Option `waveform_data_path` renamed to `sds_data_path`
- Add missing `street` map style for `map_families`
- Initial support for plotting families found with template scan
- Improved reading of CSV catalog files:
Expand Down
2 changes: 1 addition & 1 deletion requake/config/configspec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ station_metadata_path = string(default=None)
fdsn_dataselect_url = string(default=http://example.com)
## Alternatively, you can provide the path to a local SDS waveform archive
## (see https://docs.obspy.org/packages/autogen/obspy.clients.filesystem.sds.html)
waveform_data_path = string(default=None)
sds_data_path = string(default=None)

#### Catalog-based scan
### The following parameters are for a catalog-based scan:
Expand Down
8 changes: 4 additions & 4 deletions requake/config/rq_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _connect_station_dataselect():
logger.info(
f'Connected to FDSN station server: {config.fdsn_station_url}'
)
if config.waveform_data_path is not None:
if config.sds_data_path is not None:
_connect_sds()
else:
config.dataselect_client = FDSNClient(config.fdsn_dataselect_url)
Expand All @@ -182,16 +182,16 @@ def _connect_sds():
"""
Connect to a local SeisComP Data Structure (SDS) archive.
"""
_client = SDSClient(config.waveform_data_path)
_client = SDSClient(config.sds_data_path)
all_nslc = _client.get_all_nslc()
if not all_nslc:
raise FileNotFoundError(
f'No SDS archive found in {config.waveform_data_path}'
f'No SDS archive found in {config.sds_data_path}'
)
config.dataselect_client = _client
logger.info(
'Reading waveform data from local SDS archive: '
f'{config.waveform_data_path}'
f'{config.sds_data_path}'
)
all_nslc_str = '\n'.join('.'.join(nslc) for nslc in all_nslc)
logger.info(f'Found the following NSLC codes:\n{all_nslc_str}')
Expand Down
3 changes: 2 additions & 1 deletion requake/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def update_config_file(config_file, configspec):
v = None
config_new[k] = v
migrate_options = {
# 'old_option': 'new_option'
# 'old_option': 'new_option',
'waveform_data_path': 'sds_data_path',
}
for old_opt, new_opt in migrate_options.items():
if old_opt in config_obj and config_obj[old_opt] != 'None':
Expand Down

0 comments on commit 2fff177

Please sign in to comment.