Skip to content

Commit 13c0fa0

Browse files
Merge pull request #1622 from OceanStreamIO/oceanstream/fix-type-hint-and-scalar-extraction
fix: correct SNR_threshold type annotation and xarray scalar extraction
2 parents bf501c5 + 88c6c53 commit 13c0fa0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

echopype/calibrate/cal_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def _get_fs():
410410
# loop through channel since transceiver can vary
411411
fs = []
412412
for ch in vend["channel"]:
413-
tcvr_type = vend["transceiver_type"].sel(channel=ch).data.tolist().upper()
413+
tcvr_type = vend["transceiver_type"].sel(channel=ch).values.item().upper()
414414
fs.append(default_params["receiver_sampling_frequency"][tcvr_type])
415415
return xr.DataArray(fs, dims=["channel"], coords={"channel": vend["channel"]})
416416

echopype/clean/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def remove_background_noise(
439439
ping_num: int,
440440
range_sample_num: int,
441441
background_noise_max: str = None,
442-
SNR_threshold: float = "3.0dB",
442+
SNR_threshold: str = "3.0dB",
443443
) -> xr.Dataset:
444444
"""
445445
Remove noise by using estimates of background noise

0 commit comments

Comments
 (0)