Template: Gaze Contingent Character-Based Text/Mask Moving Window
#1
Gaze Contingent Character-Based Text/Mask Moving Window

Required Experiment Builder Version: 2.3.38 or higher
EyeLink Required: Yes
Type: Concept Example
Difficulty Level: Medium

This example demonstrates:
  • How to implement a gaze contingent moving window where the window's boundaries are based on character locations.  The experiment will identify which interest area the current gaze position is on and then make a moving window including that character and, optionally, some characters before/after the character corresponding to the gaze location.
  • How to use Python Custom Class drawing to present the moving window paradigm
  • How to use character-based interest areas for a moving window effect while also using Custom Class to make word-based interest areas based on the character interest areas in preparation for data analysis

Description:

This example illustrates how to implement a gaze contingent moving window where the window's boundaries are based on character locations.  The experiment will identify which interest area the current gaze position is on and then make a moving window including that character and, optionally, some characters before/after the character corresponding to the gaze location.  Data Source columns in the main experimental project allow you to specify how many characters before the current gaze location and how many characters after the current gaze position in the moving window.  Other Data Source columns allow you to limit the moving window only to characters on the same line as the current gaze position (or now) and whether to just draw the whole text (with no moving window effect; this can be useful for control trials).

Note, when first opening an EDF collecting with this project in Data Viewer, you'll see both the character-based and word-based interest areas.  To make it so that you only see the word-based interest areas, set an interest period that starts with the message DISPLAY_TEXT and ends with the message DISPLAY_BLANK.  Then, go to the Data Filters section of the Preferences in Data Viewer and uncheck Show Interest Areas Pre Interest Period.

Note, this project utilizes Multiline Text Resources, but does the drawing of these via Custom Class.  If you need to have a moving window involving images (like, if you have images of degraded text), then you could use an attached archived version of the project that used a separate generating project to generate images  and interest area sets (which could then be degraded in some photo editing software) that could be used in the main experimental project.  That archived version is in an attached zip file that includes instructions for using the generating and main projects.

**The Custom Class Python script is commented, so you can see how things work.  To access the script, you can double click the CUSTOM_CLASS_INSTANCE node in the project.

Instructions:
  1. Download the InvisibleBoundary.ebz example from this message.
  2. Launch the Experiment Builder application.
  3. Unpack the InvisibleBoundary.ebz file to a location on your Experiment Builder PC with "File menu -> Unpack".
  4. Open the project in Experiment Builder.
  5. Deploy the project to a new folder.
  6. Run the InvisibleBoundary.exe from the deployed directory.



Attached Files
.zip   ARCHIVED_GCWindow_Text_Character_Based_With_Generating_Project.zip (Size: 1.29 MB / Downloads: 19)
.ebz   GCWindow_Text_Character_Based_Moving_Window.ebz (Size: 52.35 KB / Downloads: 96)