EthoVision XT - Other Conditioning Tests
Last updated: Jul 25, 2026
Other Conditioning Tests
Introduction
EthoVision XT can be used in learning tests, such as the water maze
test (see Chapter 3 The Morris Water Maze Test) and the conditioning
tests (e.g., Pham et al., 2009). The Trial and Hardware Control module of EthoVision XT can be used to operate hardware devices to be used in both classical and operant conditioning tests. In the latter, an action of the animal produces a result, for example, pressing a lever results in the food dispenser dropping a food pellet. This and other hardware actions (such as, turning on a light when the animal enters the shelter, or closing the door of a radial maze when the animal has exited that arm) can be operated through the Trial and Hardware Control in EthoVision XT. Learning can be demonstrated by a change in the frequency of the animal's action over time. For example, when the animal is presented with an aversive stimulus every time it performs a certain action, the performance of the action will likely decrease over time because the animal tries to avoid the negative stimulus. To be able to operate hardware devices with EthoVision XT you need:
The Trial and Hardware Control module. This module allows you to
control hardware devices from within EthoVision XT.
The USB-IO Box. This is the device that connects the EthoVision XT
PC with external hardware devices such as the sound and light devices of PhenoTyper or a third-party hardware device. This document describes how to set up EthoVision XT using Trial and Hardware Control in an operant conditioning test in PhenoTyper.
PhenoTyper
PhenoTyper is an instrumented cage to measure and test the behavior of laboratory rodents. See the following web page: more information on PhenoTyper. s If you want to use EthoVision XT to operate a third-party hardware device, please contact Noldus Information Technology To see how a test with PhenoTyper is carried out in EthoVision XT, see
the sample experiment PhenoTyper hardware XT175 on the downloads
section of the Noldus website (my.noldus.com). In EthoVision XT,
choose File > Restore Backup and select this file. See also the document
Description of sample experiments of EthoVision XT.pdf for more
information.
Fear Conditioning test
The fear conditioning test uses a classical conditioning paradigm; an initially neutral stimulus (for example, a sound or light cue) is paired with an aversive stimulus (for example, a shock or loud noise). Eventually, it is investigated to what degree the neutral stimulus can elicit a state of fear. In the fear conditioning test, you can use EthoVision XT to automatically detect freezing behavior as a measure of conditioned fear. For details, see page 177.
References
Liu, W., Wang, X., Zhang, R., and Zhou, Y. (2009) Effects of postnatal exposure to methylmercury on spatial learning and memory and brain
NMDA receptor mRNA expression in rats. Toxicology Letters, 188, 230-
235. Pham, J., Cabrera, S.M., Sanchis-Segura, C., and Wood, M.A. (2009) Automated scoring of fear-related behavior using EthoVision software. Journal of Neuroscience Methods, 178, 323-326. s
Physical setup
The following suggestions are meant to optimize tracking: The camera should have a good view of the entire region the animals can be in (for zones like the shelter where the animal is not visible, you can define hidden zones). The lighting should be as even as possible throughout the arena and should be diffuse, so as not to cast strong shadows (which might be tracked instead of the animal). The background should contrast with the animal. If necessary use a different setup for light and dark colored animals. Either make sure the sides of the box are not reflective (e.g., sanding), or exclude the sides from the arena. If your objects are close to the sides then you will need to track the animal when it is against the side (so the camera sees the side instead of the base behind the animal). If you want to use Deep learning technique to track the subject's nose, keep in mind that there are additional requirements. Among
other things, you need a powerful graphics card. See Deep learning:
Requirements and Limitations in the EthoVision XT Help.
For more information
About PhenoTyper: see the PhenoTyper - EthoVision XT 17 - Reference Manual.
A conditioning test in EthoVision XT
Create an experiment. For details, see Chapter 1 of this manual, or in
EthoVision XT press F1 and see Setup an Experiment in the EthoVision
XT Help. In the following sections we assume that you created an experiment using the PhenoTyper arena template.
experiment settings
- Make sure that the PhenoTyper cages are connected to the EthoVision XT PC. See the PhenoTyper - EthoVision XT 17 - Reference Manual for how to connect PhenoTyper to EthoVision XT. Connect a third-party hardware device, which can be controlled by TTL, to one of the TTL control ports on the USB-IO Box.
- Open the experiment and choose Setup > Experiment Settings.
- Check that the correct cameras are selected under Video source. The procedure depends on the type and number of cameras.
- One PhenoTyper. Select this camera and specify a saving source if you track live and also want to record a video.
- Four or sixteen PhenoTypers with a quad unit. Select the output of the quad unit and specify a saving source if you track live and also want to record a video. Do not use a mixed image of sixteen PhenoTypers if you want to carry out nose-point, center-point, and tail-base tracking.
For how to set up connections, see Camera installation in the
EthoVision XT Help. - Four PhenoTypers without a quad unit. Select the number of cameras and select the cameras from the lists under Source. Select whether the resolution of the mixed image should be the same as the individual images, or the sum of that from the mixed images. If you also want to record video, specify that at a later stage in the Acquisition settings (see page 21). Using the images s from four PhenoTypers is only possible if you have the Picolo U8 H.264 board or the Picolo Alert board that receive the video output from the PhenoTypers. 4. If you want to use Deep learning technique to track the subject's nose, under Body point detection technique choose Deep learning. Note that in order to use this technique there are additional requirements. Among other things, you need a powerful graphics
card. See Deep learning: Requirements and Limitations in the
EthoVision XT Help. 5. Under Analysis options, select Activity analysis if you are interested in freezing behavior. 6. Next to Hardware, select Use of Trial Control Hardware and click Settings. 7. Select Noldus USB-IO box in the window that opens and click OK. 8. In the Port Device Mapping window, locate the row 'SDI Port 13' and
check that under Device Type, Top Unit Interface PTTI-0010 is
selected. Top Unit (Standard) should be selected for each
PhenoTyper that you connected to the Top Unit Interface. If you have connected a third-party hardware device to, for
example, TTL control port 1 on the USB-IO Box, in the Port Device
Mapping window, locate row 'TTL Port 1', under Device Type, select
Custom Hardware and enter a Device ID (for example, 'buzzer') for
this port. 9. Click OK.
For more information about setting up an experiment, see Set Up an
Experiment in the EthoVision XT Help. s
arena settings
Choose Setup > Arena Settings > open Arena Settings 1. We assume that you followed the general procedure on page 15.
Click the Arena - hardware mapping button at the bottom of the Arena
Settings pane (see Figure 11.1). If you only have one arena, the hardware will be assigned to this arena automatically. If that is the case, proceed with Trial Control Settings on page 227.
In the Arena - Hardware Mapping window, click Add Device for each
device you want to add: Figure 11.1 The Arena Settings pane. In this example, Arena 1 contains four pre-defined Zone groups: Feeding zones, Spot light zone, Floor zone and a Hidden In shelter zone. s For PhenoTyper - Under Device Type, select Top Unit (Standard).
Enter Device Name PhenoTyper and the corresponding Top Unit
(Standard) # for each Arena (Figure 11.2).
For a third-party hardware device - Under Device Type, select
Custom Hardware. Enter a Device name and select a device from
the list for each Arena. Click 4. Validate Setup to validate the Arena Settings.
trial control settings
With the Trial and Hardware Control add-on module in EthoVision XT, you can control PhenoTyper and third-party devices in a variety of ways. For example: Start recording when the animal is detected on top of the shelter. Stop recording when the animal has performed a specific task 50 times. When the animal sits on the shelter, drop a food pellet. Repeat this task 25 times. The template experiment contains two trial control profiles: Default - The default Trial Control Start-Stop rule.
Max. Trial duration 24 hrs - In this profile, a trial stops after 24
hours.
Maximum trial duration (tested)
Without video recording: 72 hours.
Figure 11.2 Part of the Arena - Hardware Mapping window. In this example, two
devices have been added: one PhenoTyper and a 'custom' Buzzer. s With simultaneous video recording: 3 hours. If you need to record video of the same subject for more than three hours, we recommend that you make a series of trials. Below you find a few examples of Trial Control Settings. Modify the Trial Control Settings to suit your own application.
Procedure overview
- The trial starts with a 30-second delay (See Start trial rule and Condition 'Start delay' below).
- Next, as soon as the mouse enters the LightSpot zone, with both the nose- and center-point, the spotlight of the PhenoTyper is turned on. When both the nose- and center-point are not in the LightSpot zone, the spotlight is turned off. This sequence is repeated three times (see Sub-rule 'Activation LightSpot' on page 229).
- After the Sub-rule is completed, the trial is stopped after a 5-second delay. Choose Setup > Trial Control Settings > New and give this a new name.
Start trial rule
- To start recording as soon as the Start trial button is clicked:
- Click the (default) Condition In zone box and press Delete. Keep this Condition if you want to start recording some time after starting the trial.
Condition 'Start delay'
- To insert a 30-second delay, after recording has started:
In the Components pane, under Conditions, double-click the Time
Condition or click the button next to it.
b In the Time condition window, type 'Delay of 30 seconds' in the
Condition name field. In the Condition is met: group, select After
a time of 30 secs. Optionally, enter a comment and click OK. s Insert the Condition box into the main sequence. For more information about Conditions, see the EthoVision XT 17 - Trial and Hardware Control - Reference Manual.
Sub-rule 'Activation LightSpot'
- Because the sequence of turning on/off the spotlight depending on whether the animal is inside/outside the Spot Light Zone is repeated three times, you need to create a Sub-rule for this:
In the Components pane, under Structures, double-click Sub-rule
b In the Sub-rule window, type 'Anxiety Test' in the Sub-rule name
field. Optionally, enter a comment and click OK. 4. Create an In zone Condition for when the animal enters the Spot Light Zone:
In the Components pane, double-click the In zone Condition or
b In the In zone Condition window, type 'Inside LightSpot' in the
Condition name field.
In the Condition is met when: group, from the Statistic list, select
Frequency.
Next, click the Settings button, select zone Spot Light from In the
following zones, and select When in any of the selected zones
from the list.
In the From the following body points group, select both Nose-
point and Center-point. Make sure to select All selected points
from the list. d Click OK. Insert the Condition box into the Sub-rule sequence. 5. Create a Hardware Action (White Light on) for when the previous Condition is met:
In the Components pane, under Actions - Hardware double-click
Top Unit (standard) or click the button next to it. If a third-party device has been connected (see step 4 on page 225), under Actions - Hardware double-click Custom Hardware. b Next to Action name, type in "White Light on".
Next to Action to perform, select White spot on from the list and
click OK. d Insert the Action box into the Sub-rule sequence. If a third-party device has been connected, select an action from the Custom Hardware. 6. Create an In Zone Condition for when the animal leaves the Zone LightSpot:
In the Components pane, double-click the In zone Condition or
b In the In zone Condition window, Type Outside LightSpot in the
Condition name field.
In the Condition is met when: group, from the Statistic list, select
Frequency.
Next, click the Settings button, select zone Spot Light from In
the following zones and select When not in any of the zones. s
In the From the following body points group, select both Nose-
point and Center-point. Make sure to select All selected points
from the list at the bottom. d Click OK. Insert the Condition box into the Sub-rule sequence. 7. Create a Hardware Action (White spotlight off) for when the previous Condition is met:
In the Components pane, under Actions - Hardware double-click
Top Unit (standard) or click the button next to it. b Next to Action name, type in White Light off.
Next to Action to perform, select White spot off from the list and
click OK. d Insert the Action box into the Sub-rule sequence. If a third-party device has been connected, select an action from the Custom Hardware. The Sub-rule Anxiety Test is now completed (see Figure 11.5).
Sub-rule Reference 'Start Anxiety Test'
- To create a Reference in the main sequence to the Sub-rule LightSpot:
In the Components pane, under Structures, double-click Sub-rule
reference or click the button next to it. b Next to Reference name, type Start Anxiety Test. Next to Reference to sub-rule, select Anxiety Test.
d Next to Stop Conditions, select Repeat per start condition. Select
for a number of ... times and set it to 3. Click OK and insert the Reference box into the main sequence.
Figure 11.5 The Sub-rule 'LightSpot' with the sequence as describe above in
steps 4-8. s
Condition 'Stop delay'
- To insert a 5-second delay, before the trial is stopped:
In the Components pane, under Conditions, double-click the Time
Condition or click the button next to it.
b If the Add a condition window appears, it means that there is at
least one condition of the same type in your experiment. You are asked to choose between creating a new condition, or re-use an
existing one. Choose the option you require and click OK. If this
window does not appear, skip this step.
In the Time condition window, type 'After 5 seconds' in the
Condition name field. In the Condition is met: group, select After
a time of 5 secs. Optionally, enter a comment and click OK. d Insert the Condition box into the main sequence. Figure 11.6 shows the complete Trial Control Settings.
For more examples
For more examples of tasks executed with the PhenoTyper, see the PhenoTyper - EthoVision XT 17 - Reference Manual.
Figure 11.6 The Trial and Hardware Control. The main sequence is displayed at
the top, the Sub-rule sequence at the bottom. s
detection settings
Choose Setup > Detection Settings > open Detection Settings 1. We assume you followed the main procedure on page 17. 1. Check in the Video Section that the sample rate is set to: - Rats: 5 samples/second. - Mice: 12.5 samples/second. - Nose-tail tracking: 25-30 samples/second. 2. Under Method, choose your detection method and the contrast with the background. If you selected to use the Deep learning technique to track the
subject's nose, next to Deep learning click Define and select a box
around the subject. Make sure that the box includes the subject's nose, and does not include objects of the same color as the subject. For details, see the EthoVision XT Help. 3. If you selected Activity analysis in the Experiment settings, open the
Activity section in the Detection Settings pane. Enter the Activity
threshold for detecting a change in the pixels in the arena. Start with the default value and check the purple-colored pixels in the video image. Adjust the threshold in such a way that when the animal is completely still, those pixels should be almost completely absent. Leave the Compression artifacts filter Off if you track live.
trial list
Enter your independent variables such as rat ID, first or second phase of the experiment, treatment (drug vs. control), dose, duration of treatment, name of the experimenter, etc. If you want you can pre- define all your trials here, or you can enter the independent variable values as you carry out the trials. You can also prepare the trials in Excel, randomize them and then paste the values into your Trial List. To carry out batch acquisition, plan your trials in the Trial list.
Optionally select Arena Settings, Trial Control Settings and Detection
Settings for each trial. If you do not select these settings in the Trial list,
the ones selected in the Acquisition settings pane (see next section)
will be used for all trials. For data acquisition, see acquiring tracks on page 21. Figure 11.7 A Trial List with two planned trials. Each trial includes four arenas (four PhenoTypers combined with a quad unit). s
Data analysis
data preparation
There are four optional steps you can take to prepare your data:
Data editing
Choose Acquisition > Edit Tracks. You can fix tracking errors and swap back nose-points and tail-points that have been swapped in tracking. Normally you will not need to edit your data.
Smoothing the tracks
Choose Acquisition > Track Smoothing Profile.
You can use Smoothing and/or the Minimal Distance Moved filter to
remove outliers from your data and correct the distance moved calculation as a result of body wobble.
Selecting data
Choose Analysis > Data Profile. Select your tracks according to your independent variable values and also select parts of tracks (nesting). You can also make groups of tracks
to obtain group statistics. And you can define Time bins (see data
selection below). s
data selection
Groups of tracks
Figure 11.8 shows a Data Profile to compare the animals that were treated with a drug, with those that were treated with saline. This way you create groups of tracks to obtain group statistics for each group.
Time bins
Using time bins means that you create time intervals of constant duration to analyze how variables change over time. The default data selection does not specify time bins, so the behavior will be analyzed as a whole. If you define time bins and specify an interval length of, for instance, 1 minute, you can investigate whether a specific behavior changes over time. To define time bins: 1. From the Analysis menu, select Data Profile. 2. Select New and type in Time intervals. 3. Click the Settings button on the Result box.
Figure 11.8 An example of data selection to compare two data sets in your
experiment. s 4. Select Results per time bin and enter the length of one interval, for example 30 s or 1 minute depending on the duration of your experiment. The data will be split in a number of intervals of the same length. When the track duration is not an exact multiple of the time bin that you set, the last time bin is shorter than the others. To ignore this time bin, select Ignore last time bin if incomplete. 5. Click OK. If the white spotlight is aversive to the animal, the time spent in the Spot Light zone should decrease in the course of the trial. In contrast, the time interval between consecutive entries into Zone LightSpot should show an increase. Via data analysis in EthoVision XT, this can be investigated.
analysis profiles
If you have multiple Data Profiles, make sure the Data Profile without Results per time bin is active. Below is described how to create the In Zone and Trial Control analysis profiles for a PhenoTyper experiment. 1. Choose Analysis > Analysis Profile.
In Zone
- Select New and type in In Zone.
- The new Analysis Profile contains the default dependent
variables Distance moved and Velocity. Click on a dependent
variable and press Delete to remove it. 3. Click the Add button next to In Zone.
Under In the following zones, select Spot Light. Under From
following body points, select both Nose-point and Center-point
and select All selected points from the list at the bottom. b In the Trial Statistics tab, select Mean, Frequency and Duration.
Select additional statistics In the Group Statistics tab, if you
created groups of tracks in your Data Profile. s d Click OK.
Trial Control
- Choose Analysis > Analysis Profile > New and type in Trial Control.
- The new Analysis Profile contains the default dependent
variables Distance moved and Velocity. Click on a dependent
variable and press Delete to remove it. 5. Click the Add button next to Trial Control State.
From the From Element list, select Rule: Anxiety Test. From the
From Event list, select becomes active.
b From the to Element list, select Action: Light on. From the to
Event list, select becomes active.
Select Calculate statistics per interval, for consecutive intervals: 1
to 3. d In the Trial Statistics tab, select Cumulative duration.
Select additional statistics in the Group Statistics tab, if you
created groups of tracks in your Data Profile. Click OK.
g Right-click Trial Control State, select Rename and type "Interval
in Spot Light zone". This variable measures the time till the next instance when the mouse enters the light spot. This is done for each repeat of the learning routine. 6. Click the Add button next to Trial Control State.
From the From Element list, select Action: White Light On. From
the From Event list, select becomes active.
b From the to Element list, select Action: White Light off. From the
to Event list, select becomes active.
Select Calculate statistics per interval, for consecutive intervals: 1
to 3. d In the Trial Statistics tab, select Cumulative duration.
Select additional statistics in the Group Statistics tab, if you
created groups of tracks in your Data Profile. Click OK. s
g Right-click Trial Control State, select Rename and type "Duration
Light on". This variable measures the time that the mouse stays in the light spot in each repeat of the learning routine. 7. Click the Add button next to Trial Control Event. From the From Element list, select Action: White Light On. b From the From Event list, select becomes active. In the Trial Statistics tab, select Frequency.
d Select additional statistics in the Group Statistics tab, if you
created groups of tracks in your Data Profile. Click OK.
Right-click Trial Control Event, select Rename and type Frequency
light on. This variable measures the number of times that the light is switched on.
More options with the Free interval function
The Free interval function in the Data profile and in the Analysis profile allows you to extend the possibilities to define the start and the end of intervals. For example, from the time a stimulus event occurs, to 10 seconds after that event. 1. Choose Analysis > Analysis Profile. 2. Under Miscellaneous, click next to Free Interval. For details, search the EthoVision XT Help for "Free interval".
integrated visualization
When you Plot Integrated Data, the video file and the Time Event Plot are displayed. The Time Event Plot displays the variables of the active Analysis Profile. s
Figure 11.9 shows the variables defined in the Analysis profile Trial
Control described above, plotted against time. Figure 11.9 The Integrated Visualization for the an Analysis profile containing Trial Control variables. The Time Event Plot shows (from top to bottom) Duration
Light on, Frequency Light on and Interval in LightSpot, all for each arena
separately. The vertical line shows the current position in the Time Event Plot and the video window displays the corresponding frame in the video.
Source: EthoVision XT 17.5 Application Manual, Other Conditioning Tests