Skip to content

dattalab/azure-acquire

Repository files navigation

azure-acquire

DOI

Acquiring MoSeq data using Kinect Azure. This package is a simple CLI tool that facilitates acquiring data using Kinect Azure on an Ubuntu machine. To setup the acqusition apparatus please follow the Kinect 2 depth camera setup. Please note that the recommended height for the Azure Kinect camera is 23.5 inches (59.6cm) from the depth camera to the bottom of the apparatus.

Installation

Step 0: Install Ubuntu 18.04 on your acquisition machine

Currently, Ubuntu 18.04 is the only supported distribution listed in the official installation instruction. Please click Don't Upgrade to decline when you are prompted to upgrade to a new version of Ubuntu.

Step 1: Install git

sudo apt update
sudo apt upgrade
sudo apt install git

Step 2: Clone (download) the azure-acquire repository

Clone azure-acquire repository from GitHub by running:

git clone https://github.com/dattalab/azure-acquire.git

Navigate to the azure-acquire directory by running:

cd azure-acquire

Step 3: Install the necessary packages by running the installation script

bash ./install_azure_acquire.sh

Additional notes for Ubuntu 22.04 (skip if you are using Ubuntu 18.04)

Notes: Ubuntu 18.04 is the only official supported distribution but if you are unable to install Ubuntu 18.04 on your machine and you have Ubuntu 22.04 instead, you can install the necessary packages by running the following commands:

bash ./install_azure_acquire_linux22.sh

When the script is done running, please run the following commands to add paths to the neessary files for the CLI tool to run correctly:

find / -name libstdc++.so.6 2>/dev/null
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6

Step 4: Restart Terminal for the changes to be effective

Step 5: Verify packages were installed correctly

Connect the camera to the acquisition computer. If the camera was previously connected, disconnect and re-connect the camera. Then open Terminal and run the following command: k4aviewer

Step 6: Create a new conda environment and install relevant packages

Create a conda environment called azure-acquire with python 3.8 by running:

conda create -n azure-acquire python=3.8

Activate the environment by running:

conda activate azure-acquire

Install this package by running:

pip install .

Once you have finished setting up the environment, you should be able to verify the installation by running:

azure-acquire --version

Acquiring data

Check the version of the package by running:

azure-acquire --version

Example acquisition command saving recording at ./data:

azure-acquire ./data --subject-name mouse1 --session-name saline --serial-number xxx --recording-length 20

Options for the acquisition command:

session-name: This field can be an indicator of the date, cohort, experimental condition and/or environment type. subject-name: This field can be an indicator of the rodent strain, sex, age and/or additional identifiers. The subject name should uniquely identify each mouse. recording-length: The length of the recording time. The default is 30 mins if this option is not specified. Alternatively, the option could be specified using -t 20. serial-number: The device the session records from. The device serial number could be found using k4aviewer.

License

MoSeq is freely available for academic use under a license provided by Harvard University. Please refer to the license file for details. If you are interested in using MoSeq for commercial purposes please contact Bob Datta directly at srdatta@hms.harvard.edu, who will put you in touch with the appropriate people in the Harvard Technology Transfer office.