Skip to content

Commit

Permalink
add deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 committed May 31, 2024
1 parent 44135a3 commit a554ff3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/spikeinterface/core/baserecordingsnippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,21 @@ def _set_probes(self, probe_or_probegroup, group_mode="by_probe", in_place=False

return sub_recording

def set_probes(self, probe_or_probegroup, group_mode="by_probe", in_place=False):

warning_msg = (
"`set_probes` is now a private function and the public function will be "
"removed in 0.103.0. Please use `set_probe` or `set_probegroups`"
)

warn(warning_msg, category=DeprecationWarning, stacklevel=2)

sub_recording = self._set_probes(
probe_or_probegroup=probe_or_probegroup, group_mode=group_mode, in_place=in_place
)

return sub_recording

def get_probe(self):
probes = self.get_probes()
assert len(probes) == 1, "there are several probe use .get_probes() or get_probegroup()"
Expand Down

0 comments on commit a554ff3

Please sign in to comment.