Skip to content

Commit

Permalink
Fixed a bug when caching recording noise levels
Browse files Browse the repository at this point in the history
Caching needs to depend on the method, otherwise the result might be
erroneous.
  • Loading branch information
DradeAW committed Nov 17, 2023
1 parent efc042e commit 850c6dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spikeinterface/core/recording_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ def get_noise_levels(
"""

if return_scaled:
key = "noise_level_scaled"
key = f"noise_level_{method}_scaled"
else:
key = "noise_level_raw"
key = f"noise_level_{method}_raw"

if key in recording.get_property_keys() and not force_recompute:
noise_levels = recording.get_property(key=key)
Expand Down

0 comments on commit 850c6dc

Please sign in to comment.