Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ repos:
args: ["--autofix", "--indent=2", "--no-sort-keys"]

- repo: https://github.com/PyCQA/isort
rev: 7.0.0
rev: 8.0.1
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.12.0
rev: 26.3.1
hooks:
- id: black
args: ["--line-length", "100"]
Expand All @@ -33,7 +33,7 @@ repos:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
rev: v2.4.2
hooks:
- id: codespell
# Ignores `.ipynb` files, `_build` and `_static` folders
Expand Down
84 changes: 28 additions & 56 deletions src/ooipy/request/hydrophone_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,8 @@ def get_acoustic_data(
for k, st in enumerate(st_list):
if len(st) > mseed_file_limit:
if verbose:
print(
f"Number of traces in mseed file, {valid_data_url_list[k]}\n\
exceed mseed_file_limit: {mseed_file_limit}."
)
print(f"Number of traces in mseed file, {valid_data_url_list[k]}\n\
exceed mseed_file_limit: {mseed_file_limit}.")
return None

# combine list of single traces into stream of straces
Expand Down Expand Up @@ -881,94 +879,68 @@ def __get_LF_locations_stats(node, channel):
if node == "Slope_Base" or node == "HYSB1":
station = "HYSB1"
if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "Southern_Hydrate" or node == "HYS14":
station = "HYS14"
if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "Axial_Base" or node == "AXBA1":
station = "AXBA1"
if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "Central_Caldera" or node == "AXCC1":
station = "AXCC1"
if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "Eastern_Caldera" or node == "AXEC2":
station = "AXEC2"
if channel not in ["HDH", "HHN", "HHE", "HHZ", "HNN", "HNE", "HNZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "AXAS1":
station = "AXAS1"
if channel not in ["EHN", "EHE", "EHZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "AXAS2":
station = "AXAS2"
if channel not in ["EHN", "EHE", "EHZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "AXEC1":
station = "AXEC1"
if channel not in ["EHN", "EHE", "EHZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "AXEC3":
station = "AXEC3"
if channel not in ["EHN", "EHE", "EHZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "AXID1":
station = "AXID1"
if channel not in ["EHN", "EHE", "EHZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "HYS11":
station = "HYS11"
if channel not in ["EHN", "EHE", "EHZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "HYS12":
station = "HYS12"
if channel not in ["EHN", "EHE", "EHZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")
elif node == "HYS13":
station = "HYS13"
if channel not in ["EHN", "EHE", "EHZ"]:
raise Exception(
f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI"
)
raise Exception(f"Invalid Channel String {channel} for node {node}.\n\
see https://ds.iris.edu/mda/OO/ for available channels and nodes for OOI")

else:
raise Exception(
Expand Down
Loading