An open API service indexing awesome lists of open source software.

https://github.com/sun-lab-nbb/sl-behavior

A python library that provides tools for processioning behavior data acquired in the Sun (NeuroAI) lab.
https://github.com/sun-lab-nbb/sl-behavior

behavior processing sun

Last synced: 6 months ago
JSON representation

A python library that provides tools for processioning behavior data acquired in the Sun (NeuroAI) lab.

Awesome Lists containing this project

README

          

# sl-behavior

A Python library that provides tools for processing non-visual behavior data acquired in the Sun (NeuroAI) lab.

![PyPI - Version](https://img.shields.io/pypi/v/sl-behavior)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sl-behavior)
[![uv](https://tinyurl.com/uvbadge)](https://github.com/astral-sh/uv)
[![Ruff](https://tinyurl.com/ruffbadge)](https://github.com/astral-sh/ruff)
![type-checked: mypy](https://img.shields.io/badge/type--checked-mypy-blue?style=flat-square&logo=python)
![PyPI - License](https://img.shields.io/pypi/l/sl-behavior)
![PyPI - Status](https://img.shields.io/pypi/status/sl-behavior)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/sl-behavior)
___

## Detailed Description

This library extracts and processes the data saved in the .npz log files generated by the
[sl-experiment library](https://github.com/Sun-Lab-NBB/sl-experiment). It saves the extracted data as a set of .feather
files that are later used together with Polars or Pandas libraries to generate analysis datasets in the lab. Primarily,
the library is intended to run on a remote processing server, and it is used automatically as part of the Sun lab
data processing pipeline.
___

## Table of Contents

- [Dependencies](#dependencies)
- [Installation](#installation)
- [Usage](#usage)
- [API Documentation](#api-documentation)
- [Versioning](#versioning)
- [Authors](#authors)
- [License](#license)
- [Acknowledgements](#acknowledgments)
---

## Dependencies

All software library dependencies are installed automatically as part of library installation.

---

## Installation

### Source

Note, installation from source is ***highly discouraged*** for everyone who is not an active project developer.

1. Download this repository to your local machine using your preferred method, such as Git-cloning. Use one
of the stable releases from [GitHub](https://github.com/Sun-Lab-NBB/sl-behavior/releases).
2. Unpack the downloaded zip and note the path to the binary wheel (`.whl`) file contained in the archive.
3. Run ```python -m pip install WHEEL_PATH```, replacing 'WHEEL_PATH' with the path to the wheel file, to install the
wheel into the active python environment.

### pip
Use the following command to install the library using pip: ```pip install sl-behavior```.

---

## Usage

Primarily, the library is designed to be used on a remote compute server via the bindings in the
[sl-forgery library](https://github.com/Sun-Lab-NBB/sl-forgery). Due to the centralized approach to data collection and
processing in the lab, all experiment and training sessions require processing with this library. Therefore, it is
highly advised to use a task scheduler, such as [cron](https://en.wikipedia.org/wiki/Cron), to monitor and call the
CLI exposed by this library on newly acquired sessions daily.

However, it is also possible to manually call this library to process target sessions by using the `sl-process-behavior`
CLI command exposed by this library as part of its installation into a Python environment. See the API documentation
section below to learn more about the CLI and API interfaces of this library.

---

## API Documentation

See the [API documentation](https://sl-behavior-api-docs.netlify.app/) for the
detailed description of the methods and classes exposed by components of this library.
___

## Versioning

We use [semantic versioning](https://semver.org/) for this project. For the versions available, see the
[tags on this repository](https://github.com/Sun-Lab-NBB/sl-behavior/tags).

**Note!** The API documentation includes important information about Command-Line-Interfaces (CLIs) exposed by this
library as part of installation into a Python environment. All users are highly encouraged to study the CLI
documentation to learn how to use library components via the terminal.

---

## Authors

- Ivan Kondratyev ([Inkaros](https://github.com/Inkaros))
- Kushaan Gupta ([kushaangupta](https://github.com/kushaangupta))
- Natalie Yeung

___

## License

This project is licensed under the GPL3 License: see the [LICENSE](LICENSE) file for details.
___

## Acknowledgments

- All Sun lab [members](https://neuroai.github.io/sunlab/people) for providing the inspiration and comments during the
development of this library.
- The creators of all other projects used in our development automation pipelines and source code
[see pyproject.toml](pyproject.toml).

---