Skip to content

Commit

Permalink
Merge pull request #990 from OSOceanAcoustics/dev
Browse files Browse the repository at this point in the history
Release/v0.6.4.1
  • Loading branch information
leewujung authored Mar 16, 2023
2 parents f12322c + e65a921 commit f8082ca
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
16 changes: 16 additions & 0 deletions docs/source/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ What's new
See [GitHub releases page](https://github.com/OSOceanAcoustics/echopype/releases) for the complete history.


# v0.6.4.1 (2023 March 15)

## Overview

This is a minor release that includes a small bug fix and an enhancement, which removes excessive warnings due to changes in v0.6.4.

## Bug fix
- Fix a bug that prevented passing in `env_params` for EK60 calibration (#987)

## Enhancement
- Handling non-positive values that causes log10 warnings on EK calibration (#986)





# v0.6.4 (2023 March 13)

## Overview
Expand Down
7 changes: 6 additions & 1 deletion echopype/calibrate/calibrate_ek.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def _cal_power_samples(self, cal_type: str, power_ed_group: str = None) -> xr.Da
tvg_mod_range = range_mod_TVG_EK(
self.echodata, self.ed_group, self.range_meter, sound_speed
)
tvg_mod_range = tvg_mod_range.where(tvg_mod_range > 0, np.nan)

spreading_loss = 20 * np.log10(tvg_mod_range)
absorption_loss = 2 * absorption * tvg_mod_range

Expand Down Expand Up @@ -132,7 +134,7 @@ def __init__(self, echodata, env_params, cal_params, **kwargs):
self.sonar_type = "EK60"

# Get env_params
self.env_params = get_env_params_EK60(echodata=echodata, user_env_dict=env_params)
self.env_params = get_env_params_EK60(echodata=echodata, user_env_dict=self.env_params)
self.waveform_mode = "CW"
self.encode_mode = "power"

Expand Down Expand Up @@ -375,11 +377,14 @@ def _cal_complex_samples(self, cal_type: str, complex_ed_group: str) -> xr.Datas

# TVG compensation with modified range
tvg_mod_range = range_mod_TVG_EK(self.echodata, self.ed_group, range_meter, sound_speed)
tvg_mod_range = tvg_mod_range.where(tvg_mod_range > 0, np.nan)

spreading_loss = 20 * np.log10(tvg_mod_range)
absorption_loss = 2 * absorption * tvg_mod_range

# Get power from complex samples
prx = self._get_power_from_complex(beam=beam, chirp=tx, z_et=z_et, z_er=z_er)
prx = prx.where(prx > 0, np.nan)

# Compute based on cal_type
if cal_type == "Sv":
Expand Down

0 comments on commit f8082ca

Please sign in to comment.