MINI2P_toolbox/Software/AnimalTracker/
AnimalTracker.vi is a Labview program for recording animal behaviors, and synchronizing the tracking to the MINI2P imaging using a Basler camera. Currently, it was well validated by using camera acA2040-90um-NIR (https://www.baslerweb.com/en/products/cameras/area-scan-cameras/ace/aca2040-90um/). More validation will be published soon.
- Basler camera (recommend: aca2040-90um);
- Basler camera I/O cable;
- Basler cable USB 3.0 Micro B;
- NI-MAX(20.0 or newer)
- Labview(2020 or newer)];
- NI-IMAQ; 3.1) NI-IMAQmx; 3.2) NI-IMAQdx;
- (optional)Pylon (6.2.0 or newer);
To establish the correct camera wiring, first select Pins 2 and 5 of I/O cable which are Opto-coupled I/O input line and its ground, respectively. On the I/O cable, pins 2 and 5 are assigned as Pink and Grey, respectively. Link them with a BNC connector and plug the I/O cable from the camera to the vDAQ frame clock channel (one of the digital channels, in this case D3.7). See Fig. (1) for illustration.
The Basler camera is working in External Trigger Mode, meaning it starts as soon as it gets a signal (0-5V) via input cable from the vDAQ (Start focus or grab in Scan Image, which sets up the Animal Tracker).
The necessary drivers are those mentioned in Software Requirements from NI-MAX and NI-IMAQ. Pylon drivers are not needed, unless one wishes to visualize the camera using Pylon Software. In that case, USB 3.0 drivers should be installed.
To start-up, open the Virtual instrument application (.vi file) entitled "AnimalTracker.vi", and a graphical user interface will display as follows:
![Schematic of Animal Tracker GUI overview] (https://github.com/kavli-ntnu/MINI2P_toolbox/blob/4a45033ba603d2f39251690c86131b548938de0d/Software/AnimalTracker/AnimalTracker-overview.png)
- On the same Directory where the imaging files are going to be saved, create an empty text file (in this case, "1.txt").
- On the top left panel (see nr 1), select that text file created.
- Chose Trigger Mode "External" and update frame rate (14.5 Hz) as well as other parameters as shown.
- Finally, on the left bottom part, choose the camera type "1" for bottom and "2" for Top, and other relevant information which is going to be attached to a .csv file as: