menu_book

Knowledge Base

Documentation, guides, and resources for Noldus products.

EthoVision XT 19 - Experiments with Calcium Imaging

Last updated: Jul 26, 2026

Program Control of Devices in EthoVision XT

Trial Control Settings

The Trial Control Settings in EthoVision XT allows you to program activation of calcium imaging and optogenetic stimulation by Inscopix devices at specific times or when specific events occur, for example when the subject enters a target zone of the arena.

In addition, in Trial Control Settings you can define the conditions for the start and stop of data acquisition.

In EthoVision XT, choose Setup > Trial Control Settings > New, and enter a name for the new settings profile.

For more information on how to work with Conditions and Actions in Trial Control Settings, see the EthoVision XT Help (press F1 in EthoVision XT) and the EthoVision XT 19 - Trial and Hardware Control - Reference Manual, which you can find in the Apps screen under Noldus > EthoVision XT 19 Other Documentation.

Example 1 - Image Recording (nVista)

Use Case

EthoVision XT starts tracking after locating the subject's center point in the arena. Next, EthoVision XT sends out a high TTL pulse to the TRIG port of nVista. After a time delay of 10 minutes, EthoVision XT stops tracking the subject.

Hardware Connections

Refer to the hardware connection scheme for nVista in the hardware setup section of this manual.

Prerequisites in EthoVision XT

You specified the TTL port and output line (either 1 or 2) for TRIG in the Experiment Settings and mapped the port to the arena.

Procedure

  1. In the Trial Control Settings, under Actions, click the button next to Custom hardware.
  2. Specify the device (e.g. Device A) and the type of signal (Output 1 High).
  3. Optionally, edit the name in the Action name field.
  4. Click OK and insert the Action box between the Condition - In zone box and the Action - Start track box.
  5. Click Settings in the Condition - Time box and select 10 minutes. This way tracking stops after 10 minutes.
  6. If you want to stop recording in nVista when you stop behavior tracking, bring a new Action box in the flow line which instructs the system to send out a low TTL pulse to nVista. Make sure that you place the Action box at the right of the 10-minutes time box.

Tip: In the Hardware Action box you can test whether EthoVision XT triggers the nVista. To do so, click the Test button.

Note: Make sure to instruct nVista/nVoke to record video based on the TRIG signal.

Example 2 - Manual Video Recording, Triggered OG-LED Stimulation

Use Case

EthoVision XT starts tracking after locating the subject's center point in the arena. You start video recording in nVoke manually by clicking the Record button. At the planned time, for example at 10 minutes after start, EthoVision XT sends out a high TTL pulse to the GPIO[n] port of nVoke.

In the Inscopix DAQ software, under Video Recording configuration, make sure that Trigger is set to NONE and Control is set to Video Recording ON.

Hardware Connections

Refer to the hardware connection scheme for nVoke in the hardware setup section of this manual. You do not need to use the TRIG port of the nVoke device.

Set the GPIO[n] to Input in the Inscopix DAQ software.

Prerequisites in EthoVision XT

In the Experiment Settings, you defined the TTL port and output line (either 1 or 2) connected to the GPIO[n] of nVoke. In Arena Settings, you mapped that port to the arena.

Procedure

Because calcium imaging is started manually in this example, you only have to program the activation of the OG-LED. In the following example, the Time condition is set to wait 10 minutes before the triggering action.

  1. In the Trial Control Settings, under Conditions, click the button next to Time.
  2. Specify the time (e.g. 10 minutes). Optionally, edit the name in the Condition name field.
  3. Click OK and insert the Condition box after the Action - Start track box (or wherever it applies in your protocol; for example in a sub-rule).
  4. In the Trial Control Settings, under Actions, click the button next to Custom hardware.
  5. Specify the device (e.g. Device A) and the type of signal (Output 1 High).
  6. Optionally, edit the name in the Action name field.
  7. Click OK and insert the Action box at the right of the Condition box just created.
  8. When that applies, define a Condition and an Action (Output Low) for stopping the trigger action and insert them in the trial control flow line.

Notes

  • In the Inscopix DAQ software, make sure to set the Trigger mode for the GPIO[n] port to Follow.
  • When the Trigger is set to low, LED stimulation is stopped. To set the Trigger to Low, add an Action to the same device/TTL port and output line as above, and select the signal Output Low.
  • You can also let the DAQ software run its own pulse protocol while the Trigger is ON. In that case the Control for the GPIO[n] port is set to Pulse protocol.
  • For more information, see the nVista and nVoke User Manual.

Example 3 - Triggered Video Recording and LED Stimulation

Use Case

EthoVision XT starts tracking after locating the subject's center point in the arena. Both video recording and the OG-LED are triggered by EthoVision XT when the corresponding conditions (time or event) are met.

Hardware Connections

  • Refer to the hardware connection scheme for nVoke in the hardware setup section of this manual.
  • Set the GPIO[n] to Input in the Inscopix DAQ software.

Prerequisites in EthoVision XT

In the Experiment Settings, you defined two TTL lines from the USB-IO box: one connected to the TRIG and the other to the GPIO[n] port of nVoke. In Arena Settings, you mapped the ports/lines to the arena.

Procedure

Define actions and conditions as explained for the previous examples.

  • Condition to trigger video recording.
  • Action to trigger video recording through the TRIG port.
  • Condition to trigger OG-LED stimulation.
  • Action to trigger the OG-LED stimulation through the GPIO[n] port.

When applicable, define additional conditions and actions to stop video recording and OG-LED stimulation.

Notes

  • In the Inscopix DAQ software, make sure to set the Trigger mode for the TRIG port to Follow, and the Control is set to Video Recording ON. In an alternative configuration, you can set Control to Recording schedule to record video for a specific time.
  • In the Inscopix DAQ software, make sure to set the Trigger mode for the GPIO[n] port to Follow. Select the type of Control you require (e.g. Pulse protocol).
  • See the Example Configuration #3 in the nVista and nVoke User Manual.

Detection Settings

General

Ensure your subjects are detected well by EthoVision XT.

Choose Setup > Detection Settings.

For more details, see the EthoVision XT Help.

Sample Rate

In the Video section, specify the sample rate. Some commonly-used values are:

  • For tracking rats: 5 samples/second.
  • For tracking mice: 12.5 samples/second.
  • When tracking the nose- and tail-base points of rodents: 25-30 samples/second.

Detect Immobility

There are two ways to detect immobility of the subject during the trial.

  • Activity measures the number of pixels that change their intensity, so whenever the subject sits still, the Activity value will be low. However, when the subject is connected to a microscope cable, the cable can move continuously and keep Activity high. As a result, Activity measurements may not detect immobility with sufficient accuracy. Instead, use Mobility.
  • Mobility is based on the change of the detected shape (i.e., the yellow blob). You can define Mobility in the Analysis profile, so you do not need to specify anything in the Detection Settings. However, make sure that the yellow blob covers the entire body of the subject and is not affected by the cable (see below).

Remove the Effect of the Microscope Cable

When the microscope cable is detected as the subject, it changes both the Mobility measure and the position of the center point. The latter affects distance moved and other readouts.

Step 1 - Define the Contrast

The first thing to do is to make sure that the entire body of the subject is well detected throughout the arena. Use for example Dynamic subtraction and choose the smallest range of contrast that enables detection of the subject's body.

In this step the cable may still be detected. This will be removed in the next step. Make sure that the contour of the subject is not too much indented and noise (i.e. the orange areas) is limited.

Step 2 - Erode and Then Dilate the Contour

In the Detection Settings, locate the Subject Contour options. Select 1 or a higher value for the first Erosion and a similar value for Dilation until the cable is no longer highlighted in yellow.

The Erosion filter removes the pixels from the contour (and therefore the cable too); the Dilation filter restores the original size of the yellow blob but excludes the cable.

Aligning Data

Sync Signal

To align the data streams from EthoVision XT and Inscopix nVista/nVoke, there are two solutions:

  • Have EthoVision XT send a time code signal (TCAP).
  • Have EthoVision XT send a sequence of TTL pulses.

Either way, the Inscopix system records the signal in one of its channels. The difference between the two is that with TCAP you need to export the TCAP signal that is stored in Inscopix back to EthoVision XT, together with the Inscopix data, so that EthoVision XT reads the time code and aligns the Inscopix data with the tracks.

Note: The nVista/nVoke system can also send a sync pulse to EthoVision XT through the USB-IO box every time a video frame is recorded. However, the pulse generated from the SYNC port of nVista/nVoke has a duration of 10 ms. That is too little for EthoVision XT to detect and record the signal. Therefore, this solution is not optimal to sync the two data streams.

Using the TCAP Signal

Prerequisites

For this solution you need:

  • The External Data add-on module for EthoVision XT. Contact Noldus if you need to purchase it.
  • An interface cable between EthoVision XT and the BNC connector of the nVista/nVoke DAQ box. Contact Noldus to have one made for you.
  • A way to convert the Inscopix data to a format compatible with EthoVision XT: fixed sample rate, without gaps.

Procedure

  1. Set the TCAP signal in the Experiment Settings of EthoVision XT, and specify the sample rate of the Inscopix channel that will receive that signal.
  2. Start acquisition in Inscopix and then start the trial in EthoVision XT. nVoke/nVista records the TCAP signal, which should be visualized on the system's screen.
  3. Export the Inscopix data to text files. Note that here the sample rate must be fixed and all samples must be written in the file, otherwise import will not work.
  4. After import, EthoVision shows the TCAP signal and other Inscopix data together with the track data.

For more information, see External Data in the EthoVision XT Help.

Using a TTL Signal

Connections

Connect a TTL port of the USB/IO box to one of the GPIO ports of the Inscopix DAQ box. For this you need a cable with a RJ45 connector at one end and a BNC connector at the other end.

Procedure

  1. In the Experiment Settings in EthoVision XT, define a TTL port of the USB-IO box. Select Custom Hardware from the list. In the Arena Settings, map that TTL port to one of the arenas.
  2. In the Trial Control Settings, add a subrule that activates the TTL port every few seconds. For example: TTL Output 1 High for 1 second, then TTL Output 1 Low for 4 seconds. Let the subrule repeat a number of times or when a Trial Control variable reaches a specific value. In general, make sure that the ON-OFF sequence runs through the duration of the trial.

    Tip: To stop the subrule at the end of the trial, add an Action box immediately before the Stop Trial box, where a Trial Control Variable, for example END, gets the value 1. In the Subrule reference, specify to end the subrule when END = 1.

  3. Run a test trial and make sure that Inscopix records the signal coming to the GPIO port.
  4. Visualize the data in both systems. In EthoVision XT, you can visualize the TTL signal by selecting, for example, Trial Control state in the Analysis profile and defining the state from the action Output 1 High to the action Output 1 Low (here the numbering depends on which TTL line you use).
  5. If the data are well aligned, the time between the first and the last pulse should be the same in EthoVision XT and Inscopix, or differ by a few milliseconds.

For more information, see the nVista/nVoke User Manual and the EthoVision XT 19 - Trial and Hardware Control - Reference Manual.

Mark EthoVision Events on the Calcium Imaging Timeline

You can also use the GPIO ports on the nVoke/nVista box to send specific events to the Calcium Imaging software.

In the following example, a setup that includes a fear conditioning system, all GPIO ports are set to digital and work as inputs.

  • GPIO-1 receives a signal from a TTL port of the USB-IO box that is set to high when tracking starts.
  • GPIO-2 receives a signal from a TTL port of the USB-IO box that is set to high when a 5-kHz tone is given.
  • GPIO-3 receives a signal from a TTL port of the USB-IO box that is set to high when a 15-kHz tone is given.
  • GPIO-4 receives a signal from a TTL port of the USB-IO box that is set to high or low when the optogenetic stimulation is given/stopped, respectively, or when a shock is given/stopped, respectively.

Data Analysis in EthoVision XT

Once you acquire your trials, you want to pair the behavioral tracking with the calcium imaging/optogenetic stimulation events. To view and analyze those events, you must first define them in the Analysis profile.

Choose Analysis > Analysis Profile > New.

Define a Simple Event

With the variable Hardware command you can visualize the time that the USB-IO box sends a trigger command to nVista/nVoke.

  1. In the Dependent Variables pane, under Hardware, choose Hardware command.
  2. Choose the device and the output state, for example Output 1 High. Note that Output represents one of the two communication lines present in each TTL port of the USB-IO box. Choose the line that you used in the Action box in the Trial Control Settings to trigger the device.
  3. Visualize the event (Analysis > Results > Integrated Visualization).

Analyze Intervals (Global)

You can analyze the behavior of the subject within an interval based on events. For example, calculate the average velocity of the subject from the time that stimulation starts (i.e., when the TTL Output 1 is High) to the time that stimulation ends (i.e., nVoke is triggered with Output 1 Low). To analyze the behavior within intervals, you must use the Nesting function in the Data profile.

  1. Choose Analysis > Data Profile > New.
  2. In the Components pane, under Nesting, choose Hardware state.
  3. Select the device and the status of the device. For example, Device A - Is Output 1 High - true. This selects the time that the TTL Output 1 signal remains high.
  4. Insert the box in the flow line.
  5. Visualize the interval (Analysis > Results > Integrated Visualization).

Note: If Output 1 stays high multiple times during one trial, EthoVision XT considers the cumulative time that Output 1 stays High, and that is used as the analysis interval. When you want to analyze the time defined by a specific triggering event, see the Analyze Specific Intervals section below.

Analyze Specific Intervals

You can use Free Intervals in the Data profile to define and analyze specific intervals based on individual triggering events within a trial. For more information, see the EthoVision XT Help.


Source: EthoVision XT 19 - Application Manual

Need help choosing the right solution?

Our team can help you find the perfect setup for your research. Get a personalized recommendation.

Noldus is here to assist you throughout the whole process.

shopping_bag
check_circle

Thank you!

We'll get back to you shortly.

error

Please correct the following errors:

error

error

error

error

By clicking Submit, you consent to Noldus processing your data as described in our privacy policy.