You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be a way to define some kind of offcial to describe probes in NWB.
Maybe my question is naive because I am not aware of what have already been done.
ndx-spatial-coordinates is a work-in-progress. It's a project with the Allen Institute that encompasses several related topics: probe configuration, anatomical atlas, and spatial transformations. We have started thinking about how to define objects in 2 and 3 d, so I thought it might be relevant for you. It's still a work-in-progress though, is likely to change, and currently has no documentation.
Hi @bendichter.
I have release today version 0.1.0
The actual package contain a "read_nwb(...)" function which is empty at the moment.
When nwb format will have something about the spatial probe description it would be cool to implement this function as a proof of concept to test prointerface API.
Some pseudo-code design for reading NWB without the use of the extension @D1o0g9s is putting together, as well as a modular step-by-step bite-size tasklist
1
read stuff in probeinterface.io
defread_from_nwb(nwbfile_path : str) ->Probe: # or w/e name you wantwithNWBHDF5IO(file, "r") asio:
nwbfile=io.read()
# figure out num_dims and num_contaacts,shape=nwbfile.electrodes.get("shape")
# shape_params only necessary if shape is not Noneprobe_object=Probe(ndim=num_dims, si_units="um")
poisitions_2d=np.empty(shape=(num_contacts, num_dims))
forj, column_nameinenumerate(["rel_x", "rel_y", "rel_z"]):
poisitions_2d[, j] =nwbfile.electrodes[column_name]
probe_object.set_contacts(positioned_2d, shapes=shape, shape_params=shape_params)
returnprobe_object
2
In neuroconv.tools.probeinterface
defadd_probe_info(nwbfile : NWBFile):
# map all probeinterface.Probe fields to electrode columns + use the ndx-probe extension for nicely describing probe geometry in the new Device objectdefwrite_probe(probe: Probe, nwbfile_path : str, metadata : dict, overwrite : bool=False):
withNWBHDF5IO(path=nwbfile_path, mode="w"ifoverwriteelse"r+") asio:
nwbfile=make_nwbfile_from_metadata(metadata) ifoverwriteelseio.read() # this is typical basic neuroconv metadata strcture, mainly for session_start_timeadd_probe_info(nwbfile=nwbfile)
io.write(nwbfile)
3
read more complete information (if available) in probeinterface.io
defread_from_nwb(): # or w/e name you wantwithNWBHDF5IO(file, "r") asio:
nwbfile=io.read()
# all the previous stuff from #1# then read in all that stuff was that newly written through the use of # 2# goal being to be capable of a full roundtrip without any loss in information when using neuroconv.tools.probeinterface.write_probe to write a nwbfile, then using probe=read_from_nwb(nwbfile_path) to read it back
Activity
samuelgarcia commentedon Dec 2, 2020
About the ndx-franklab-novela I will use lots of fields propose by this project.
bendichter commentedon Dec 2, 2020
ndx-spatial-coordinates is a work-in-progress. It's a project with the Allen Institute that encompasses several related topics: probe configuration, anatomical atlas, and spatial transformations. We have started thinking about how to define objects in 2 and 3 d, so I thought it might be relevant for you. It's still a work-in-progress though, is likely to change, and currently has no documentation.
samuelgarcia commentedon Dec 2, 2020
Is it with Luke Campagnola ?
samuelgarcia commentedon Jan 11, 2021
Hi @bendichter.
I have release today version 0.1.0
The actual package contain a "read_nwb(...)" function which is empty at the moment.
When nwb format will have something about the spatial probe description it would be cool to implement this function as a proof of concept to test prointerface API.
CodyCBakerPhD commentedon Jul 27, 2022
@D1o0g9s will be helping with this task
Some pseudo-code design for reading NWB without the use of the extension @D1o0g9s is putting together, as well as a modular step-by-step bite-size tasklist
1
read stuff in probeinterface.io
2
In neuroconv.tools.probeinterface
3
read more complete information (if available) in probeinterface.io
alejoe91 commentedon Aug 23, 2023
https://github.com/SpikeInterface/ndx-probeinterface
lfrank commentedon Aug 27, 2023
alejoe91 commentedon Mar 24, 2026
The
ndx-probeinterfacecan directly convert probeinterfce objects to NWB devicesCodyCBakerPhD commentedon Mar 24, 2026
@alejoe91 Asking for a separate reason now (BEP032 related)
Is there a way for ProbeInterface to 'read' a Probe object from an NWB file?
alejoe91 commentedon Mar 24, 2026
Hi @CodyCBakerPhD!
Saved by
ndx-probeinterface?CodyCBakerPhD commentedon Mar 24, 2026
@alejoe91 Let's say 'yes', primarily expecting that to have been done via NeuroConv
alejoe91 commentedon Mar 24, 2026
I don't think NeuroConv is currently using
ndx-probeinterfacethough