EthoVision XT - 6 Conditions
Last updated: Jul 25, 2026
6 - Conditions
6 Conditions
A condition can be based: On Time (see below) or a Time interval (see page 69). On a Trial Control variable (see page 71). On a Dependent variable like Distance moved, In zone, Mobility, etc. (see page 72). A combination of dependent variables, like "is the subject moving above a certain speed and is it in a certain zone?" (See page 101. On a Manually-scored behavior (see page 78). On a Hardware device (see page 79).
conditions based on time
With a Time condition, some time must elapse before the next Trial Control box is evaluated. 1. In the Components pane, under Conditions, double-click Time or click the button next to it. The Time condition window opens. 2. Under Name, enter a Condition Name. 3. Select one of the following options: After. To have an action been taken some time after the condition becomes active. For the meaning of condition becoming active, see page 11. example Start tracking after two seconds.
After a random time. To have an action been taken with a delay chosen randomly
between two time limits. Enter the lower and higher limits and choose the time unit (seconds, minutes or hours). The random value is counted from the moment the condition becomes active. 6 - Conditions Choose this option when programming rewards in a variable interval schedule.
example When a random time between 10 and 30 seconds has elapsed (condition),
drop a food item (action). At clock time. To have an action been taken at an absolute time (hh:mm:ss). example At 12:00 AM (condition), start tracking (action). note If you want start tracking at 12:00 AM of the next day, and you click Start Trial in the afternoon of the current day, EthoVision XT starts tracking immediately because it sees that the condition 12:00 AM has been met already. For how to solve this, see the topic Start and stop the trial at specific clock times in the EthoVision XT Help. Infinite time (condition never met). To wait indefinitely (see the note below). 4. Insert a Comment (optional) and click OK. 5. The Condition box appears in the upper-left corner of the Trial Control screen. Insert it in the appropriate position in the Trial Control sequence. For information on how to insert a Trial Control box, see the EthoVision XT Help.
Notes
If you want to stop a trial after a specific time has been reached, see page 21. If you track from video files, see the note Tracking from video files under apply trial control to your trials on page 45. Figure 22 The Time condition window. 6 - Conditions The format for clock time is hh:mm:ss where: hh = hours, 24-hour format with leading zero, mm = minutes with leading zero, ss = seconds with leading zero. If you choose clock times, be aware of changeover between wintertime to summertime and vice versa. For example, the time 02:30:00 is encountered twice on the day of onset of wintertime, or never on the day of onset of summertime.
The Infinite time option is handy in the following cases:
When you want to stop tracking manually. Place the resulting box immediately to the left of the Stop track box. When two sequences have been placed in parallel, and you want the program to take further actions when Sequence 1 has been completed, independent of Sequence 2. Place a Time condition with the Infinite time option immediately to the right of Sequence 2. Combine Sequence 1 and the Time box with an Any operator (see page 34). important If you combine an Infinite time condition with an All operator, the program does not go further in the Trial Control rule, as it waits forever for the condition to be met!
conditions based on a time interval
A Time interval condition makes sense when it is combined with another condition. For example: Take an action when the animal is found in Zone A (In zone condition) between 5 and 10 minutes (interval condition). 1. In the Components pane, double-click Time interval or click the button next to it. The Time interval Condition window opens (see Figure 23). 2. Under Name, enter a Condition Name. 3. Condition is met: Between. Define an interval between two time points (x and y seconds, minutes or hours). Enter the time values and choose the time units. Note: The time points are counted from the time that the condition box becomes active, not from the start of the trial or tracking. For the meaning of active, see page 11. Between clock times. Define an interval between two absolute time points, e.g., in the previous example, stop the track when the rat is in quadrant A between 12:00:30 and 6 - Conditions 12:01:00. The time format is hh:mm:ss where hh = hours, 24-hour format with leading zero, mm = minutes with leading zero, ss = seconds with leading zero. 4. Insert a Comment (optional) and click OK. 5. The Condition box appears in the upper-left corner of the Trial Control screen. Insert it in the appropriate position in the Trial Control sequence. For how to do this, see the EthoVision XT Help.
Notes
Combining Time interval and Zone conditions. In a conditioning experiment, the
researcher wants to drop a food reward when the animal is found on its shelter some time between 30 s and 60 s from the previous action (for instance, a cue light being switched on). To do this, a Time interval condition must be defined that specifies the interval between 30 s and 60 s. This condition must be met at the same time as the condition "subject on shelter" in order to drop a food pellet. Therefore, the two condition boxes must be placed in parallel with an operator of type All. Be aware when using Time interval conditions combined with operators or type All. If the animal enters a zone after the upper time limit, the condition is never met, thus Trial Control does not progress. Figure 23 The Time interval condition window. 6 - Conditions
conditions based on a trial control variable
A condition based on a Trial Control variable is essentially the comparison between a Trial Control variable and a value, another variable or a formula at the time the condition becomes active and is evaluated (for the meaning of becomes active, see page 11). 1. In the Components pane, under Conditions, double-click Trial Control variable or click the button next to it. tip If you do not see Trial Control Variable, click the More button. 2. In the Trial Control Condition window, under Name, enter a Condition Name. 3. Under Condition is met when, select the Trial Control variable from the first list. If the variable has not been defined yet, define it first by clicking Variables (see page 28). 4. Select the comparison operator (=, >, etc) from the second list. 5. Do one of the following: To compare the Trial Control Variable with another variable, or a numerical value, select that variable/value from the third list. To compare a Trial Control variable with a formula, click the double-arrow button and select the operator, then complete the formula in the next list. For example: important Be careful using the operator "=". The comparison only takes place when the condition box becomes active. If the variable is updated in other boxes, then it may be so that this condition box is activated too early or too late. For example, if the condition is met when A= 4 and an Action box set the value to A= 5 before the condition box is activated, then the condition is never met. Rather use ">=" or "<=". 6. Insert a Comment (optional) and click OK. 7. Insert the Condition box in the appropriate position in the rule. For information on how to insert a Trial Control box, see the EthoVision XT Help. 6 - Conditions
conditions based on a dependent variable
- In the Components pane, under Conditions, double-click the name or click the button next to the dependent variable the condition is based on. For details about dependent variables, see page 84. tip If you do not see the variable name, click the More button. note The following variables are not available for creating conditions: Acceleration state, Activity state, behaviors scored with Behavior recognition.
- In the condition window, under Name, enter a Condition Name. Under Comment (at the bottom) enter a description (optional).
- Under Condition is met when, from the Statistic list choose the statistic on which the condition is based. See 'Selecting the Statistic' below.
- Click the Settings button. A window opens with the variable properties. For the corresponding variable, see also page 84. If you track multiple subjects in one arena, see also Selecting the subjects on page 75. When finished, click OK in the variable window.
- From the list next to is:, choose the comparison >=, =, or <=, to specify whether the statistic must be greater than, equal to, or smaller than a value x. Enter this value in the box. If you have chosen Current as a Statistic (step 3) for a discrete variable, choose between true and false. True means that the current state must be the one chosen in Settings, False means that the current state must not be the one chosen in Settings.
- Click OK. Insert the Condition box in the appropriate position in the rule. For information on how to do this, see the EthoVision XT Help. The Body Points tab in the variable properties window is only available if your experiment is set to Nose-point, center-point and tail-base detection.
Select the statistic
Current. The value of the variable in the current sample. 6 - Conditions For example, if a condition based on Velocity is evaluated at sample n, Current is the velocity calculated for sample n. If you rather want to base the condition on the average velocity from the time of activation of the condition to the current time, choose Mean. The remaining statistics below are based on the values of the variable from the time the condition becomes active (see page 11 for what active means). Total. The total value of the variable (only for continuous variables like Distance or Velocity). This is the sum of all values of the variable up to that time. Mean. The mean value of the variable (only for continuous variables like Distance or Velocity) up to that time. Statistics like Minimum, Maximum, Standard error, Standard deviation and Variance are normally less obvious to use in a condition. For example, if you select Standard error for Distance moved, the program calculates the standard error of all distance values calculated between consecutive samples of the track up to that time. The condition is met when the standard error is greater than/equal to/less than the value specified. Frequency. The number of occurrences up to that time. This statistic is available for discrete (state) variables like Movement, and count variables like Rotation and Zone transition. Choosing >= or <= for frequency only makes sense when you combine the condition with another condition. Cumulative duration. The cumulative duration of a state from the start of tracking up to that time. You choose the state when clicking the Settings button. This statistic is available for discrete variables. Current duration. The duration the animal has been in that state (for example, in a specific zone or Mobile) taking only the current (uninterrupted) interval into account. You choose the state when clicking the Settings button. This statistic is available for discrete variables. Latency to first. The time from the activation of the condition to the first occurrence of the state of the discrete variable (for example In the zone becomes true for the variable In zone), or count variables like Rotation, or Zone transition. You choose the state when clicking the Settings button. A condition like Latency >= L or Latency <= L does not mean that the condition is met at time L if the first state, or occurrence does not occur within that time. The program first calculates when the first state or occurrence occurs, and then compares this with L. 6 - Conditions The following cases are an example of Latency to first In zone with L > 0 (see Figure 24, left). Once the condition becomes active, latency can get only one value, which is the time of the first In zone state: Case 1. The subject is already in the zone when the condition becomes active. The condition is NEVER met because latency of the first In zone is 0, thus smaller than L. Case 2. The subject enters the zone after the condition becomes active, but at a time < L. The condition is NEVER met because the latency is smaller than L. Case 3. The subject enters the zone after time L. This means that the latency of the first In zone is greater than L. The condition is met at that time. Case 4. The subject never enters the zone. The condition is NEVER met. Case 5. The subject enters the zone at a time < L, then exits the zone, then enters again at a time > L. The latency of the first In zone state is < L, thus the condition is NEVER met, no matter of how many times the animal enters the zone.
Figure 24 Five possible cases of outcome of a
condition based on Latency. This example refers to a state variable like "In zone", which has two possible states, In zone and Not in zone. The condition is met when Latency to first In zone
=L (where L is the value set). A - Time of activation of the condition (see the picture on page 9 for the concept of activation). L - Latency set in the condition window. 6 - Conditions As you can see there are many cases in which the condition is never met, including Case 5 which is due to the fact that only the first instance of In zone is taken under consideration.
subjects in a condition
Select the subjects
- In the Condition window, click the Settings button. In the variables properties window, click the Actors tab. In the Actors tab, you select the actors of the behavior.
- Under Select, select the subject you want to base your condition on. If your condition is based on social interactions, select the focal subject in the Actors tab and the other subjects in the Receiver tab. Do so also for dyadic interactions (Subject 1 under Actors, Subject 2 under Receivers), For dependent variables with discrete values like In zone, Movement, Mobility, Elongation, Proximity, Body contact and Relative Movement, you can base your condition on the state of multiple subjects at the time the condition is evaluated. If you select two or more subjects, select one of the two options from the list
immediately below the Select box:
All selected Subjects. The state selected in the dependent variable properties window must be the same for all the actors simultaneously, in order for the condition to be met.
Any selected Subjects. The state selected in the dependent variable properties
window must be true for at least one actor in order for the condition to be met. 3. If the Actors tab also contains the Body points options, select one or more body points of the subjects selected above. 4. For the dependent variables of social interaction, a Receivers tab is also available. Click this tab and select the subjects that you have not selected under Actors (see an example below). 5. Click OK to confirm your selection. You return to the condition window (see page 72). 6 - Conditions
Notes
Example of choosing All selected Subjects. The researcher wants to define a In zone condition that is met when the subjects Subject 1 and Subject 2 have been in a zone simultaneously for at least one minute. Solution: In the Condition window, select Cumulative duration as Statistic and enter >= 60 s. Click Settings and select the zone you require, then click Actors and select Subject 1 and Subject 2, finally select All selected Subjects. Example of using Any selected Subjects. The researcher wants to define a Distance to zone condition that is met when one of the two subjects is at less than 5 cm from a novel object. Solution: In the Condition window, select Current and enter <= 5 cm. Click Settings and select the novel object zone, then click Actors and select Subject 1 and Subject 2, finally select Any selected Subjects. Example with Actors and Receivers. The researcher wants to define a condition that is met when the nose point of Subject 1 has been close to at least one body point of Subject 2 for more than one minute. Solution: Click the button next to Proximity and in the Condition window, select
Cumulative duration and enter f. Click Settings, then:
In the Actors tab, select Subject 1 and de-select Subject 2. Under Bodypoints, select Nose-point only. In the Receivers tab, select Subject 2 and de-select Subject 1. Under Bodypoints, select
all points and then Any selected points, since the condition must be met when
Subject 1 is in proximity of at least one of the Subject 2's body points.
when is a condition met?
Dependent variables are calculated for each sample. When a condition based on dependent variables is met, depends on a number of factors.
Effect of outliers and track smoothing
Dependent variables used in conditions are not smoothed or filtered using the Lowess filter or the Minimum distance moved as they can be for data analysis (see Smooth the tracks in the EthoVision XT Help). This means that outliers, nose-tail swaps or even subject identity swaps can have a severe effects on whether and when a condition is met. 6 - Conditions Consider the following track, where EthoVision detects a reflection within the zone A as the subject. As a result, the track has an outlier. If an In Zone condition is defined that specifies Frequency of In zone A >=1, then the condition is met at that time (assuming that the condition box was active). Smoothing would remove the outlier, but that can only be done when analyzing the data, not when Trial Control is active (that is during acquisition). If such an effect occurs, Track noise reduction may solve the problem. This is applying the Lowess filter during acquisition. In the Detection settings, click Advanced and under Smoothing set Track noise reduction to On. This smooths the track during acquisition, which means that the track is altered, which cannot be reversed afterwards.
Effect of missing samples
Missing samples can also make Trial Control to react later. For example, an In zone condition is met only when valid samples are found within the specified zone. Consider the following track, where EthoVision misses the subject some time before it enters the zone A. The dotted line represents a number of missing samples; the hatched square is the first valid (non-missing) sample, found in the zone). If an In zone condition is defined that specifies Current of In zone A = true, then the condition is met later than it would be if there were no missing samples. Interpolating would remove the missing samples, but that can only be done when analyzing the data, not when Trial Control is active (that is during acquisition). 6 - Conditions If an In zone condition states "Cumulative duration of not in zone for more than 1 s" (here we assume that a sample rate of 5/s is used, so 5 samples make up 1 second), then the condition does not become true, because there are only 4 samples for which the state "not in zone" was true (see the 4 samples outside the zone). Similarly, the condition "Current value of In zone A = false" may become true during the state "not in zone". However, it won't become true in the period of missing samples. Below you find information on each dependent variable. We assume that the Condition window is open on your screen (step 4 on page 72).
Effect of the statistics used
When a condition is evaluated (and therefore may or may not be met) also depends on the statistic chosen. For Current, the condition is evaluated at the same sample time as when it is activated (for the meaning of "active", see page 11). For all other statistics (like Frequency, Current duration, etc.), it is evaluated at least one sample after the condition is activated. This depends on when the first value available for comparison occurs after the activation of the condition. When using Velocity, and Distance, it takes one sample. When using Heading and In zone, it takes two samples. When using Turn Angle and Angular velocity, it takes three samples.
conditions based on behaviors scored manually
Use this kind of conditions to let EthoVision XT carry out an action when the subject performed a behavior you scored manually. For example, in a social interaction test, to stop tracking when the subject attacked three times, or when the duration of Intimidation lasted more than 30 seconds. 1. In the Components pane, under Conditions, double-click the name or click the button next to the manually scored behavior you want to base the condition on. tip If you do not see the variable name, click the More button. 6 - Conditions 2. The Manual Scoring Condition window opens. Under Name, enter a Condition Name. Under Comment (at the bottom) enter a description (optional). 3. Under Condition is met when, click the Settings button. If the behavior is of the type Start- Stop or Mutually Exclusive, choose the behavior to base the condition on, for example Rear or Not Rear. 4. In the Actors tab, select the Subjects to which the condition applies. See subjects in a condition on page 75. If the Actors tab also contains the Body points options, select one or more body points of the subjects selected above. Click OK. 5. Under Condition is met when, select the Statistic you want to use. Common cases of Statistic for manually scored behaviors: Current. For a condition that is met when the behavior at the current sample is true or not true. This statistic is available for Start-Stop and Mutually exclusive events. Frequency. For a condition that is met when the behavior occurred a number of times. Cumulative duration. For a condition that is met when the animal has shown the behavior for a specific time since the activation of the condition. This statistic is available for Start-Stop and Mutually exclusive events. Current duration. For a condition that is met when the animal has shown the behavior continuously for a specific time. This statistic is available for Start-Stop and Mutually exclusive events. Latency to first. See page 73 and Figure 24 on page 74. For more information on manually scored behaviors, see the EthoVision XT Help.
conditions based on hardware devices
Use this kind of conditions to check the status of hardware devices (pellet dispensers, lickometers, etc.) and have EthoVision take actions when the conditions are met. 1. In the Components pane, under Conditions, click the button next to the hardware device you want to base the condition on. 6 - Conditions 2. The Hardware condition window appears. Under Name, enter a Condition Name. Under Comment (at the bottom) enter a description (optional). 3. Under Condition is met when, select the Template device you want to use. A template device represents a group of devices of the same type, one for each arena. For more information, see page 105. 4. Under Signal to check, select the criterion that forms the condition. 5. Under Signal value, select the value of the criterion in order for the condition to be met. 6. Click OK. Insert the Condition box in the appropriate position in the rule. For information on how to do this, see the EthoVision XT Help. Hardware devices are not defined for each arena separately. If you have a setup with multiple arenas, it is assumed that each arena has the same type of device. The name in the device list is the generic name valid for all arenas. The condition will be evaluated for each arena separately. If the device type is not listed under Conditions, it means that it is not yet recognized by EthoVision XT. See also page 104.
Pellet dispenser
Number of drops. To base your condition on whether more/less than N food items have been delivered since the activation of the condition. Choose >= or <= and enter the value N in the box. In error state. To base your condition on whether the pellet dispenser is in error state, that is, when it can no longer drop any pellet (this happens when there are no pellets anymore in the feeder). Choose between true (error) or false. example Have EthoVision XT give a sound signal when the feeder has run out of pellets.
Lickometer
Duration of licks. To base your condition on the (total) duration of licks since the activation of the condition. Enter this time in the box. Number of licks. To base your condition on the number of licks since the activation of the condition. You can select >= N, <= N or = N.
Top Unit of PhenoTyper
Choose the option under Signal to check to base your condition on whether a sound or light signal is given since the activation of the condition. For Top Unit (NeuroBsik), use Is Fsel-1/2 on/off, Is Vol-1/2 on/off to base your condition on the value of frequency or volume specified by one input. Since the frequency and volume 6 - Conditions are specified by two inputs, you must define two conditions, one for input 1 and one for input 2. Combine the two conditions with an operator of type All. note Neuro-Bsik is a consortium of eleven Dutch Neuroscience research groups and two companies including Noldus. The consortium aims to contribute to the battle against brain disorders by developing novel mouse models for brain disorders. For this project, Noldus has developed a special Top Unit of the PhenoTyper cage that can produce ultrasound stimuli. For more information, browse to www.neurobsik.nl. For more information, see the PhenoTyper - EthoVision XT 17 - Reference Manual.
TTL Port Tester
Beam controller
Beam 1/2 breaks.To base your condition on the number of beam breaks for beam 1 or 2 since the activation of the condition. You can select either >= N,<= N, or =N. Enter the value N in the box. Is Beam 1/2 broken?. To base your condition on whether beam 1 or 2 is currently broken. Select True or False from the Signal value list. Is cue 1/2 on?. To base your condition on whether the cue 1 or 2 is currently on. Select true or false from the Signal value list.
Activity wheel counter
Quarter cycles.To base your condition on the number of quarter cycles since the
activation of the condition. You can select either >= N,<= N, or =N. Enter the value N in the box.
Custom hardware device
This includes the illuminated shelter. Input 1/2 L/H -> H/L count. To base your condition on how many times there has been a transition from High to Low (or vice versa) in input 1 or 2 during the time t-1 to t, where t 6 - Conditions is the sample time when the condition is evaluated. Choose the option that applies, select either >= N or <= N. Enter the value N in the box. This option let you create a condition based on events (transitions) in the signal, no matter when they happen during the sample time. See the note below. Is input 1/2 High/Low?. To base your condition on whether the current state of input 1 or 2 is High or Low at the sample time when the condition is evaluated. Select the option that applies, and then either true or false. Is output 1/2 High?. To base your condition on whether the current state of output 1 or 2 is High at the sample time when the condition is evaluated. Select the option that applies, and then either true or false. This option evaluates the state of the signal (High vs Low) at the sample time when the condition is evaluated. If a quick transition High -> Low -> High occurs within the sample interval, this is not noticed; the state at the sample time is still High. See the note below.
Counts vs. signals: effects on conditions
Consider the two conditions based on the same input (for example Input 1):
Is the number of transitions H->L ≥ 1?
Is the state of the signal Low?
There is a fundamental difference between the two conditions. In the first condition, the software counts the number of transitions "Hight" to "Low" during the sampling interval (that is, from t-1 to t). The condition may become true or stay false for sample t, depending on that value. In the second condition, the signal is evaluated at time t, that is, at the end of the sampling interval. If short transitions occur from "High" to "Low" to "High" again, the "Low" signal is not detected by this condition, because the signal is still high at time t. Consider the cases 2 and 4 in the figure below. 6 - Conditions Figure 25 An example of how two conditions which may seem equivalent give different results. The thick line represents the Input signal from a hardware device (a similar example could be made with Output signals). The red dots represents samples in EthoVision XT. Four cases are presented. 1. The signal changes from High to Low. The two conditions (see text) are both true at the time of evaluation. 2. The signal changes from High to Low to High within the sample time. The instance of "Low" is not detected by the condition based on the signal ("Is Input Low?"), because the signal value at the time of evaluation is High. 3. Similar to case 1. 4. Similar to case 2.
Source: EthoVision XT 17 - Trial and Hardware Control Reference Manual