Welcome to NeuraLib’s documentation!

API Reference

Release Notes

Installation

Create and activate a new conda environment (Python>=3.9, but >=3.11 not yet tested), then install:

conda create -n neuralib python=3.9
conda activate neuralib
pip install neura-library

If you wish to install all dependencies, run:

pip install neura-library[all]

If you wish to install the minimal required dependencies according to usage purpose:

  • Choices in []: atlas, scanner, calimg, segmentation, model, track, gpu, profile, imagelib, tools, full

  • Example of using atlas module:

pip install neura-library[atlas]

If install as developer mode (Install pre-commit and linter check by ruff):

pip install neura-library[dev]
pre-commit install
ruff check .

CLI project.scripts

brender -h
  • See examples in api

Notebook Demo

Modules

neuralib.atlas

neuralib.calimg

neuralib.segmentation

neuralib.locomotion

neuralib.model

neuralib.morpho

  • Morphological reconstruction data presentation

neuralib.tracking

Utilities Modules

neuralib.argp

  • Use argparse as dataclass field

neuralib.persistence

  • Caching the analyzed results (i.e., concatenation for statistic purpose)

neuralib.sqlp

  • Python functions to build a SQL (sqlite3) statement.

neuralib.dashboard

  • Interactive dashboard visualization

neuralib.plot

  • Module for general plotting purpose

neuralib.imglib

  • Image processing library

neuralib.io

  • File IO and example dataset

neuralib.tools.gspread

  • Google spreadsheet API wrapper for read/write

neuralib.tools.slack_bot

  • Real-time Slack notification bot for analysis pipeline

neuralib.util.cli_args

  • Run script as subprocess

neuralib.util.color_logging

  • Logging with color format

neuralib.util.gpu

  • OS-dependent GPU info

neuralib.util.profile

  • Simple benchmark profile testing and debugging

neuralib.util.table

  • Rich table visualization

neuralib.util.segments

  • Epoch or value segments

Doc for Array type

  • Array[DType, [*Shape]]

  • DType = array datatype. Shape = array shape. | = Union

Example

  • int or bool with (N,3) array -> Array[int|bool, [N, 3]]

  • float array with union shape (N,2) or (N,T,2) -> Array[float, [N, 2]|[N, T, 2]]

Indices and tables