Repository navigation
Closed
Labels
probeinterfaceRelated to probeinterfaceRelated to probeinterfacequestionGeneral question regarding SIGeneral question regarding SI
Description
As I am taking a look I realize that the get_probe method returns a dummy probe from the contact vector:
spikeinterface/src/spikeinterface/core/baserecordingsnippets.py
Lines 255 to 282 in bfe9fb6
| 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?
Metadata
Metadata
Assignees
Labels
probeinterfaceRelated to probeinterfaceRelated to probeinterfacequestionGeneral question regarding SIGeneral question regarding SI
Activity
samuelgarcia commentedon Oct 23, 2024
by design we do not have the probe object attached.
The idea was to manipulate probe using the contact_vector.
alejoe91 commentedon Nov 5, 2024
@h-mayorquin we store alle the probe metadata in probe info. Maybe the
get_probeshould add these metadata to the returned probe object.The returned object would not be the original one, but it would be a clone with proper name, manufacturer, model, contour, etc
h-mayorquin commentedon Nov 5, 2024
I think that @alejoe91 sounds like a good compromise. It should be a clone of the original probe, right?
zm711 commentedon Jul 7, 2026
So this is closed by #4465?
h-mayorquin commentedon Jul 8, 2026
Yes, this is not necessary anymore, now that we have the probes and propagate the annotations on it I can get the manufacturer and the probe model to get the reconstruct the original probe if necessary.