Skip to main content

Probe planner

A tool to help plan where to implant electrodes, plobes and fibers.

Probeplanner uses brainrender and vedo to create interactive 3D visualizations that allow you to plan where to implant electrodes and fibers. In addition to visualizing the brain and the brain regions that the probe goes through in the 3D viewer, probeplanner provides a terminal-based info panel showing you the current probe parameters and which of brain atlas's regions are touched by the probe.

The probe parameters are:

  • probe tip position: position in the anterio-posterior (AP), dorso-ventral (DV) and medio-lateral (ML) axes expressed in microns relative to the atlas' origin. In the terminal display the approximate coordinates relative to bregma are given, but these are intended just as an indication and not as precise coordinates.
  • ML angle, the tilt of the probe's shaft in the ML plane. Positive values indicate the probe is tilting to the right (while looking at the brain from the top, as you would during surgery).
  • AP angle, angle of the probe's shaft in the AP plane. Positive values indicate that the tip is more anterior than the top of the probe.

Using the interactive Planner sliders can be used to adjust the probe's parameters. As the probe is moved around the display is updated to illustrate which brain regions are traversed by the shaft. The Planner also lets you save the current parameters to a yaml file, which can be used later for easily loading probe parameters (either for user in the Planner itself or just to visualize a probe using the Viewer class)

Installation

If you have a python environment with python >= 3.6:

    pip install probeplanner

Usage

The easiest way to use probepanner is through the command line interface. In your terminal you can use:

probe plan

to lanch the interactive probe planner, or

probe view

to use the probe visualizaer.

The --help option can be used to visualize what options these commands accept:

(brainrender) ❯ probe plan --help
Usage: probe plan [OPTIONS]

Options:
  -plan, --p TEXT    Path to plan YAML
  -probe, --pp TEXT  Path to probe YAML
  -debug, --debug    Debug?  [default: False]
  --help             Show this message and exit.

probe file

You can save probe parameters in a 'probe' YAML file:

length: 10000
radius: 70
color: 'k'

# ROIs can be used to select parts of the probe to use
# ROIs: 
#   - [0, 400]
#   - [5000, 6000]
ROIs:

length and radius are the geometric shape of the probe, expressed in micrometers. ROIs is a list of two tuples indicating regions' of interest along the probe's shaft, counting from the tip. Each ROI is specified as a tuple of numbers indicating start/end of the ROI in microns. ROIs can be used if there's only part of the probe that is to be used (e.g. to see through which brain regions the ROI goes through). E.g. if all electrodes are in the 500 micrometers closest to the tip you can specify an ROI as (0, 500).

plan file

A 'plan' YAML file can be used to specify planning parameters (e.g. where the probe should be).

# AIM at brain region
aim_at: 

# Probe angles
AP_angle: -21
ML_angle: 17

# Probe tip location
tip:
- 11327
- 6251
- 5306


# Highlight brain regions
highlight:
  - CUN
  - MOs
  - GRN
  - SCm

aim_at can be the name of a brain region, if that's passed the probe will be centered on the region's center. The angles values indicate how the probe should be titled in the ML and AP planes. tip is a list of three values indicating the coordinate's (AP, DV, ML) of the probe's tip (if aim_at is not used). highlight is an optional list of brain regions to highlight in the viewer.

Metadata

Release files for probeplanner 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for probeplanner 0.1.5
File Size Uploaded Provenance Actions
probeplanner-0.1.5.tar.gz 12.5 kB Without provenance Details for probeplanner-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for probeplanner 0.1.5
File Interpreter ABI Platform Actions
probeplanner-0.1.5-py3-none-any.whl Python 3 none any Details for probeplanner-0.1.5-py3-none-any.whl

Total release size: 36.1 kB

Release files / probeplanner-0.1.5.tar.gz

Download URL probeplanner-0.1.5.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a639d37898ba5b1c2b37f97154726105f9e74c3e0351ec85e34e3bbc9a066ea7
BLAKE2b-256 checksum
How to use checksums
952a29ff9ca9c5cdde1552bd1dee6126aee5a34266ba128ac1e16ca6e9ab6394
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.4

Release files / probeplanner-0.1.5-py3-none-any.whl

Download URL probeplanner-0.1.5-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ae3d3657eeaf0f6c132217d855b70e8d69648e03ca1a32d00c22d1f5e0ef9a7
BLAKE2b-256 checksum
How to use checksums
78ff2fdfd15e2fd859c3b41c5ede4c5678383f1a8b8c3472589c0ecea37012d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.4

Security for probeplanner 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page