Skip to content

a tool for spike detection in cellular recordings

License

Notifications You must be signed in to change notification settings

lmascelli/pycode

Repository files navigation

Spike-rs

Introduction

The goal of this project is to provide a fast library for the computational part of the analysis, like the conversion of the ADC data, the spikes detection and any sort of operation with data that requires iterating through them. The library is meant to hold the data and to be accessed via Python, requiring some operation and getting back the results. At the moment a GUI in Python is provided with the library so that the workflow can be managed easily but in the future also a Python API is planned so that any user will be able to customize his analysis the way he likes.

Spike-rs

Spike-rs is the name of the core library. It’s written in Rust, a modern and safe alternative to C/C++ that provide the same performance but also guards against some common mistakes and also provides nice compilations error. Almost all the code is (at the moment) build just on standard library. The only requirement are related to the operations with hdf5 datas, for which a build type dependency (bindgen.rs) is needed; anyway this tool is provided by the rust development team as well, so it’s hopefully going to be supported in the long time. Also, for the creation of the Python wrapper an external dependency PyO3 is being used.

Build instruction

Requirements

To build the library you’ll need:

  • the rust toolchain installed: Rust download
  • the llvm toolchain installed (for bindgen automatic bindings generation)

Windows run this command on a shell (i.e. Powershell)

winget install -e --id LLVM.LLVM

Linux it depends on you distro

  • python

Windows

winget install -e --id Python.Python.3.11
  • hdf5 library

hdf5 download and unzip it in a folder (you’ll need that path later)

Set the environment variables

To compile the library the path of the hdf5 binaries and include files are needed. So you’ll need to set those environment variables

HDF5_LIB_DIR
HDF5_INCLUDE_DIR

and point that variables to the lib and include directories of the previously unzipped hdf5 archive. You can alternatively change the values of the build.ps1 script if you want to use it to build the code.

Build the cargo project

cargo build --release

or, if you want to use the Powershell script

./build.ps1 build

Install instructions

TODO

About

a tool for spike detection in cellular recordings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published