Return to home pageGo to previous document on same levelGo to next document on same levelMove up one levelGo to sitemapmailto:dpwolfer@swissonline.ch

Lesson 7 - Custom analysis and custom setup files

You have already learned to pick trial and case variables from Wintrack's list of predefined variables. In addition to that, the Analyze Case Document command can also be used to process custom variable definition files. These are ASCII text files in which you define variables using a scripting language. As you will see during the following lessons, this greatly increases the flexibility and power of data analysis. However, custom variables may refer to fields which are not part of Wintrack's predefined arena types. Therefore, before processing custom variable definition files, you must prepare a custom setup file - another type of ASCII text file in which you define the arena and any fields you may want to refer to during data analysis. In this lesson you will learn how to load and edit such custom setup files.

Loading a custom setup file...

  1. Open the two sample case documents SWIM1.WTR and SWIM2.WTR of your WINTRACK folder.
  2. Select Arena Properties from the Options menu or press the Arena Properties button of the toolbar while pressing and holding down the Shift key. The Arena Properties dialog is displayed:
    • In the dialog field Type, select the option custom with setup file. Note that most other fields of the dialog box are now grayed, indicating that Wintrack will ignore them and get all information from the custom setup file instead.
    • Press the button to open a Windows™ standard File Open dialog box. Pick the file POOL1.WSP in the WINTRACK directory and click Ok.
    • Click Ok again to close the Arena Properties dialog.
  3. Wintrack loads the custom setup file POOL1.WSP and redraws all case windows to display the fields that are specified in that file: the arena, the goal, and for trials 19-30 the former position of the goal. Note that the name of the currently loaded custom setup file is indicated in Wintrack's status bar.

    You have now learned how to load a custom setup file. Next, let us have a look at the content of such a file. Custom setup files cannot be viewed or edited inside Wintrack. But as plain ASCII text files you can open and edit them with any word processing program that can handle plain ASCII text files, e.g. Windows™ NotePad, or MS Word for Windows™. We will use Windows™ NotePad to make some changes to POOL1.WSP and see how this affects case documents in Wintrack.

Editing a custom setup file...

  1. Without closing any of the open case documents, select Arena Properties from the Options menu or press the Arena Properties button of the toolbar while pressing and holding down the Shift key. The Arena Properties dialog is displayed again. The dialog field next to the option custom with setup file still shows name and path of the custom setup file POOL1.WSP.
  2. Click the NotePad… button located next to it. Wintrack starts Windows™ NotePad and lets it load the file POOL1.WSP. It should look something like this:
    Custom setup, example 1
    [fields]
    Arena rect=0,0,1.5,1.5 type=round,visible Goal range=1-18 rect=-0.25,-0.25,16cm,16cm type=square,visible fcolor=0,0,0 Goal range=19-30 rect=0.25,0.25,16cm,16cm type=square,visible fcolor=128,0,0 Old range=19-30 rect=-0.25,-0.25,16cm,16cm type=square,visible
    [end]
    • All text above [fields] is free commentary. Between [fields] and [end] are the field statements, each of which define one object or field of the setup.
    • The first statement defines the arena itself. The rect parameter specifies the coordinates of the arena center as 0,0, its width and height as 1.5m, The type parameter indicates that the arena is round and is to be visible in the trial views of case documents. By default visible fields are white with a black border.
    • The second statement defines a field named Goal. Its position is at -0.25,-0.25 (SW), its width and height are 16cm. Its shape is square and it is visible in the trial views of case documents. The fcolor parameter changes the fill from the default white to RGB color 128,0,0 which is dark red. The range parameter indicates that the field exists only during trials 1-18 of the experiment.
    • The third statement defines another field named Goal. All properties are the same, except that now the position is at 0.25,0.25 (NE). This second Goal field exists during trials 19-30 of the experiment.
    • The last statement defines a field named Old. It exists during trials 19-30, has the same position and size as the goal during trial 1-18. In fact, it represents the previous goal position during the trials of the reversal phase of the experiment.
  3. Insert the following text between the last statement and the [end] label:
    Begin rect=0,0,0.08,0.08 fcolor=0,0,0 type=round,visible,pathbegin
    End rect=0,0,0.08,0.08 type=round,visible,pathend
    quadGoal range=1-18 rect=-0.375,-0.375,75cm,75cm type=square,hidden
    quadGoal range=19-30 rect=0.375,0.375,75cm,75cm type=square,hidden
    quadOld range=19-30 rect=-0.375,-0.375,75cm,75cm type=square,hidden
    • The Begin statement defines a black solid circle of 0.08 m vertical and horizontal diameter. The option pathbegin causes the object to be drawn on top of the first data point of the respective trial.
    • The End statement defines a white circle of 0.08 m vertical and horizontal diameter. The option pathend causes the object to be drawn on top of the last data point of the respective trial.
    • The quadGoal statements define goal quadrants for the trial ranges 1-18 (acquisition training) and 19-30 (reversal training), respectively. The option hidden prevents the quadGoal fields from being drawn in the case window. They can, however, be referenced during data analysis.
    • The quadOld statement defines the former goal quadrant for the trial range 19-30 (reversal training).
  4. From the File menu of Windows™ NotePad, select Save As and save the edited setup file as POOL2.WSP. Terminate Windows™ NotePad. You are put back into the Arena Properties dialog:
    • Press the button to open a Windows™ standard File Open dialog box. Pick the file POOL2.WSP you have just created in the WINTRACK directory and click Ok.
    • Click Ok again to close the Arena Properties dialog.
  5. Wintrack loads the new custom setup file POOL2.WSP and redraws all case windows to display all fields that are specified as visible in that file. Select Close All from Wintrack's Window menu to close all open documents. Answer No if you are asked to let Wintrack save changes to a document.

Note

Tip Wintrack custom setup files can define any number of fields. You can give them any name you want, up to 32 characters in length. You will use the same names when later referring to the fields during data analysis. The first statement in every custom setup file, however, is reserved. It must always define an field named Arena. It is therefore called the Arena statement. Wintrack refers to it to calibrate its internal workspace of 32767 by 32767 pixels to real world metric units and to set the origin of the coordinate system.

Lesson 8 - Bullet analysis of data will introduce the first of the four methods to custom analyze data in Wintrack.


Go to previous document on same levelGo to next document on same levelMove up one levelGo to sitemap