As I am taking a look I realize that the get_probe method returns a dummy probe from the contact vector:
|
def get_probe(self): |
|
probes = self.get_probes() |
|
assert len(probes) == 1, "there are several probe use .get_probes() or get_probegroup()" |
|
return probes[0] |
|
|
|
def get_probes(self): |
|
probegroup = self.get_probegroup() |
|
return probegroup.probes |
|
|
|
def get_probegroup(self): |
|
arr = self.get_property("contact_vector") |
|
if arr is None: |
|
positions = self.get_property("location") |
|
if positions is None: |
|
raise ValueError("There is no Probe attached to this recording. Use set_probe(...) to attach one.") |
|
else: |
|
warn("There is no Probe attached to this recording. Creating a dummy one with contact positions") |
|
probe = self.create_dummy_probe_from_locations(positions) |
|
# probe.create_auto_shape() |
|
probegroup = ProbeGroup() |
|
probegroup.add_probe(probe) |
|
else: |
|
probegroup = ProbeGroup.from_numpy(arr) |
|
for probe_index, probe in enumerate(probegroup.probes): |
|
contour = self.get_annotation(f"probe_{probe_index}_planar_contour") |
|
if contour is not None: |
|
probe.set_planar_contour(contour) |
|
return probegroup |
I am looking at the set_probe and I don't think we save the probe as an object at all. Can I get it? Could we add something like that?
As I am taking a look I realize that the
get_probemethod returns a dummy probe from the contact vector:spikeinterface/src/spikeinterface/core/baserecordingsnippets.py
Lines 255 to 282 in bfe9fb6
I am looking at the
set_probeand I don't think we save the probe as an object at all. Can I get it? Could we add something like that?