Skip to content

Commit

Permalink
fix bug by renaming fs_receiver to receiver_sampling_frequency (#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
leewujung authored Jul 31, 2023
1 parent 13be688 commit 4777f91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions echopype/calibrate/cal_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,11 @@ def get_cal_params_EK(

# Private function to get fs
def _get_fs():
if "fs_receiver" in vend:
return vend["fs_receiver"]
# If receiver_sampling_frequency recorded, use it
if "receiver_sampling_frequency" in vend:
return vend["receiver_sampling_frequency"]
else:
# If receiver_sampling_frequency not recorded, use default value
# loop through channel since transceiver can vary
fs = []
for ch in vend["channel"]:
Expand Down
2 changes: 1 addition & 1 deletion echopype/convert/set_groups_ek80.py
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ def set_vendor(self) -> xr.Dataset:
},
)
if "rx_sample_frequency" in param_dict:
ds_table["fs_receiver"] = xr.DataArray(
ds_table["receiver_sampling_frequency"] = xr.DataArray(
param_dict["rx_sample_frequency"].astype(float),
dims=["channel"],
coords={"channel": ds_table["channel"]},
Expand Down

0 comments on commit 4777f91

Please sign in to comment.