Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaquier Aurélien Tristan committed Oct 4, 2023
1 parent 5253ed5 commit bcb60c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion efel/pyfeatures/pyfeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ def impedance():
else:
Z = fft_volt / fft_cur
norm_Z = abs(Z) / max(abs(Z))
select_idxs = numpy.swapaxes(numpy.argwhere((freq > 0) & (freq <= Z_max_freq)), 0, 1)[0]
select_idxs = numpy.swapaxes(
numpy.argwhere((freq > 0) & (freq <= Z_max_freq)), 0, 1
)[0]
smooth_Z = gaussian_filter1d(norm_Z[select_idxs], 10)
ind_max = numpy.argmax(smooth_Z)
return freq[ind_max]
Expand Down
3 changes: 2 additions & 1 deletion efel/units/units.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,6 @@
"initburst_sahp": "mV",
"initburst_sahp_ssse": "mV",
"initburst_sahp_vb": "mV",
"depol_block_bool": "constant"
"depol_block_bool": "constant",
"impedance": "Hz"
}
3 changes: 1 addition & 2 deletions tests/test_pyfeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,5 @@ def test_impedance():

feature_name = "impedance"

expected_values = {feature_name: 4.23076923076923}
expected_values = {feature_name: 4.615384615384615}
_test_expected_value(feature_name, expected_values)
assert False

0 comments on commit bcb60c3

Please sign in to comment.