OpenEphys.ProbeInterface.NET
0.4.0
Prefix Reserved
dotnet add package OpenEphys.ProbeInterface.NET --version 0.4.0
NuGet\Install-Package OpenEphys.ProbeInterface.NET -Version 0.4.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenEphys.ProbeInterface.NET" Version="0.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenEphys.ProbeInterface.NET" Version="0.4.0" />
<PackageReference Include="OpenEphys.ProbeInterface.NET" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenEphys.ProbeInterface.NET --version 0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OpenEphys.ProbeInterface.NET, 0.4.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpenEphys.ProbeInterface.NET@0.4.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenEphys.ProbeInterface.NET&version=0.4.0
#tool nuget:?package=OpenEphys.ProbeInterface.NET&version=0.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OpenEphys.ProbeInterface.NET
A C# .NET library for reading and writing neural probe configurations in the probeinterface JSON format. Probeinterface is an open standard describing probe geometry, contact positions, and channel mappings, and is widely used by Open Ephys, SpikeInterface, and related tools.
What it does
- Deserializes probeinterface JSON files into strongly-typed .NET objects
- Serializes probe configurations back to compliant JSON
- Validates files against the specification on load (correct version format, required fields, unique channel indices, array length consistency)
- Supports all probe properties: contact positions (2D and 3D), shapes
(
circle,rect,square), plane axes, planar contour, shank IDs, contact sides, and free-form per-contact annotations with typed access
Quick start
using Newtonsoft.Json;
using OpenEphys.ProbeInterface.NET;
// Load a probeinterface JSON file
var json = File.ReadAllText("my_probe.json");
var probeGroup = JsonConvert.DeserializeObject<ProbeGroup>(json);
// Iterate contacts on each probe
foreach (var probe in probeGroup.Probes)
{
foreach (var contact in probe.Contacts)
Console.WriteLine($"Contact {contact.ContactId}: ({contact.PosX}, {contact.PosY})");
}
// Access per-contact annotations at the contact level
var probe0 = probeGroup.Probes.First();
var contact0 = probe0.Contacts[0];
double? impedance = contact0.GetAnnotation<double>("impedance");
string? region = contact0.GetAnnotation<string>("brain_area");
// Set or remove an annotation on a single contact
contact0.SetAnnotation("brain_area", "CA1");
contact0.RemoveAnnotation("brain_area");
// Bulk access across all contacts on a probe (returns one element per contact)
double[]? impedances = probe0.GetContactAnnotation<double>("impedance");
probe0.SetContactAnnotation("brain_area", new[] { "CA1", "CA3", "DG" });
probe0.RemoveContactAnnotation("brain_area");
// Access probe-level annotations (model, manufacturer, any custom fields)
Console.WriteLine(probe0.Annotations.ModelName);
probe0.Annotations.SetAnnotation("implant_date", "2025-01-01");
string? date = probe0.Annotations.GetAnnotation<string>("implant_date");
// Wire hardware channels to contacts (contact index → channel number)
// Validates uniqueness within and across all probes in the group
ChannelWiring.WireChannels(probeGroup, probeIndex: 0, new Dictionary<int, int>
{
{ 0, 3 }, { 1, 1 }, { 2, 2 }, { 3, 0 }
});
// Query the resulting channel map (channel number → probe/contact/Contact)
var map = probeGroup.GetChannelMap();
foreach (var (channel, entry) in map)
Console.WriteLine($"Channel {channel} → probe {entry.ProbeIndex}, contact {entry.ContactIndex}");
// Wire a single contact, or clear the mapping when done
ChannelWiring.WireChannel(probeGroup, probeIndex: 0, contactIndex: 4, channel: 7);
ChannelWiring.UnwireChannel(probeGroup, probeIndex: 0, contactIndex: 4);
ChannelWiring.UnwireChannels(probeGroup, probeIndex: 0); // clear one probe
ChannelWiring.UnwireChannels(probeGroup); // clear all probes
// Serialize back to JSON
File.WriteAllText("output.json", JsonConvert.SerializeObject(probeGroup, Formatting.Indented));
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.2
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on OpenEphys.ProbeInterface.NET:
| Package | Downloads |
|---|---|
|
OpenEphys.Onix1
Bonsai library containing interfaces for data acquisition and control of ONIX devices. |
|
|
OpenEphys.Onix1.Design
Bonsai Library containing visual interfaces for configuring ONIX devices. |
GitHub repositories
This package is not used by any popular GitHub repositories.