Data Track

Data track steps

A data track is a point mass with world positions determined by an external data source, typically based on a dynamic model. It enables the model to be drawn directly on a real-world video for visual comparison.

There are two types of data source:

  1. Delimited text data in a file or pasted from the clipboard.
  2. An EjsS simulation or other program able to send data directly to Tracker.

There are four ways to create a data track:

  1. Click the Create button and choose Data Track... from the popup menu, then open a data source file using the resulting file chooser.
  2. Choose Import|Data Source... from the File menu, then open a data source file using the resulting file chooser.
  3. Copy delimited text data to the clipboard from a separate program and choose Paste from the Edit menu.
  4. Run an EjsS simulation and send data directly to Tracker.

1. Data sources: delimited text data

The figure below shows two examples of delimited text data suitable for a data track. Note that:

Tab-delimited x-y data Comma-delimited t-x-y data with track name

Most programs that collect, generate or analyze data, including spreadsheets, are able to save or export delimited text files that conform to these specifications.

2. Data sources: EjsS simulations

EjsS (Easy Java/Javascript Simulations) is a free authoring tool written in Java that helps non-programmers create interactive simulations for teaching and learning. EJsS was created by Francisco Esquembre and, along with Tracker, is part of the Open Source Physics project. EjsS can be downloaded from http://www.um.es/fem/EjsWiki/Main/Download.

Starting with EjsS version 5.2, simulations can send data directly to Tracker where it is displayed as a data track. In addition, video and Tracker files can be loaded into Tracker directly from EjsS. This greatly increases the potential for comparing dynamic models with videos.

For more information about creating simulations and sending data from EjsS, see the EjsS Wiki help pages.

3. Data track properties

Since the data source usually provides data generated by a theoretical model, a data track is treated as a type of particle model. For this reason it's user-controlled properties are displayed and edited using the Model Builder tool. To use the builder, choose Model Builder... from the data track's track menu.

Data points loaded from a data source are stored in a data point array. Each data point can be referred to by its index (starting from 0) in the array. For example, in the "launched_marble" delimited text data example above the array would have a length of 11 with indices from 0 to 10. The data point at index 10 would have the value (t=1.0, x=5.0, y=-10.0).

The following properties are user-settable in the model builder:

  1. Start Frame: the video frame displaying the first data point.
  2. Frame Count: the number of video frames displaying data points.
  3. Data Start: the index of the first displayed data point.
  4. Data Stride: the index increment between displayed data points.
  5. Time Basis: the source of the time base used to determine video frame times (and thus velocities and accelerations). Data Time is enabled only if a data source provides time data.

For example, using the settings shown in the figure above, data point index 2 is displayed in video frame 15, index 4 in frame 16, index 6 in frame 17, index 8 in frame 18 and index 10 in frame 19 as shown in the green and white bar graphics. In this example, the data time is ignored since video time is selected as the time basis.