Skip to content

Commit 04b6fbb

Browse files
committed
docs: improve readme
1 parent f7e2c3f commit 04b6fbb

File tree

3 files changed

+31
-324
lines changed

3 files changed

+31
-324
lines changed

PROBE_GENERATOR_README.md

Lines changed: 0 additions & 126 deletions
This file was deleted.

README.md

Lines changed: 31 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,48 @@
11
# Probe Library
22

3-
This readme describes specifications for describing **probes**. These are 3D objects that do not change physical shape during an experiment and have locations along the probe whose position inside the brain are of interest, these might be electrode contacts or
3+
This tool uses probeinterface to generate CSV and OBJ files for neural probes that are compatible with Pinpoint.
44

5-
The individual folders in this repository are used to generate the probes in [Pinpoint](https://github.com/virtualBrainLab/pinpoint).
5+
## Files Generated
66

7-
## Probe
7+
For each probe, the tool generates:
88

9-
A probe is a 3D object with one or more shanks each of which have sites on them.
9+
1. **CSV file** - Electrode positions and dimensions (`probe_name.csv`)
10+
2. **OBJ file** - 3D geometry of the probe (`probe_name.obj`)
11+
3. **Metadata JSON** - Probe specifications (`probe_name_metadata.json`)
1012

11-
File | Description
12-
---|---
13-
metadata.json | probe metadata, in JSON format
14-
model.obj | 3D model of the probe shanks and any attached silicon, the tip of the reference shank is at the origin
15-
hardware/your_hardware.obj | (optional) 3D model of additional hardware attached to the probe, the origin of the hardware model should be at the tip of the reference shank
16-
site_map.csv | coordinates of electrode surface relative to the tip and selection layers
17-
scripts/ | (optional) If you used any scripts to generate your probe 3D model or site_map, please include them here for reproducibility
13+
## CSV Format
1814

19-
### metadata.json
15+
The CSV file contains electrode information with these columns:
16+
- `electrode_number`: 1-based electrode number
17+
- `x`, `y`, `z`: Electrode position relative to probe tip (micrometers)
18+
- `width`, `height`, `depth`: Electrode dimensions (micrometers)
2019

21-
Field | Type | Example | Description
22-
---|---|---|---
23-
name | string | Neuropixels 1.0 | Full name of the probe
24-
type | int | 1 | Unique ID that can identify this probe, this must be different from all other probes in the library
25-
producer | string | "imec" | Company or insitutition producing the probe
26-
sites | int | 960 | Number of channels on the probe
27-
shanks | int | 1 | Number of physical shanks
28-
references | string | "https://www.nature.com/articles/nature24636" | Reference papers about the probe
29-
spec | string | "https://www.neuropixels.org/_files/ugd/328966_c5e4d31e8a974962b5eb8ec975408c9f.pdf" | Specifications for the probe
20+
## Installation
3021

31-
Example for Neuropixels 1.0:
22+
Make sure you have the virtual environment set up:
3223

33-
```
34-
{
35-
"name":"Neuropixels 1.0",
36-
"type":"1"
37-
"producer":"imec",
38-
"sites":"960",
39-
"shanks":"1",
40-
"references":"https://www.nature.com/articles/nature24636",
41-
"spec":"https://www.neuropixels.org/_files/ugd/328966_c5e4d31e8a974962b5eb8ec975408c9f.pdf"
42-
}
43-
```
44-
45-
### model.obj
46-
47-
3D model of the probe with the surface of the tip at the origin. The probe model should be at "rest" according to the Pinpoint convention. In Unity this means that the .obj file is rotated such that the shanks are pointing along the +Z axis, while the site surface points along the +Y axis. On multi-shank probes the reference shank should be at the origin (i.e. additional shanks should be offset in the -X direction).
48-
49-
In Blender this convention corresponds to the shanks pointing along the -Y axis, the site surface pointing along the +Z axis, and additional shanks should be offset in the +X direction.
50-
51-
#### hardware.obj
24+
```bash
25+
# Activate the virtual environment
26+
source .venv/bin/activate
5227

53-
Additional 3D model files can be included. For example, you may want a 3D model for the circuit boards that are often attached to the actual probe shanks, or for the parts that connect the probe to a micro-manipulator. These additional hardware models will be *fixed* to the probe when displayed in Pinpoint, they cannot be animated or moved inside the program (as of v1.1).
54-
55-
Each .obj file included in the hardware folder will be available as a separate optional 3D model to display and check collisions against. Please group 3D models that are always attached together into a single file.
56-
57-
### site_map.csv
58-
59-
The site map defines the locations of electrode contacts or other points of interest on the probe shanks. In Pinpoint these are the anatomical locations visible on the site maps and can be rendered on the 3D model as well. The first seven columns define the site positions and size relative to the origin (tip) of the probe. The remaining columns define layer options for controlling which sites are actually displayed.
28+
# Install required packages (already done)
29+
pip install probeinterface numpy
30+
```
6031

61-
Fields: index, x, y, z, w, h, d, default, layer1, layer2, ...
32+
## Usage
6233

63-
Example for Neuropixels 1.0:
34+
### Process All Available Probes
6435

65-
| index | x | y | z | w | h | d | default | all | bank0 | double_length |
66-
|-----------|-----|-----|---|----|----|----|---------|-----|-------|---------------|
67-
| 0 | -14 | 200 | 0 | 12 | 12 | 24 | 1 | 1 | 1 | 0 |
68-
| 1 | 18 | 200 | 0 | 12 | 12 | 24 | 1 | 1 | 1 | 1 |
69-
| 2 | -30 | 220 | 0 | 12 | 12 | 24 | 1 | 1 | 1 | 0 |
70-
| 3 | 2 | 220 | 0 | 12 | 12 | 24 | 1 | 1 | 1 | 1 |
36+
```bash
37+
python src/probe_library/probe_generator.py
38+
```
7139

72-
# Contributing
40+
This will:
41+
- Try to load all known probes from the probeinterface library
42+
- Generate demo probes (linear, multi-column, dummy)
43+
- Save all files to `probe_outputs/<manufacturer>/<probe_name>` directory
7344

74-
You can contribute your own probe models to the library and have them included in Pinpoint. Pinpoint is built every 1-2 weeks, if you need to put a 3D model temporarily into the Pinpoint scene you should use the Pinpoint API. To make a new contribution:
45+
## Notes
7546

76-
1. Fork the respository
77-
2. Copy an existing probe folder
78-
3. Modify the folder to match your new probe
79-
4. Submit a pull request, your probe metadata and site_map files will run against our automated tests to validate their format. Note that no tests are run on 3D model files.
80-
5. Once your pull requested is merged, your probe files will automatically be included in future builds of Pinpoint
47+
- Coordinates are in micrometers
48+
- The origin (0,0,0) is the bottom/left corner of the bottom/left-most electrode

process_single_probe.py

Lines changed: 0 additions & 135 deletions
This file was deleted.

0 commit comments

Comments
 (0)