diff --git a/efel/pyfeatures/pyfeatures.py b/efel/pyfeatures/pyfeatures.py index 935e1f7c..ab140368 100644 --- a/efel/pyfeatures/pyfeatures.py +++ b/efel/pyfeatures/pyfeatures.py @@ -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] diff --git a/efel/units/units.json b/efel/units/units.json index 538ef7a3..bbc8accc 100644 --- a/efel/units/units.json +++ b/efel/units/units.json @@ -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" } diff --git a/tests/test_pyfeatures.py b/tests/test_pyfeatures.py index 860f6ec9..df451837 100644 --- a/tests/test_pyfeatures.py +++ b/tests/test_pyfeatures.py @@ -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