menu_book

Knowledge Base

Documentation, guides, and resources for Noldus products.

EthoVision XT 19 - Dependent Variables Reference (Continued)

Last updated: Jul 29, 2026

TurnAngle

Returns the angle in radians between three points. The name suggests that this function is restricted to turn angles but you can use it to calculate any angle formed by three points in general. See also Turn angle.

  • Syntax

    TurnAngle(Point 1, Point 2, Point 3)

  • Arguments
    • Point 1: the name of the begin point.
    • Point 2: the name of the middle point.
    • Point 3: the name of the end point. This is the point at the current sample time, while Point 1 and Point 2 are the points at two immediately preceding sample times.
  • Example

    ta = TurnAngle(g_aPoints[0], g_aPoints[1], g_aPoints[2]);

    where g_aPoints is an array variable of length 3.

    Remember that TurnAngle is in radians. At the top of the code, define a function to obtain the value in degrees:

    function toDegrees(angle)
    {
        return angle * (180 / Math.PI);
    }

    (...)
    var tadg = toDegrees(ta);

  • Errors

    If any of the three points is null, the value is not calculated.

Heading

Returns the value of heading in radians based on two sample points. See Heading.

  • Syntax

    Heading(Point 1, Point 2)

  • Arguments
    • Point 1: Begin point.
    • Point 2: End point.

    To calculate heading, Point 1 is the point at the previous sample time and Point 2 the point at the current sample time.

  • Example

    var hd = Heading(g_aPoints[0], g_aPoints[1]);

    where g_aPoints is an array variable of length 2.

    At the top of the code, define a function to obtain the value in degrees:

    function toDegrees(angle)
    {
        return angle * (180 / Math.PI);
    }

    (...)
    var hdg = toDegrees(hd);

  • Errors

    If one of the two points is null, the value is not calculated.

SetOutput

Assigns a value to the JavaScript variable for the current sample time.

  • Syntax

    SetOutput(Value)
    SetOutput(Output, Value)

  • Arguments
    • Value: the value that you want to assign to the variable at the current sample time.
      • For JavaScript Continuous variables: a rational number.
      • For JavaScript State variables: true or false.
      • For JavaScript Event variables: 0 or 1.
    • Output: Output number. When the variable has just one value per sample, like in most applications, then you do not need to specify Output. When the variable has multiple outputs, like in a state variable with 4 possible states, specify the output in each line (beginning from zero). For example:

      SetOutput(0, bOutput1); //write first state
      SetOutput(1, bOutput2); //write second state
      SetOutput(2, bOutput3); //write third state
      SetOutput(3, bOutput4); //write fourth state

  • Example

    if (x != null)
    {
        SetOutput(x);
    }

  • Errors

    If the value is null or undefined, the output will be missing.

  • Notes

    When the variable has multiple outputs, remember to specify the Number of outputs at the bottom of the JavaScript window.

SetOutputMissing

Assigns a missing value to the JavaScript variable for the current sample time.

  • Syntax

    SetOutputMissing()

  • Example

    In the following example, if the value of x is not null, it is assigned to the output of the JavaScript variable; otherwise it is set to missing.

    if (x != null)
    {
        SetOutput(x);
    }
    else
    {
        SetOutputMissing();
    }

See also

  • JavaScript continuous
  • JavaScript state
  • JavaScript event

Live Mouse Tracker

In the Analysis profile you find two groups of variables based on Live Mouse Tracker data.

Under Raw Live Mouse Tracker data you find basic events of Live Mouse Tracker, like Contact and Approach.

  • Raw Live Mouse Tracker data

Under Live Mouse Tracker you find more complex variables:

  • Approach rearing subject
  • Drink
  • Follow
  • Get Away
  • Group
  • Make and break group
  • Make contact
  • Move
  • Nest
  • Nose contact
  • Nose contact sequence
  • Out of nest
  • Rear
  • Social approach
  • Stretch attend posture
  • Social escape

Notes

  • You can also use the basic events of Live Mouse Tracker (first group above) to carry out custom analysis. For example, analyze Contact events with JavaScript code. To extract Live Mouse Tracker events, use the function GetBehaviorEvent. See Commands and functions for JavaScript variables.
  • In the Analysis profile, under Social, you find variables derived from Live Mouse Tracker with extended options:
    • Side by side
    • Train
  • In experiments based on Live Mouse Tracker data, some standard EthoVision XT variables are not available. See a note in the topic Live Mouse Tracker: Workflow.

Source: EthoVision XT 19 Help, Noldus Information Technology

Not sure which modules you need?

Let us help you configure the right package for your experiments. No obligation.

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.