Giter Club home page Giter Club logo

reach's Introduction

Reaching task for mice

reach is a small Python library for creating forelimb reaching tasks for mice or other rodents used for neuroscientific research. It has been developed for my own implementation of a Raspberry Pi-based visually-guided reaching task using one or two reaching targets and visual stimuli -- both head-fixed and freely-moving -- but has been designed to work with arbitrary 'backends' that may implement other stimulus or reach target configurations. reach is concerned with controlling hardware, responding to events during the task, and organising the resulting data in a format that makes analysis easy.

The code and data representation follows a hierarchical object-oriented structure:

Object Role
Cohort Manages one or more Mouse instances. Useful for data handling and plotting.
Mouse Manages one or more Session instances. Useful for analysing single animals and running training sessions.
Session Manages a training session's behavioural data and operates the training sessions.

Data is saved per animal in a JSON file. This data can be loaded as follows:

from reach import Mouse

data_dir = '/path/to/your/data/'
mouse = Mouse.init_from_file(
    mouse_id='Mouse1',
    data_dir=data_dir,
)

A training session can be run, appending its results to the data stored in Mouse. You would then want to save the data back to JSON to keep the new data:

mouse.train(backend)
mouse.save_data_to_file(data_dir)

backend here is what interfaces with the hardware controlling the task. Details on creating custom backends is here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.