garrettj403 / garrettj403/QMix

Problem in parameters.py file

Open
#3 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
12
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The parameters "vgap_threshold" in parameters.py is 105e-6 now, so when using the _find_gap_voltage() function to calculate the gap voltage, Method 1 is always called, and Method 2 is never called. There will lead to incorrect calculation of gap voltage.

Please check it.

# Unpack keyword arguments
vgap_threshold = kw.get('vgap_threshold', PARAMS['vgap_threshold'])

# Method 1: current threshold
if vgap_threshold is not None:
idx = np.abs(curr_a - vgap_threshold).argmin()
vgap = volt_v[idx]
return vgap

# Method 2: max derivative
vstep = volt_v[1] - volt_v[0]
mask = (1.5e-3 < volt_v) & (volt_v < 3.5e-3)
der = slope(volt_v[mask], curr_a[mask])
der = gauss_conv(der, sigma=0.2e-3 / vstep)
vgap = volt_v[mask][der.argmax()]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.