Skip to content

Commit

Permalink
_tmp_recording -> temporary_recording
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Jun 18, 2024
1 parent eb31e08 commit 68e0a33
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/spikeinterface/core/sortinganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def __init__(
self.sparsity = sparsity
self.return_scaled = return_scaled
# this is used to store temporary recording
self._tmp_recording = None
self._temporary_recording = None

# extensions are not loaded at init
self.extensions = dict()
Expand Down Expand Up @@ -627,7 +627,7 @@ def set_temporary_recording(self, recording: BaseRecording):
), "Recording channel locations do not match."
if self._recording is not None:
warnings.warn("SortingAnalyzer recording is already set. The current recording is temporarily replaced.")
self._tmp_recording = recording
self._temporary_recording = recording

def _save_or_select(self, format="binary_folder", folder=None, unit_ids=None) -> "SortingAnalyzer":
"""
Expand All @@ -637,7 +637,7 @@ def _save_or_select(self, format="binary_folder", folder=None, unit_ids=None) ->
if self.has_recording():
recording = self._recording
elif self.has_temporary_recording():
recording = self._tmp_recording
recording = self._temporary_recording
else:
recording = None

Expand Down Expand Up @@ -756,7 +756,7 @@ def is_read_only(self) -> bool:
def recording(self) -> BaseRecording:
if not self.has_recording():
raise ValueError("SortingAnalyzer could not load the recording")
return self._tmp_recording or self._recording
return self._temporary_recording or self._recording

@property
def channel_ids(self) -> np.ndarray:
Expand All @@ -774,7 +774,7 @@ def has_recording(self) -> bool:
return self._recording is not None

def has_temporary_recording(self) -> bool:
return self._tmp_recording is not None
return self._temporary_recording is not None

def is_sparse(self) -> bool:
return self.sparsity is not None
Expand Down

0 comments on commit 68e0a33

Please sign in to comment.