fix: call interval kwargs name error

This commit is contained in:
Santiago Martinez 2023-08-02 20:07:56 +01:00
parent 36d616530a
commit 8e8779a72e
2 changed files with 5 additions and 5 deletions

2
.gitignore vendored
View File

@ -65,7 +65,7 @@ ipython_config.py
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control. # in version control.
# https://pdm.fming.dev/#use-with-ide # https://pdm.fming.dev/#use-with-ide
.pdm.toml .pdm-python
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/ __pypackages__/

View File

@ -100,7 +100,7 @@ def compute_max_power_bb(
max_power_ind = np.argmax(power_per_freq_band) max_power_ind = np.argmax(power_per_freq_band)
return int( return int(
convert_int_to_freq( convert_int_to_freq(
max_power_ind, y_low - max_power_ind,
spec.shape[0], spec.shape[0],
min_freq, min_freq,
max_freq, max_freq,
@ -190,13 +190,13 @@ def compute_max_power_second(
def compute_call_interval( def compute_call_interval(
prediction: types.Prediction, prediction: types.Prediction,
previous_prediction: Optional[types.Prediction] = None, previous: Optional[types.Prediction] = None,
**_, **_,
) -> float: ) -> float:
"""Compute time between this call and the previous call in seconds.""" """Compute time between this call and the previous call in seconds."""
if previous_prediction is None: if previous is None:
return np.nan return np.nan
return round(prediction["start_time"] - previous_prediction["end_time"], 5) return round(prediction["start_time"] - previous["end_time"], 5)
# NOTE: The order of the features in this dictionary is important. The # NOTE: The order of the features in this dictionary is important. The