Skip to main content

Python interface to the Janelia Dudman lab mouse lickport array.

Project description

About

- Name: lickport_array_interface
- Version: 2.0.1
- Description: Python interface to the Janelia Dudman lab mouse lickport array.
- License: BSD 3-Clause License
- URL: https://github.com/janelia-pypi/lickport_array_interface_python
- Author: Peter Polidoro
- Email: peter@polidoro.io
- Copyright: 2022 Howard Hughes Medical Institute
- Dependencies:
  - modular_client

More Information

This library is an interface to the Lickport Array Module.

Example Usage

from lickport_array_interface import LickportArrayInterface, LickportArrayMetadata
dev = LickportArrayInterface() # Try to automatically detect port
dev = LickportArrayInterface(port='/dev/ttyACM0') # Linux specific port
dev = LickportArrayInterface(port='/dev/tty.usbmodem262471') # Mac OS X specific port
dev = LickportArrayInterface(port='COM3') # Windows specific port

data_path_str = '~/lickport_array_data/data_file'

metadata = LickportArrayMetadata()
metadata.experiment_name = 'mouse_library'
metadata.task_name = 'hex_foraging_V2'
metadata.subject_id = 'ML11_NAc'

dev.controller.activate_lickports([0,1])
dev.start_acquiring_data()
dev.start_saving_data(data_path_str,metadata)
dev.stop_saving_data()
dev.stop_acquiring_data()

dev.controller.dispense_lickport_for_duration(0,200)
dev.controller.dispense_lickports_for_duration([0,1],200)
dev.controller.dispense_all_lickports_for_duration(200)
dev.controller.get_activated_lickports()
dev.controller.activate_only_lickport(0)
dev.controller.activate_only_lickports([0,1])
dev.controller.activate_lickport(0)
dev.controller.activate_lickports([0,1])
dev.controller.deactivate_lickport(0)
dev.controller.deactivate_lickports([0,1])
dev.controller.activate_all_lickports()
dev.controller.deactivate_all_lickports()

Data

I Experiment name  : mouse_library
I Task name  : hex_foraging_V2
I Subject ID : ML11_NAc
I Start date : 2022/05/23 16:43:38
time,millis,lickport_0,lickport_1,lickport_2,lickport_3,lickport_4,lickport_5,lickport_6,lickport_7,lickport_8,lickport_9,lickport_10,lickport_11
1653338620,956503527,A,LA,,,,,,,,,,
1653338622,956505441,LA,A,,,,,,,,,,
1653338624,956507372,A,A,,,,,,,,,,L
1653338626,956509622,A,A,,,,,,L,,,,
1653338628,956511133,A,A,,L,,,,,,,,
1653338629,956512828,A,A,,,L,,,,,,,

time

time in seconds since the epoch

The epoch is the point where the time starts, and is platform dependent. For Unix, the epoch is January 1, 1970, 00:00:00 (UTC)

The term seconds since the epoch refers to the total number of elapsed seconds since the epoch, typically excluding leap seconds. Leap seconds are excluded from this total on all POSIX-compliant platforms.

millis

The number of milliseconds passed since the LickportArrayController board was powered. This number will overflow (go back to zero), after approximately 50 days.

lickport_n

Symbol Meaning
"L" lickport_n lick detected
"A" lickport_n activated
"LA" or "AL" lickport_n lick detected and activated
"" lickport_n neither lick detected nor activated

Installation

https://github.com/janelia-pypi/python_setup

Linux and Mac OS X

python3 -m venv ~/venvs/lickport_array_interface
source ~/venvs/lickport_array_interface/bin/activate
pip install lickport_array_interface

Windows

python3 -m venv C:\venvs\lickport_array_interface
C:\venvs\lickport_array_interface\Scripts\activate
pip install lickport_array_interface

Guix

Setup guix-janelia channel:

https://github.com/guix-janelia/guix-janelia

guix install python-lickport-array-interface

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lickport_array_interface-2.0.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

lickport_array_interface-2.0.1-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file lickport_array_interface-2.0.1.tar.gz.

File metadata

  • Download URL: lickport_array_interface-2.0.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for lickport_array_interface-2.0.1.tar.gz
Algorithm Hash digest
SHA256 e891a8c4db3991da6b847e81514837e93f46b22de01b10c8c86a2bc5ba830a90
MD5 aaa856ffe5aef1f532a752842c05d39a
BLAKE2b-256 ad04fce11c4a0d3b7cc74f5cdae0e3935f9d17761513db3d5ebbbe66097be8e0

See more details on using hashes here.

File details

Details for the file lickport_array_interface-2.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: lickport_array_interface-2.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for lickport_array_interface-2.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4ea03a0c523b1e3bba903a7244918547c8a9607dfcde87e1c2b1f8c08bfedd34
MD5 476e875dd145f70684c39b7bfde0eb84
BLAKE2b-256 967927120661469de00e3fbf5d3d422d3060f711e8c34163ea97b6f4155ae97b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page