Software used to interact with various pieces of specialized hardware for neuroscience data acquisition.
[!WARNING]
We are in the process of moving our rigs to iblrig v8.
Support for iblrig v7 is being phased out as of mid-2023.
Open Windows Powershell (blue icon on the taskbar) Copy in the following:
C:\iblrig\venv\Scripts\.\Activate.ps1
cd C:\iblrig_params
start-pybpod
Open Windows Powershell (blue icon on the taskbar) Copy in the following:
C:\iblrig\venv\Scripts\.\Activate.ps1
cd C:\iblrig
python C:\iblrig\scripts\transfer_rig_data.py C:\iblrig_data\Subjects Y:\Subjects
This is only possible within minor releases, for example 7.1.0 to 7.3.X. If going from a major release to another, (for example 6.X.X to 7.X.X) then follow the full installation instructions for the release.
cd C:\iblrig
git fetch --tags
git checkout tags/7.3.2
If you do not know the tag you want to update to, you can get the latest tag with:
git tag --sort=committerdate | Select-Object -Last 1
Where 7.X.X is the version you want to update to.
(python setup_pybpod.py
is needed if there are updates to the task code, but this should only impact major releases)
Software has only been tested on Windows 10. No other version of Windows is supported at this time. The test user account has administrative rights.
In order to install iblrig on a Windows machine please ensure that the following prerequisite is installed first.
Manually download and install the software by following the links above. The other option is to follow the instructions below utilizing Chocolatey for a quick command line installation.
Chocolatey is a command line approach to bring package management to Window. Run the following commands from the Administrator: Windows Powershell prompt to install prerequisite software by this method:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install vcredist140 --yes
choco install notepadplusplus --yes
choco install git --params "/Editor:Notepad++ /NoShellIntegration" --yes
Several important notes:
Username
, please modify commands where appropriateC:\iblrig
and C:\iblrig_params
directories DO NOT exist; if these directories do
exist, it is recommended to back them up to something like C:\iblrig_bkup
and C:\iblrig_params_bkup
Run the following commands from the non-administrative Windows Powershell prompt
Set-ExecutionPolicy -Scope CurrentUser Unrestricted -Force
cd \
git config --global advice.detachedHead false
git clone https://github.com/int-brain-lab/iblrig
git clone https://github.com/int-brain-lab/iblpybpod
cd iblrig
git checkout tags/7.2.4
New-Item -ItemType Directory -Force -Path C:\Temp
Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe -OutFile C:\Temp\python-3.8.10-amd64.exe
Start-Process -NoNewWindow -Wait -FilePath C:\Temp\python-3.8.10-amd64.exe -ArgumentList "/passive", "InstallAllUsers=0", "Include_launcher=0", "Include_test=0"
C:\Users\<Username>\AppData\Local\Programs\Python\Python38\.\python.exe -m venv C:\iblrig\venv
C:\iblrig\venv\Scripts\.\Activate.ps1
C:\iblrig\venv\scripts\python.exe -m pip install --upgrade pip wheel
pip install --editable .
pip install --editable ..\iblpybpod
python setup_pybpod.py
cd Bonsai
powershell.exe .\install.ps1
python -c "from one.api import ONE; ONE()"
Open the C:\iblrig\iblrig_params.yml
configuration file in your favorite text editor and change the values to match your setup.
If following these instructions, the only two values that need to be updated should be:
Windows File Explorer
may prefix the local lab server address with only two backslashes, we
will need four backslashes in our iblrig_params.yml
entry.To run pybpod and begin data acquisition run the following commands from a non-administrative Windows Powershell prompt:
C:\iblrig\venv\Scripts\.\Activate.ps1
cd C:\iblrig_params
start-pybpod
If attempting to perform a manual upgrade from a previous installation of iblrig, be sure to take special note of the following files and directories:
C:\iblrig_params_bkup\.iblrig_params.json
C:\iblrig_params_bkup\IBL\boards
C:\iblrig_params_bkup\IBL\subjects
C:\iblrig_params_bkup\IBL\users
C:\iblrig_params_bkup\IBL\tasks\someCustomTask
The files themselves or some of the file content can be copied back over to the C:\iblrig_params
directory to ease
configuration time.
Within the C:\iblrig
folder there is a start-pybpod-venv_Shortcut.lnk
file that can be copied to the desktop for ease of use.
Running the following powershell command from a non-administrative Windows Powershell prompt will perform this copy operation:
Copy-Item "C:\iblrig\start-pybpod-venv_Shortcut.lnk" -Destination "$Env:HOMEPATH\Desktop"
When first running pybpod, ensure that the Bpod boards are configured for your current setup. If this was an 'upgrade'
from a previous version of iblrig, and the recommended backup operation was performed; take special note of the values within
the C:\iblrig_params\.iblrig_params.json
file. These parameters will contain the values like board name and COM ports relevant
to your system.
The 'Experiment Description GUI' is currently being developed in the iblscripts repo. This GUI is intended to simplify the
categorization of an experiment and cleanly define what projects and procedures an experiment is for. In order to add the GUI to
the tasks listed in the add_ex_desc_gui_to_tasks
script, run the following commands from the Anaconda Powershell Prompt:
C:\iblrig\venv\Scripts\.\Activate.ps1
git clone https://github.com/int-brain-lab/iblscripts C:\iblscripts
pip install -r C:\iblscripts\deploy\project_procedure_gui\pp_requirements.txt
Within whichever custom task you would like to test this gui, simply add the following lines to _iblrig_tasks_customTask.py
C:\iblrig_params\IBL\tasks\_iblrig_tasks_customTask\_iblrig_tasks_customTask.py
from iblrig.misc import call_exp_desc_gui
call_exp_desc_gui()
This repository is adhering to the following conventions:
Please review these conventions to more easily contribute to the project.
new_feature
branch is forked from the current develop
branchnew_feature
branch is then merged back into the develop
branchnew_feature
branch will eventually be deletedrc
branch is a "pre-release" branch for beta testers on production rigsrc
branch is forked from the develop
branchrc
has been thoroughly tested, it will be merged into master
and develop
rc
branch will eventually be deletedhotfix
or maintenance
branch is forked from master
master
and develop
hotfix
branch will eventually be deletedIn the root of the repository is a file called iblrig_params.yml
. To more easily develop on this repository, perform the
following:
iblrig_params.yml
file in the same root directory, but called iblrig_params_dev.yml
iblrig_local_data_path: "C:\\iblrig_data"
could become iblrig_local_data_path: "/home/username/my_iblrig_local_data"
Note: during the ci tests of GitHub Actions, a similar file is created called iblrig_params_ci.yml
; this is used to accommodate
the difference in directory structure that this system uses
Instructions are for the assumption that this is for development and that the desired directory to work out of is
~/Documents/repos/iblrig
Installing from deadsnakes repo:
sudo apt install build-essential --yes
sudo add-apt-repository ppa:deadsnakes/ppa --yes
sudo apt update --yes && sudo apt upgrade --yes
sudo apt install python3.8 python3.8-dev python3.8-venv python3.8-tk --yes
python3.8 -m ensurepip --default-pip --user
python3.8 -m pip install --upgrade pip --user
Testing python3.8 venv functionality:
python3.8 -m venv test_venv
source test_venv/bin/activate
python --version
which python
python -m pip install --upgrade pip wheel
deactivate
rm -rf test_venv
Disable Microsoft Store associations with python
command
If the visual stimulus appears on the wrong screen:
F11
on the keyboard will unmaximize the window; allowing movement of the stimulus to the correct screen C:\iblrig_params\.iblrig_params.json
; within that file is a variable called
DISPLAY_IDX
, its value will be set to 0 or 1. If the stimulus screen initially launches on the wrong monitor (PC screen instead
of iPad screen), then change the value of DISPLAY_IDX
. Change it to 0 if it was on 1, change it to 1 if it was on 0.
After migrating to v7 of the iblrig software, some may encounter a ModuleNotFoundError: No module named 'iblrig'
error when
attempting to run their custom tasks. This has to do with the way that pybpod calls python in the pre and post commands. Within
the C:\iblrig_params\custom_path\tasks\my_custom_task\
directory, there should be a my_custom_task.json
file. If this file
contains any calls to a specific python executable, they must be updated to C:\iblrig\venv\Scripts\python
.