Scanpathplot Tutorial: Visualizing Eye Movement Events#

This tutorial demonstrates how to create scanpath plots for eye movement data using pymovements, with a focus on fixation detection.

Step 1: Import Libraries and Load Dataset#

First, we need to import the necessary libraries and load our eye movement dataset. We’ll use the ToyDataset for this tutorial.

import pymovements as pm

# Load the ToyDataset
dataset = pm.Dataset('ToyDataset', path='data/ToyDataset')
dataset.download()
dataset.load()
INFO:pymovements.dataset.dataset:
        You are downloading the pymovements Toy Dataset. Please be aware that pymovements does not
        host or distribute any dataset resources and only provides a convenient interface to
        download the public dataset resources that were published by their respective authors.

        Please cite the referenced publication if you intend to use the dataset in your research.
        
Using already downloaded and verified file: data/ToyDataset/downloads/pymovements-toy-dataset.zip
Extracting pymovements-toy-dataset.zip to data/ToyDataset/raw
  0%|          | 0/23 [00:00<?, ?it/s]
100%|██████████| 23/23 [00:00<00:00, 341.47it/s]

Dataset
  • DatasetDefinition
    DatasetDefinition
    • None
      None
    • dict (0 items)
      • dict (1 items)
        • dict (4 items)
          • list (5 items)
            • 'timestamp'
            • 'x'
            • (3 more)
          • dict (5 items)
            • Float64
              Float64
            • Float64
              Float64
            • (3 more)
          • (2 more)
      • None
        None
      • Experiment
        Experiment
        • EyeTracker
          EyeTracker
          • None
            None
          • None
            None
          • None
            None
          • None
            None
          • 1000
            1000
          • None
            None
          • None
            None
        • 1000
          1000
        • Screen
          Screen
          • 68
            68
          • 30.2
            30.2
          • 1024
            1024
          • 'upper left'
            'upper left'
          • 38
            38
          • 1280
            1280
          • 15.599386487782953
            15.599386487782953
          • -15.599386487782953
            -15.599386487782953
          • 12.508044410882546
            12.508044410882546
          • -12.508044410882546
            -12.508044410882546
      • None
        None
      • dict (1 items)
        • 'trial_{text_id:d}_{page_id:d}.csv'
          'trial_{text_id:d}_{page_id:d}.csv'
      • dict (1 items)
        • dict (2 items)
          • <class 'int'>
            <class 'int'>
          • <class 'int'>
            <class 'int'>
      • True
        True
      • 'pymovements Toy Dataset'
        'pymovements Toy Dataset'
      • dict (0 items)
        • 'ToyDataset'
          'ToyDataset'
        • list (2 items)
          • 'x'
          • 'y'
        • None
          None
        • list (1 items)
          • ResourceDefinition
            • 'gaze'
              'gaze'
            • 'pymovements-toy-dataset.zip'
              'pymovements-toy-dataset.zip'
            • 'trial_{text_id:d}_{page_id:d}.csv'
              'trial_{text_id:d}_{page_id:d}.csv'
            • dict (2 items)
              • <class 'int'>
                <class 'int'>
              • <class 'int'>
                <class 'int'>
            • None
              None
            • None
              None
            • '256901852c1c07581d375eef705855d6'
              '256901852c1c07581d375eef705855d6'
            • None
              None
            • str
              'https://github.com/pymovements/pymovements-toy-dataset/archive/refs/heads/main.zip'
        • 'timestamp'
          'timestamp'
        • 'ms'
          'ms'
        • None
          None
        • None
          None
      • tuple
        (shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘)
      • dict (1 items)
        • DataFrame (5 columns, 20 rows)
          shape: (20, 5)
          text_idpage_idfilepathload_functionload_kwargs
          i64i64strnullnull
          01"pymovements-toy-dataset-main/d…nullnull
          02"pymovements-toy-dataset-main/d…nullnull
          03"pymovements-toy-dataset-main/d…nullnull
          04"pymovements-toy-dataset-main/d…nullnull
          05"pymovements-toy-dataset-main/d…nullnull
          31"pymovements-toy-dataset-main/d…nullnull
          32"pymovements-toy-dataset-main/d…nullnull
          33"pymovements-toy-dataset-main/d…nullnull
          34"pymovements-toy-dataset-main/d…nullnull
          35"pymovements-toy-dataset-main/d…nullnull
      • list (20 items)
        • Gaze
          • DataFrame (6 columns, 17223 rows)
            shape: (17_223, 6)
            timestimuli_xstimuli_ytext_idpage_idpixel
            i64f64f64i64i64list[f64]
            1988145-1.0-1.001[206.8, 152.4]
            1988146-1.0-1.001[206.9, 152.1]
            1988147-1.0-1.001[207.0, 151.8]
            1988148-1.0-1.001[207.1, 151.7]
            1988149-1.0-1.001[207.0, 151.5]
            2005363-1.0-1.001[361.0, 415.4]
            2005364-1.0-1.001[358.0, 414.5]
            2005365-1.0-1.001[355.8, 413.8]
            2005366-1.0-1.001[353.1, 413.2]
            2005367-1.0-1.001[351.2, 412.9]
          • Events
            Events
            • DataFrame (6 columns, 0 rows)
              shape: (0, 6)
              text_idpage_idnameonsetoffsetduration
              i64i64stri64i64i64
            • list (2 items)
              • 'text_id'
              • 'page_id'
          • list (2 items)
            • 'text_id'
            • 'page_id'
          • Experiment
            Experiment
            • EyeTracker
              EyeTracker
              • None
                None
              • None
                None
              • None
                None
              • None
                None
              • 1000
                1000
              • None
                None
              • None
                None
            • 1000
              1000
            • Screen
              Screen
              • 68
                68
              • 30.2
                30.2
              • 1024
                1024
              • 'upper left'
                'upper left'
              • 38
                38
              • 1280
                1280
              • 15.599386487782953
                15.599386487782953
              • -15.599386487782953
                -15.599386487782953
              • 12.508044410882546
                12.508044410882546
              • -12.508044410882546
                -12.508044410882546
        • Gaze
          • DataFrame (6 columns, 29799 rows)
            shape: (29_799, 6)
            timestimuli_xstimuli_ytext_idpage_idpixel
            i64f64f64i64i64list[f64]
            2008305-1.0-1.002[141.4, 153.6]
            2008306-1.0-1.002[141.1, 153.2]
            2008307-1.0-1.002[140.7, 152.8]
            2008308-1.0-1.002[140.6, 152.7]
            2008309-1.0-1.002[140.5, 152.6]
            2038099-1.0-1.002[273.8, 773.8]
            2038100-1.0-1.002[273.8, 774.1]
            2038101-1.0-1.002[273.9, 774.5]
            2038102-1.0-1.002[274.0, 774.4]
            2038103-1.0-1.002[274.0, 773.9]
          • Events
            Events
            • DataFrame (6 columns, 0 rows)
              shape: (0, 6)
              text_idpage_idnameonsetoffsetduration
              i64i64stri64i64i64
            • list (2 items)
              • 'text_id'
              • 'page_id'
          • list (2 items)
            • 'text_id'
            • 'page_id'
          • Experiment
            Experiment
            • EyeTracker
              EyeTracker
              • None
                None
              • None
                None
              • None
                None
              • None
                None
              • 1000
                1000
              • None
                None
              • None
                None
            • 1000
              1000
            • Screen
              Screen
              • 68
                68
              • 30.2
                30.2
              • 1024
                1024
              • 'upper left'
                'upper left'
              • 38
                38
              • 1280
                1280
              • 15.599386487782953
                15.599386487782953
              • -15.599386487782953
                -15.599386487782953
              • 12.508044410882546
                12.508044410882546
              • -12.508044410882546
                -12.508044410882546
        • (18 more)
      • PosixPath('data/ToyDataset')
        PosixPath('data/ToyDataset')
      • DatasetPaths
        DatasetPaths
        • PosixPath('data/ToyDataset')
          PosixPath('data/ToyDataset')
        • PosixPath('data/ToyDataset/downloads')
          PosixPath('data/ToyDataset/downloads')
        • PosixPath('data/ToyDataset/events')
          PosixPath('data/ToyDataset/events')
        • PosixPath('data/ToyDataset/precomputed_events')
          PosixPath('data/ToyDataset/precomputed_events')
        • PosixPath
          PosixPath('data/ToyDataset/precomputed_reading_measures')
        • PosixPath('data/ToyDataset/preprocessed')
          PosixPath('data/ToyDataset/preprocessed')
        • PosixPath('data/ToyDataset/raw')
          PosixPath('data/ToyDataset/raw')
        • PosixPath('data/ToyDataset')
          PosixPath('data/ToyDataset')
      • list (0 items)
        • list (0 items)

          Step 2: Convert Data Units#

          Convert pixel coordinates to degrees of visual angle for more meaningful analysis. This step is important for proper fixation detection as dispersion thresholds are typically defined in degrees.

          # Convert pixel coordinates to degrees of visual angle
          dataset.pix2deg()
          
          # Note: We could also compute velocity here if needed:
          # dataset.pos2vel('smooth')
          
          Dataset
          • DatasetDefinition
            DatasetDefinition
            • None
              None
            • dict (0 items)
              • dict (1 items)
                • dict (4 items)
                  • list (5 items)
                    • 'timestamp'
                    • 'x'
                    • (3 more)
                  • dict (5 items)
                    • Float64
                      Float64
                    • Float64
                      Float64
                    • (3 more)
                  • (2 more)
              • None
                None
              • Experiment
                Experiment
                • EyeTracker
                  EyeTracker
                  • None
                    None
                  • None
                    None
                  • None
                    None
                  • None
                    None
                  • 1000
                    1000
                  • None
                    None
                  • None
                    None
                • 1000
                  1000
                • Screen
                  Screen
                  • 68
                    68
                  • 30.2
                    30.2
                  • 1024
                    1024
                  • 'upper left'
                    'upper left'
                  • 38
                    38
                  • 1280
                    1280
                  • 15.599386487782953
                    15.599386487782953
                  • -15.599386487782953
                    -15.599386487782953
                  • 12.508044410882546
                    12.508044410882546
                  • -12.508044410882546
                    -12.508044410882546
              • None
                None
              • dict (1 items)
                • 'trial_{text_id:d}_{page_id:d}.csv'
                  'trial_{text_id:d}_{page_id:d}.csv'
              • dict (1 items)
                • dict (2 items)
                  • <class 'int'>
                    <class 'int'>
                  • <class 'int'>
                    <class 'int'>
              • True
                True
              • 'pymovements Toy Dataset'
                'pymovements Toy Dataset'
              • dict (0 items)
                • 'ToyDataset'
                  'ToyDataset'
                • list (2 items)
                  • 'x'
                  • 'y'
                • None
                  None
                • list (1 items)
                  • ResourceDefinition
                    • 'gaze'
                      'gaze'
                    • 'pymovements-toy-dataset.zip'
                      'pymovements-toy-dataset.zip'
                    • 'trial_{text_id:d}_{page_id:d}.csv'
                      'trial_{text_id:d}_{page_id:d}.csv'
                    • dict (2 items)
                      • <class 'int'>
                        <class 'int'>
                      • <class 'int'>
                        <class 'int'>
                    • None
                      None
                    • None
                      None
                    • '256901852c1c07581d375eef705855d6'
                      '256901852c1c07581d375eef705855d6'
                    • None
                      None
                    • str
                      'https://github.com/pymovements/pymovements-toy-dataset/archive/refs/heads/main.zip'
                • 'timestamp'
                  'timestamp'
                • 'ms'
                  'ms'
                • None
                  None
                • None
                  None
              • tuple
                (shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘, shape: (0, 6) ┌─────────┬─────────┬──────┬───────┬────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════╪═══════╪════════╪══════════╡ └─────────┴─────────┴──────┴───────┴────────┴──────────┘)
              • dict (1 items)
                • DataFrame (5 columns, 20 rows)
                  shape: (20, 5)
                  text_idpage_idfilepathload_functionload_kwargs
                  i64i64strnullnull
                  01"pymovements-toy-dataset-main/d…nullnull
                  02"pymovements-toy-dataset-main/d…nullnull
                  03"pymovements-toy-dataset-main/d…nullnull
                  04"pymovements-toy-dataset-main/d…nullnull
                  05"pymovements-toy-dataset-main/d…nullnull
                  31"pymovements-toy-dataset-main/d…nullnull
                  32"pymovements-toy-dataset-main/d…nullnull
                  33"pymovements-toy-dataset-main/d…nullnull
                  34"pymovements-toy-dataset-main/d…nullnull
                  35"pymovements-toy-dataset-main/d…nullnull
              • list (20 items)
                • Gaze
                  • DataFrame (7 columns, 17223 rows)
                    shape: (17_223, 7)
                    timestimuli_xstimuli_ytext_idpage_idpixelposition
                    i64f64f64i64i64list[f64]list[f64]
                    1988145-1.0-1.001[206.8, 152.4][-10.697598, -8.852399]
                    1988146-1.0-1.001[206.9, 152.1][-10.695183, -8.859678]
                    1988147-1.0-1.001[207.0, 151.8][-10.692768, -8.866956]
                    1988148-1.0-1.001[207.1, 151.7][-10.690352, -8.869381]
                    1988149-1.0-1.001[207.0, 151.5][-10.692768, -8.874233]
                    2005363-1.0-1.001[361.0, 415.4][-6.932438, -2.386672]
                    2005364-1.0-1.001[358.0, 414.5][-7.006376, -2.408998]
                    2005365-1.0-1.001[355.8, 413.8][-7.060582, -2.426362]
                    2005366-1.0-1.001[353.1, 413.2][-7.12709, -2.441245]
                    2005367-1.0-1.001[351.2, 412.9][-7.173881, -2.448686]
                  • Events
                    Events
                    • DataFrame (6 columns, 0 rows)
                      shape: (0, 6)
                      text_idpage_idnameonsetoffsetduration
                      i64i64stri64i64i64
                    • list (2 items)
                      • 'text_id'
                      • 'page_id'
                  • list (2 items)
                    • 'text_id'
                    • 'page_id'
                  • Experiment
                    Experiment
                    • EyeTracker
                      EyeTracker
                      • None
                        None
                      • None
                        None
                      • None
                        None
                      • None
                        None
                      • 1000
                        1000
                      • None
                        None
                      • None
                        None
                    • 1000
                      1000
                    • Screen
                      Screen
                      • 68
                        68
                      • 30.2
                        30.2
                      • 1024
                        1024
                      • 'upper left'
                        'upper left'
                      • 38
                        38
                      • 1280
                        1280
                      • 15.599386487782953
                        15.599386487782953
                      • -15.599386487782953
                        -15.599386487782953
                      • 12.508044410882546
                        12.508044410882546
                      • -12.508044410882546
                        -12.508044410882546
                • Gaze
                  • DataFrame (7 columns, 29799 rows)
                    shape: (29_799, 7)
                    timestimuli_xstimuli_ytext_idpage_idpixelposition
                    i64f64f64i64i64list[f64]list[f64]
                    2008305-1.0-1.002[141.4, 153.6][-12.268583, -8.823284]
                    2008306-1.0-1.002[141.1, 153.2][-12.275749, -8.832989]
                    2008307-1.0-1.002[140.7, 152.8][-12.285302, -8.842695]
                    2008308-1.0-1.002[140.6, 152.7][-12.28769, -8.845121]
                    2008309-1.0-1.002[140.5, 152.6][-12.290078, -8.847547]
                    2038099-1.0-1.002[273.8, 773.8][-9.071149, 6.490168]
                    2038100-1.0-1.002[273.8, 774.1][-9.071149, 6.497527]
                    2038101-1.0-1.002[273.9, 774.5][-9.06871, 6.50734]
                    2038102-1.0-1.002[274.0, 774.4][-9.066271, 6.504886]
                    2038103-1.0-1.002[274.0, 773.9][-9.066271, 6.492621]
                  • Events
                    Events
                    • DataFrame (6 columns, 0 rows)
                      shape: (0, 6)
                      text_idpage_idnameonsetoffsetduration
                      i64i64stri64i64i64
                    • list (2 items)
                      • 'text_id'
                      • 'page_id'
                  • list (2 items)
                    • 'text_id'
                    • 'page_id'
                  • Experiment
                    Experiment
                    • EyeTracker
                      EyeTracker
                      • None
                        None
                      • None
                        None
                      • None
                        None
                      • None
                        None
                      • 1000
                        1000
                      • None
                        None
                      • None
                        None
                    • 1000
                      1000
                    • Screen
                      Screen
                      • 68
                        68
                      • 30.2
                        30.2
                      • 1024
                        1024
                      • 'upper left'
                        'upper left'
                      • 38
                        38
                      • 1280
                        1280
                      • 15.599386487782953
                        15.599386487782953
                      • -15.599386487782953
                        -15.599386487782953
                      • 12.508044410882546
                        12.508044410882546
                      • -12.508044410882546
                        -12.508044410882546
                • (18 more)
              • PosixPath('data/ToyDataset')
                PosixPath('data/ToyDataset')
              • DatasetPaths
                DatasetPaths
                • PosixPath('data/ToyDataset')
                  PosixPath('data/ToyDataset')
                • PosixPath('data/ToyDataset/downloads')
                  PosixPath('data/ToyDataset/downloads')
                • PosixPath('data/ToyDataset/events')
                  PosixPath('data/ToyDataset/events')
                • PosixPath('data/ToyDataset/precomputed_events')
                  PosixPath('data/ToyDataset/precomputed_events')
                • PosixPath
                  PosixPath('data/ToyDataset/precomputed_reading_measures')
                • PosixPath('data/ToyDataset/preprocessed')
                  PosixPath('data/ToyDataset/preprocessed')
                • PosixPath('data/ToyDataset/raw')
                  PosixPath('data/ToyDataset/raw')
                • PosixPath('data/ToyDataset')
                  PosixPath('data/ToyDataset')
              • list (0 items)
                • list (0 items)

                  Step 3: Detect Fixations with Different Parameters#

                  We’ll detect fixations using the I-DT (Dispersion-Threshold) algorithm with different dispersion threshold values to create two different sets of fixation events that will be plotted separately.

                  Key Parameters:

                  • dispersion_threshold: Maximum dispersion allowed for fixation points (in degrees)

                  • name: Custom name for the detected events

                  # Detect fixations with standard threshold (2.7 degrees)
                  dataset.detect_events('idt', dispersion_threshold=2.7, name='fixation_2.7_idt')
                  
                  # Detect fixations with stricter threshold (1.0 degrees)
                  dataset.detect_events('idt', dispersion_threshold=1.0, name='fixation_1.0_idt')
                  
                  Dataset
                  • DatasetDefinition
                    DatasetDefinition
                    • None
                      None
                    • dict (0 items)
                      • dict (1 items)
                        • dict (4 items)
                          • list (5 items)
                            • 'timestamp'
                            • 'x'
                            • (3 more)
                          • dict (5 items)
                            • Float64
                              Float64
                            • Float64
                              Float64
                            • (3 more)
                          • (2 more)
                      • None
                        None
                      • Experiment
                        Experiment
                        • EyeTracker
                          EyeTracker
                          • None
                            None
                          • None
                            None
                          • None
                            None
                          • None
                            None
                          • 1000
                            1000
                          • None
                            None
                          • None
                            None
                        • 1000
                          1000
                        • Screen
                          Screen
                          • 68
                            68
                          • 30.2
                            30.2
                          • 1024
                            1024
                          • 'upper left'
                            'upper left'
                          • 38
                            38
                          • 1280
                            1280
                          • 15.599386487782953
                            15.599386487782953
                          • -15.599386487782953
                            -15.599386487782953
                          • 12.508044410882546
                            12.508044410882546
                          • -12.508044410882546
                            -12.508044410882546
                      • None
                        None
                      • dict (1 items)
                        • 'trial_{text_id:d}_{page_id:d}.csv'
                          'trial_{text_id:d}_{page_id:d}.csv'
                      • dict (1 items)
                        • dict (2 items)
                          • <class 'int'>
                            <class 'int'>
                          • <class 'int'>
                            <class 'int'>
                      • True
                        True
                      • 'pymovements Toy Dataset'
                        'pymovements Toy Dataset'
                      • dict (0 items)
                        • 'ToyDataset'
                          'ToyDataset'
                        • list (2 items)
                          • 'x'
                          • 'y'
                        • None
                          None
                        • list (1 items)
                          • ResourceDefinition
                            • 'gaze'
                              'gaze'
                            • 'pymovements-toy-dataset.zip'
                              'pymovements-toy-dataset.zip'
                            • 'trial_{text_id:d}_{page_id:d}.csv'
                              'trial_{text_id:d}_{page_id:d}.csv'
                            • dict (2 items)
                              • <class 'int'>
                                <class 'int'>
                              • <class 'int'>
                                <class 'int'>
                            • None
                              None
                            • None
                              None
                            • '256901852c1c07581d375eef705855d6'
                              '256901852c1c07581d375eef705855d6'
                            • None
                              None
                            • str
                              'https://github.com/pymovements/pymovements-toy-dataset/archive/refs/heads/main.zip'
                        • 'timestamp'
                          'timestamp'
                        • 'ms'
                          'ms'
                        • None
                          None
                        • None
                          None
                      • tuple
                        (shape: (133, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 0 ┆ 1 ┆ fixation_2.7_idt ┆ 1988145 ┆ 1988563 ┆ 418 │ │ 0 ┆ 1 ┆ fixation_2.7_idt ┆ 1988564 ┆ 1988750 ┆ 186 │ │ 0 ┆ 1 ┆ fixation_2.7_idt ┆ 1988751 ┆ 1989178 ┆ 427 │ │ 0 ┆ 1 ┆ fixation_2.7_idt ┆ 1989179 ┆ 1989436 ┆ 257 │ │ 0 ┆ 1 ┆ fixation_2.7_idt ┆ 1989437 ┆ 1989600 ┆ 163 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 0 ┆ 1 ┆ fixation_1.0_idt ┆ 2004363 ┆ 2004552 ┆ 189 │ │ 0 ┆ 1 ┆ fixation_1.0_idt ┆ 2004553 ┆ 2004696 ┆ 143 │ │ 0 ┆ 1 ┆ fixation_1.0_idt ┆ 2004697 ┆ 2004811 ┆ 114 │ │ 0 ┆ 1 ┆ fixation_1.0_idt ┆ 2004894 ┆ 2005116 ┆ 222 │ │ 0 ┆ 1 ┆ fixation_1.0_idt ┆ 2005117 ┆ 2005292 ┆ 175 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (225, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 0 ┆ 2 ┆ fixation_2.7_idt ┆ 2008305 ┆ 2008621 ┆ 316 │ │ 0 ┆ 2 ┆ fixation_2.7_idt ┆ 2008622 ┆ 2008821 ┆ 199 │ │ 0 ┆ 2 ┆ fixation_2.7_idt ┆ 2008822 ┆ 2009214 ┆ 392 │ │ 0 ┆ 2 ┆ fixation_2.7_idt ┆ 2009215 ┆ 2009433 ┆ 218 │ │ 0 ┆ 2 ┆ fixation_2.7_idt ┆ 2009434 ┆ 2009704 ┆ 270 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 0 ┆ 2 ┆ fixation_1.0_idt ┆ 2036835 ┆ 2037166 ┆ 331 │ │ 0 ┆ 2 ┆ fixation_1.0_idt ┆ 2037171 ┆ 2037419 ┆ 248 │ │ 0 ┆ 2 ┆ fixation_1.0_idt ┆ 2037469 ┆ 2037619 ┆ 150 │ │ 0 ┆ 2 ┆ fixation_1.0_idt ┆ 2037648 ┆ 2037816 ┆ 168 │ │ 0 ┆ 2 ┆ fixation_1.0_idt ┆ 2037824 ┆ 2038103 ┆ 279 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (209, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 0 ┆ 3 ┆ fixation_2.7_idt ┆ 2041029 ┆ 2041360 ┆ 331 │ │ 0 ┆ 3 ┆ fixation_2.7_idt ┆ 2041361 ┆ 2041563 ┆ 202 │ │ 0 ┆ 3 ┆ fixation_2.7_idt ┆ 2041564 ┆ 2041761 ┆ 197 │ │ 0 ┆ 3 ┆ fixation_2.7_idt ┆ 2041762 ┆ 2041945 ┆ 183 │ │ 0 ┆ 3 ┆ fixation_2.7_idt ┆ 2041946 ┆ 2042314 ┆ 368 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 0 ┆ 3 ┆ fixation_1.0_idt ┆ 2066243 ┆ 2066560 ┆ 317 │ │ 0 ┆ 3 ┆ fixation_1.0_idt ┆ 2066566 ┆ 2066754 ┆ 188 │ │ 0 ┆ 3 ┆ fixation_1.0_idt ┆ 2066761 ┆ 2066964 ┆ 203 │ │ 0 ┆ 3 ┆ fixation_1.0_idt ┆ 2066977 ┆ 2067299 ┆ 322 │ │ 0 ┆ 3 ┆ fixation_1.0_idt ┆ 2067306 ┆ 2067590 ┆ 284 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (251, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 0 ┆ 4 ┆ fixation_2.7_idt ┆ 2070587 ┆ 2070931 ┆ 344 │ │ 0 ┆ 4 ┆ fixation_2.7_idt ┆ 2070932 ┆ 2071140 ┆ 208 │ │ 0 ┆ 4 ┆ fixation_2.7_idt ┆ 2071141 ┆ 2071532 ┆ 391 │ │ 0 ┆ 4 ┆ fixation_2.7_idt ┆ 2071533 ┆ 2071744 ┆ 211 │ │ 0 ┆ 4 ┆ fixation_2.7_idt ┆ 2071745 ┆ 2072028 ┆ 283 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 0 ┆ 4 ┆ fixation_1.0_idt ┆ 2102370 ┆ 2102479 ┆ 109 │ │ 0 ┆ 4 ┆ fixation_1.0_idt ┆ 2102480 ┆ 2102656 ┆ 176 │ │ 0 ┆ 4 ┆ fixation_1.0_idt ┆ 2102662 ┆ 2102774 ┆ 112 │ │ 0 ┆ 4 ┆ fixation_1.0_idt ┆ 2102836 ┆ 2103014 ┆ 178 │ │ 0 ┆ 4 ┆ fixation_1.0_idt ┆ 2103015 ┆ 2103190 ┆ 175 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (244, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 0 ┆ 5 ┆ fixation_2.7_idt ┆ 2105893 ┆ 2106270 ┆ 377 │ │ 0 ┆ 5 ┆ fixation_2.7_idt ┆ 2106271 ┆ 2106700 ┆ 429 │ │ 0 ┆ 5 ┆ fixation_2.7_idt ┆ 2106701 ┆ 2106958 ┆ 257 │ │ 0 ┆ 5 ┆ fixation_2.7_idt ┆ 2106959 ┆ 2107189 ┆ 230 │ │ 0 ┆ 5 ┆ fixation_2.7_idt ┆ 2107190 ┆ 2107488 ┆ 298 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 0 ┆ 5 ┆ fixation_1.0_idt ┆ 2137903 ┆ 2138104 ┆ 201 │ │ 0 ┆ 5 ┆ fixation_1.0_idt ┆ 2138142 ┆ 2138343 ┆ 201 │ │ 0 ┆ 5 ┆ fixation_1.0_idt ┆ 2138346 ┆ 2138528 ┆ 182 │ │ 0 ┆ 5 ┆ fixation_1.0_idt ┆ 2138536 ┆ 2138849 ┆ 313 │ │ 0 ┆ 5 ┆ fixation_1.0_idt ┆ 2138854 ┆ 2138966 ┆ 112 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (190, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 1 ┆ 1 ┆ fixation_2.7_idt ┆ 2415266 ┆ 2415669 ┆ 403 │ │ 1 ┆ 1 ┆ fixation_2.7_idt ┆ 2415670 ┆ 2415857 ┆ 187 │ │ 1 ┆ 1 ┆ fixation_2.7_idt ┆ 2415858 ┆ 2416221 ┆ 363 │ │ 1 ┆ 1 ┆ fixation_2.7_idt ┆ 2416222 ┆ 2416431 ┆ 209 │ │ 1 ┆ 1 ┆ fixation_2.7_idt ┆ 2416432 ┆ 2416833 ┆ 401 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 1 ┆ 1 ┆ fixation_1.0_idt ┆ 2437312 ┆ 2437450 ┆ 138 │ │ 1 ┆ 1 ┆ fixation_1.0_idt ┆ 2437451 ┆ 2437557 ┆ 106 │ │ 1 ┆ 1 ┆ fixation_1.0_idt ┆ 2437560 ┆ 2437861 ┆ 301 │ │ 1 ┆ 1 ┆ fixation_1.0_idt ┆ 2437866 ┆ 2438090 ┆ 224 │ │ 1 ┆ 1 ┆ fixation_1.0_idt ┆ 2438093 ┆ 2438319 ┆ 226 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (164, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 1 ┆ 2 ┆ fixation_2.7_idt ┆ 2440987 ┆ 2441199 ┆ 212 │ │ 1 ┆ 2 ┆ fixation_2.7_idt ┆ 2441201 ┆ 2441540 ┆ 339 │ │ 1 ┆ 2 ┆ fixation_2.7_idt ┆ 2441541 ┆ 2441735 ┆ 194 │ │ 1 ┆ 2 ┆ fixation_2.7_idt ┆ 2441736 ┆ 2442222 ┆ 486 │ │ 1 ┆ 2 ┆ fixation_2.7_idt ┆ 2442223 ┆ 2442432 ┆ 209 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 1 ┆ 2 ┆ fixation_1.0_idt ┆ 2462110 ┆ 2462343 ┆ 233 │ │ 1 ┆ 2 ┆ fixation_1.0_idt ┆ 2462348 ┆ 2462654 ┆ 306 │ │ 1 ┆ 2 ┆ fixation_1.0_idt ┆ 2462730 ┆ 2462844 ┆ 114 │ │ 1 ┆ 2 ┆ fixation_1.0_idt ┆ 2462845 ┆ 2462949 ┆ 104 │ │ 1 ┆ 2 ┆ fixation_1.0_idt ┆ 2462953 ┆ 2463278 ┆ 325 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (219, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 1 ┆ 3 ┆ fixation_2.7_idt ┆ 2466370 ┆ 2466713 ┆ 343 │ │ 1 ┆ 3 ┆ fixation_2.7_idt ┆ 2466714 ┆ 2466931 ┆ 217 │ │ 1 ┆ 3 ┆ fixation_2.7_idt ┆ 2466932 ┆ 2467210 ┆ 278 │ │ 1 ┆ 3 ┆ fixation_2.7_idt ┆ 2467211 ┆ 2467634 ┆ 423 │ │ 1 ┆ 3 ┆ fixation_2.7_idt ┆ 2467635 ┆ 2467847 ┆ 212 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 1 ┆ 3 ┆ fixation_1.0_idt ┆ 2494747 ┆ 2494883 ┆ 136 │ │ 1 ┆ 3 ┆ fixation_1.0_idt ┆ 2494909 ┆ 2495134 ┆ 225 │ │ 1 ┆ 3 ┆ fixation_1.0_idt ┆ 2495159 ┆ 2495358 ┆ 199 │ │ 1 ┆ 3 ┆ fixation_1.0_idt ┆ 2495359 ┆ 2495544 ┆ 185 │ │ 1 ┆ 3 ┆ fixation_1.0_idt ┆ 2495580 ┆ 2495757 ┆ 177 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (251, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 1 ┆ 4 ┆ fixation_2.7_idt ┆ 2498476 ┆ 2498820 ┆ 344 │ │ 1 ┆ 4 ┆ fixation_2.7_idt ┆ 2498821 ┆ 2499287 ┆ 466 │ │ 1 ┆ 4 ┆ fixation_2.7_idt ┆ 2499288 ┆ 2499810 ┆ 522 │ │ 1 ┆ 4 ┆ fixation_2.7_idt ┆ 2499811 ┆ 2500103 ┆ 292 │ │ 1 ┆ 4 ┆ fixation_2.7_idt ┆ 2500104 ┆ 2500284 ┆ 180 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 1 ┆ 4 ┆ fixation_1.0_idt ┆ 2531481 ┆ 2531766 ┆ 285 │ │ 1 ┆ 4 ┆ fixation_1.0_idt ┆ 2531771 ┆ 2532127 ┆ 356 │ │ 1 ┆ 4 ┆ fixation_1.0_idt ┆ 2532133 ┆ 2532430 ┆ 297 │ │ 1 ┆ 4 ┆ fixation_1.0_idt ┆ 2532445 ┆ 2532808 ┆ 363 │ │ 1 ┆ 4 ┆ fixation_1.0_idt ┆ 2532817 ┆ 2532945 ┆ 128 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (178, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 1 ┆ 5 ┆ fixation_2.7_idt ┆ 2535732 ┆ 2536093 ┆ 361 │ │ 1 ┆ 5 ┆ fixation_2.7_idt ┆ 2536094 ┆ 2536624 ┆ 530 │ │ 1 ┆ 5 ┆ fixation_2.7_idt ┆ 2536628 ┆ 2536852 ┆ 224 │ │ 1 ┆ 5 ┆ fixation_2.7_idt ┆ 2536853 ┆ 2537086 ┆ 233 │ │ 1 ┆ 5 ┆ fixation_2.7_idt ┆ 2537087 ┆ 2537493 ┆ 406 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 1 ┆ 5 ┆ fixation_1.0_idt ┆ 2558102 ┆ 2558293 ┆ 191 │ │ 1 ┆ 5 ┆ fixation_1.0_idt ┆ 2558298 ┆ 2558508 ┆ 210 │ │ 1 ┆ 5 ┆ fixation_1.0_idt ┆ 2558515 ┆ 2558826 ┆ 311 │ │ 1 ┆ 5 ┆ fixation_1.0_idt ┆ 2558836 ┆ 2559144 ┆ 308 │ │ 1 ┆ 5 ┆ fixation_1.0_idt ┆ 2559156 ┆ 2559324 ┆ 168 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (215, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 2 ┆ 1 ┆ fixation_2.7_idt ┆ 1788369 ┆ 1788627 ┆ 258 │ │ 2 ┆ 1 ┆ fixation_2.7_idt ┆ 1788628 ┆ 1788968 ┆ 340 │ │ 2 ┆ 1 ┆ fixation_2.7_idt ┆ 1788969 ┆ 1789139 ┆ 170 │ │ 2 ┆ 1 ┆ fixation_2.7_idt ┆ 1789140 ┆ 1789319 ┆ 179 │ │ 2 ┆ 1 ┆ fixation_2.7_idt ┆ 1789320 ┆ 1789594 ┆ 274 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2 ┆ 1 ┆ fixation_1.0_idt ┆ 1816726 ┆ 1816874 ┆ 148 │ │ 2 ┆ 1 ┆ fixation_1.0_idt ┆ 1816883 ┆ 1817065 ┆ 182 │ │ 2 ┆ 1 ┆ fixation_1.0_idt ┆ 1817066 ┆ 1817193 ┆ 127 │ │ 2 ┆ 1 ┆ fixation_1.0_idt ┆ 1817209 ┆ 1817534 ┆ 325 │ │ 2 ┆ 1 ┆ fixation_1.0_idt ┆ 1817535 ┆ 1818028 ┆ 493 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (231, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 2 ┆ 2 ┆ fixation_2.7_idt ┆ 1821110 ┆ 1821608 ┆ 498 │ │ 2 ┆ 2 ┆ fixation_2.7_idt ┆ 1821609 ┆ 1822344 ┆ 735 │ │ 2 ┆ 2 ┆ fixation_2.7_idt ┆ 1822345 ┆ 1822843 ┆ 498 │ │ 2 ┆ 2 ┆ fixation_2.7_idt ┆ 1822844 ┆ 1823142 ┆ 298 │ │ 2 ┆ 2 ┆ fixation_2.7_idt ┆ 1823143 ┆ 1823381 ┆ 238 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2 ┆ 2 ┆ fixation_1.0_idt ┆ 1853149 ┆ 1853339 ┆ 190 │ │ 2 ┆ 2 ┆ fixation_1.0_idt ┆ 1853405 ┆ 1853599 ┆ 194 │ │ 2 ┆ 2 ┆ fixation_1.0_idt ┆ 1853600 ┆ 1853785 ┆ 185 │ │ 2 ┆ 2 ┆ fixation_1.0_idt ┆ 1853789 ┆ 1853971 ┆ 182 │ │ 2 ┆ 2 ┆ fixation_1.0_idt ┆ 1853984 ┆ 1854202 ┆ 218 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (219, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 2 ┆ 3 ┆ fixation_2.7_idt ┆ 1857182 ┆ 1857905 ┆ 723 │ │ 2 ┆ 3 ┆ fixation_2.7_idt ┆ 1857906 ┆ 1858241 ┆ 335 │ │ 2 ┆ 3 ┆ fixation_2.7_idt ┆ 1858242 ┆ 1858669 ┆ 427 │ │ 2 ┆ 3 ┆ fixation_2.7_idt ┆ 1858670 ┆ 1858930 ┆ 260 │ │ 2 ┆ 3 ┆ fixation_2.7_idt ┆ 1858931 ┆ 1859166 ┆ 235 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2 ┆ 3 ┆ fixation_1.0_idt ┆ 1886974 ┆ 1887249 ┆ 275 │ │ 2 ┆ 3 ┆ fixation_1.0_idt ┆ 1887263 ┆ 1887736 ┆ 473 │ │ 2 ┆ 3 ┆ fixation_1.0_idt ┆ 1887766 ┆ 1888169 ┆ 403 │ │ 2 ┆ 3 ┆ fixation_1.0_idt ┆ 1888173 ┆ 1888408 ┆ 235 │ │ 2 ┆ 3 ┆ fixation_1.0_idt ┆ 1888409 ┆ 1888586 ┆ 177 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (212, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 2 ┆ 4 ┆ fixation_2.7_idt ┆ 1892056 ┆ 1892406 ┆ 350 │ │ 2 ┆ 4 ┆ fixation_2.7_idt ┆ 1892407 ┆ 1892889 ┆ 482 │ │ 2 ┆ 4 ┆ fixation_2.7_idt ┆ 1892890 ┆ 1893069 ┆ 179 │ │ 2 ┆ 4 ┆ fixation_2.7_idt ┆ 1893070 ┆ 1893225 ┆ 155 │ │ 2 ┆ 4 ┆ fixation_2.7_idt ┆ 1893311 ┆ 1893517 ┆ 206 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2 ┆ 4 ┆ fixation_1.0_idt ┆ 1920510 ┆ 1920653 ┆ 143 │ │ 2 ┆ 4 ┆ fixation_1.0_idt ┆ 1920658 ┆ 1920937 ┆ 279 │ │ 2 ┆ 4 ┆ fixation_1.0_idt ┆ 1920942 ┆ 1921187 ┆ 245 │ │ 2 ┆ 4 ┆ fixation_1.0_idt ┆ 1921195 ┆ 1921471 ┆ 276 │ │ 2 ┆ 4 ┆ fixation_1.0_idt ┆ 1921474 ┆ 1921833 ┆ 359 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (193, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 2 ┆ 5 ┆ fixation_2.7_idt ┆ 1925919 ┆ 1926303 ┆ 384 │ │ 2 ┆ 5 ┆ fixation_2.7_idt ┆ 1926304 ┆ 1926910 ┆ 606 │ │ 2 ┆ 5 ┆ fixation_2.7_idt ┆ 1926911 ┆ 1927269 ┆ 358 │ │ 2 ┆ 5 ┆ fixation_2.7_idt ┆ 1927270 ┆ 1927726 ┆ 456 │ │ 2 ┆ 5 ┆ fixation_2.7_idt ┆ 1927727 ┆ 1928262 ┆ 535 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2 ┆ 5 ┆ fixation_1.0_idt ┆ 1951589 ┆ 1951695 ┆ 106 │ │ 2 ┆ 5 ┆ fixation_1.0_idt ┆ 1951696 ┆ 1951960 ┆ 264 │ │ 2 ┆ 5 ┆ fixation_1.0_idt ┆ 1951961 ┆ 1952145 ┆ 184 │ │ 2 ┆ 5 ┆ fixation_1.0_idt ┆ 1952151 ┆ 1952356 ┆ 205 │ │ 2 ┆ 5 ┆ fixation_1.0_idt ┆ 1952359 ┆ 1952633 ┆ 274 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (202, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 3 ┆ 1 ┆ fixation_2.7_idt ┆ 2199265 ┆ 2199661 ┆ 396 │ │ 3 ┆ 1 ┆ fixation_2.7_idt ┆ 2199662 ┆ 2200378 ┆ 716 │ │ 3 ┆ 1 ┆ fixation_2.7_idt ┆ 2200379 ┆ 2200686 ┆ 307 │ │ 3 ┆ 1 ┆ fixation_2.7_idt ┆ 2200687 ┆ 2201153 ┆ 466 │ │ 3 ┆ 1 ┆ fixation_2.7_idt ┆ 2201154 ┆ 2201403 ┆ 249 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 3 ┆ 1 ┆ fixation_1.0_idt ┆ 2224379 ┆ 2224679 ┆ 300 │ │ 3 ┆ 1 ┆ fixation_1.0_idt ┆ 2224689 ┆ 2225103 ┆ 414 │ │ 3 ┆ 1 ┆ fixation_1.0_idt ┆ 2225111 ┆ 2225405 ┆ 294 │ │ 3 ┆ 1 ┆ fixation_1.0_idt ┆ 2225414 ┆ 2225615 ┆ 201 │ │ 3 ┆ 1 ┆ fixation_1.0_idt ┆ 2225673 ┆ 2226163 ┆ 490 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (206, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 3 ┆ 2 ┆ fixation_2.7_idt ┆ 2228730 ┆ 2229180 ┆ 450 │ │ 3 ┆ 2 ┆ fixation_2.7_idt ┆ 2229181 ┆ 2229369 ┆ 188 │ │ 3 ┆ 2 ┆ fixation_2.7_idt ┆ 2229370 ┆ 2229774 ┆ 404 │ │ 3 ┆ 2 ┆ fixation_2.7_idt ┆ 2229775 ┆ 2229997 ┆ 222 │ │ 3 ┆ 2 ┆ fixation_2.7_idt ┆ 2229998 ┆ 2230196 ┆ 198 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 3 ┆ 2 ┆ fixation_1.0_idt ┆ 2254525 ┆ 2254912 ┆ 387 │ │ 3 ┆ 2 ┆ fixation_1.0_idt ┆ 2254915 ┆ 2255102 ┆ 187 │ │ 3 ┆ 2 ┆ fixation_1.0_idt ┆ 2255165 ┆ 2255323 ┆ 158 │ │ 3 ┆ 2 ┆ fixation_1.0_idt ┆ 2255328 ┆ 2255516 ┆ 188 │ │ 3 ┆ 2 ┆ fixation_1.0_idt ┆ 2255524 ┆ 2255755 ┆ 231 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (209, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 3 ┆ 3 ┆ fixation_2.7_idt ┆ 2258387 ┆ 2258821 ┆ 434 │ │ 3 ┆ 3 ┆ fixation_2.7_idt ┆ 2258822 ┆ 2259026 ┆ 204 │ │ 3 ┆ 3 ┆ fixation_2.7_idt ┆ 2259027 ┆ 2259474 ┆ 447 │ │ 3 ┆ 3 ┆ fixation_2.7_idt ┆ 2259475 ┆ 2259715 ┆ 240 │ │ 3 ┆ 3 ┆ fixation_2.7_idt ┆ 2259716 ┆ 2260414 ┆ 698 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 3 ┆ 3 ┆ fixation_1.0_idt ┆ 2285894 ┆ 2286028 ┆ 134 │ │ 3 ┆ 3 ┆ fixation_1.0_idt ┆ 2286090 ┆ 2286206 ┆ 116 │ │ 3 ┆ 3 ┆ fixation_1.0_idt ┆ 2286240 ┆ 2286539 ┆ 299 │ │ 3 ┆ 3 ┆ fixation_1.0_idt ┆ 2286568 ┆ 2286749 ┆ 181 │ │ 3 ┆ 3 ┆ fixation_1.0_idt ┆ 2286750 ┆ 2286962 ┆ 212 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (231, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 3 ┆ 4 ┆ fixation_2.7_idt ┆ 2289654 ┆ 2290027 ┆ 373 │ │ 3 ┆ 4 ┆ fixation_2.7_idt ┆ 2290028 ┆ 2290269 ┆ 241 │ │ 3 ┆ 4 ┆ fixation_2.7_idt ┆ 2290270 ┆ 2290536 ┆ 266 │ │ 3 ┆ 4 ┆ fixation_2.7_idt ┆ 2290537 ┆ 2290959 ┆ 422 │ │ 3 ┆ 4 ┆ fixation_2.7_idt ┆ 2290960 ┆ 2291270 ┆ 310 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 3 ┆ 4 ┆ fixation_1.0_idt ┆ 2319961 ┆ 2320082 ┆ 121 │ │ 3 ┆ 4 ┆ fixation_1.0_idt ┆ 2320083 ┆ 2320263 ┆ 180 │ │ 3 ┆ 4 ┆ fixation_1.0_idt ┆ 2320331 ┆ 2320544 ┆ 213 │ │ 3 ┆ 4 ┆ fixation_1.0_idt ┆ 2320545 ┆ 2320848 ┆ 303 │ │ 3 ┆ 4 ┆ fixation_1.0_idt ┆ 2320853 ┆ 2321201 ┆ 348 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘, shape: (220, 6) ┌─────────┬─────────┬──────────────────┬─────────┬─────────┬──────────┐ │ text_id ┆ page_id ┆ name ┆ onset ┆ offset ┆ duration │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ i64 ┆ i64 ┆ str ┆ i64 ┆ i64 ┆ i64 │ ╞═════════╪═════════╪══════════════════╪═════════╪═════════╪══════════╡ │ 3 ┆ 5 ┆ fixation_2.7_idt ┆ 2323912 ┆ 2324303 ┆ 391 │ │ 3 ┆ 5 ┆ fixation_2.7_idt ┆ 2324304 ┆ 2324735 ┆ 431 │ │ 3 ┆ 5 ┆ fixation_2.7_idt ┆ 2324736 ┆ 2325103 ┆ 367 │ │ 3 ┆ 5 ┆ fixation_2.7_idt ┆ 2325104 ┆ 2325347 ┆ 243 │ │ 3 ┆ 5 ┆ fixation_2.7_idt ┆ 2325348 ┆ 2325597 ┆ 249 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 3 ┆ 5 ┆ fixation_1.0_idt ┆ 2352606 ┆ 2352794 ┆ 188 │ │ 3 ┆ 5 ┆ fixation_1.0_idt ┆ 2352802 ┆ 2353048 ┆ 246 │ │ 3 ┆ 5 ┆ fixation_1.0_idt ┆ 2353049 ┆ 2353403 ┆ 354 │ │ 3 ┆ 5 ┆ fixation_1.0_idt ┆ 2353411 ┆ 2353628 ┆ 217 │ │ 3 ┆ 5 ┆ fixation_1.0_idt ┆ 2353636 ┆ 2353777 ┆ 141 │ └─────────┴─────────┴──────────────────┴─────────┴─────────┴──────────┘)
                      • dict (1 items)
                        • DataFrame (5 columns, 20 rows)
                          shape: (20, 5)
                          text_idpage_idfilepathload_functionload_kwargs
                          i64i64strnullnull
                          01"pymovements-toy-dataset-main/d…nullnull
                          02"pymovements-toy-dataset-main/d…nullnull
                          03"pymovements-toy-dataset-main/d…nullnull
                          04"pymovements-toy-dataset-main/d…nullnull
                          05"pymovements-toy-dataset-main/d…nullnull
                          31"pymovements-toy-dataset-main/d…nullnull
                          32"pymovements-toy-dataset-main/d…nullnull
                          33"pymovements-toy-dataset-main/d…nullnull
                          34"pymovements-toy-dataset-main/d…nullnull
                          35"pymovements-toy-dataset-main/d…nullnull
                      • list (20 items)
                        • Gaze
                          • DataFrame (7 columns, 17223 rows)
                            shape: (17_223, 7)
                            timestimuli_xstimuli_ytext_idpage_idpixelposition
                            i64f64f64i64i64list[f64]list[f64]
                            1988145-1.0-1.001[206.8, 152.4][-10.697598, -8.852399]
                            1988146-1.0-1.001[206.9, 152.1][-10.695183, -8.859678]
                            1988147-1.0-1.001[207.0, 151.8][-10.692768, -8.866956]
                            1988148-1.0-1.001[207.1, 151.7][-10.690352, -8.869381]
                            1988149-1.0-1.001[207.0, 151.5][-10.692768, -8.874233]
                            2005363-1.0-1.001[361.0, 415.4][-6.932438, -2.386672]
                            2005364-1.0-1.001[358.0, 414.5][-7.006376, -2.408998]
                            2005365-1.0-1.001[355.8, 413.8][-7.060582, -2.426362]
                            2005366-1.0-1.001[353.1, 413.2][-7.12709, -2.441245]
                            2005367-1.0-1.001[351.2, 412.9][-7.173881, -2.448686]
                          • Events
                            Events
                            • DataFrame (6 columns, 133 rows)
                              shape: (133, 6)
                              text_idpage_idnameonsetoffsetduration
                              i64i64stri64i64i64
                              01"fixation_2.7_idt"19881451988563418
                              01"fixation_2.7_idt"19885641988750186
                              01"fixation_2.7_idt"19887511989178427
                              01"fixation_2.7_idt"19891791989436257
                              01"fixation_2.7_idt"19894371989600163
                              01"fixation_1.0_idt"20043632004552189
                              01"fixation_1.0_idt"20045532004696143
                              01"fixation_1.0_idt"20046972004811114
                              01"fixation_1.0_idt"20048942005116222
                              01"fixation_1.0_idt"20051172005292175
                            • list (2 items)
                              • 'text_id'
                              • 'page_id'
                          • list (2 items)
                            • 'text_id'
                            • 'page_id'
                          • Experiment
                            Experiment
                            • EyeTracker
                              EyeTracker
                              • None
                                None
                              • None
                                None
                              • None
                                None
                              • None
                                None
                              • 1000
                                1000
                              • None
                                None
                              • None
                                None
                            • 1000
                              1000
                            • Screen
                              Screen
                              • 68
                                68
                              • 30.2
                                30.2
                              • 1024
                                1024
                              • 'upper left'
                                'upper left'
                              • 38
                                38
                              • 1280
                                1280
                              • 15.599386487782953
                                15.599386487782953
                              • -15.599386487782953
                                -15.599386487782953
                              • 12.508044410882546
                                12.508044410882546
                              • -12.508044410882546
                                -12.508044410882546
                        • Gaze
                          • DataFrame (7 columns, 29799 rows)
                            shape: (29_799, 7)
                            timestimuli_xstimuli_ytext_idpage_idpixelposition
                            i64f64f64i64i64list[f64]list[f64]
                            2008305-1.0-1.002[141.4, 153.6][-12.268583, -8.823284]
                            2008306-1.0-1.002[141.1, 153.2][-12.275749, -8.832989]
                            2008307-1.0-1.002[140.7, 152.8][-12.285302, -8.842695]
                            2008308-1.0-1.002[140.6, 152.7][-12.28769, -8.845121]
                            2008309-1.0-1.002[140.5, 152.6][-12.290078, -8.847547]
                            2038099-1.0-1.002[273.8, 773.8][-9.071149, 6.490168]
                            2038100-1.0-1.002[273.8, 774.1][-9.071149, 6.497527]
                            2038101-1.0-1.002[273.9, 774.5][-9.06871, 6.50734]
                            2038102-1.0-1.002[274.0, 774.4][-9.066271, 6.504886]
                            2038103-1.0-1.002[274.0, 773.9][-9.066271, 6.492621]
                          • Events
                            Events
                            • DataFrame (6 columns, 225 rows)
                              shape: (225, 6)
                              text_idpage_idnameonsetoffsetduration
                              i64i64stri64i64i64
                              02"fixation_2.7_idt"20083052008621316
                              02"fixation_2.7_idt"20086222008821199
                              02"fixation_2.7_idt"20088222009214392
                              02"fixation_2.7_idt"20092152009433218
                              02"fixation_2.7_idt"20094342009704270
                              02"fixation_1.0_idt"20368352037166331
                              02"fixation_1.0_idt"20371712037419248
                              02"fixation_1.0_idt"20374692037619150
                              02"fixation_1.0_idt"20376482037816168
                              02"fixation_1.0_idt"20378242038103279
                            • list (2 items)
                              • 'text_id'
                              • 'page_id'
                          • list (2 items)
                            • 'text_id'
                            • 'page_id'
                          • Experiment
                            Experiment
                            • EyeTracker
                              EyeTracker
                              • None
                                None
                              • None
                                None
                              • None
                                None
                              • None
                                None
                              • 1000
                                1000
                              • None
                                None
                              • None
                                None
                            • 1000
                              1000
                            • Screen
                              Screen
                              • 68
                                68
                              • 30.2
                                30.2
                              • 1024
                                1024
                              • 'upper left'
                                'upper left'
                              • 38
                                38
                              • 1280
                                1280
                              • 15.599386487782953
                                15.599386487782953
                              • -15.599386487782953
                                -15.599386487782953
                              • 12.508044410882546
                                12.508044410882546
                              • -12.508044410882546
                                -12.508044410882546
                        • (18 more)
                      • PosixPath('data/ToyDataset')
                        PosixPath('data/ToyDataset')
                      • DatasetPaths
                        DatasetPaths
                        • PosixPath('data/ToyDataset')
                          PosixPath('data/ToyDataset')
                        • PosixPath('data/ToyDataset/downloads')
                          PosixPath('data/ToyDataset/downloads')
                        • PosixPath('data/ToyDataset/events')
                          PosixPath('data/ToyDataset/events')
                        • PosixPath('data/ToyDataset/precomputed_events')
                          PosixPath('data/ToyDataset/precomputed_events')
                        • PosixPath
                          PosixPath('data/ToyDataset/precomputed_reading_measures')
                        • PosixPath('data/ToyDataset/preprocessed')
                          PosixPath('data/ToyDataset/preprocessed')
                        • PosixPath('data/ToyDataset/raw')
                          PosixPath('data/ToyDataset/raw')
                        • PosixPath('data/ToyDataset')
                          PosixPath('data/ToyDataset')
                      • list (0 items)
                        • list (0 items)

                          Step 4: Compute Event Properties#

                          Calculate fixation property location that will be used for visualization purposes. This property is added as a separate column named location in the events DataFrame, containing the coordinates of the centroid of each fixation.

                          Parameters:

                          • position_column: Specifies which coordinate system to use for the property. The default value is in degrees, however, in order to generate fixation events containing centroids presented in pixels, its valu has to be explicitely provided.

                          # Get the first gaze recording
                          gaze = dataset.gaze[0]
                          
                          # Compute fixation locations using pixel coordinates
                          gaze.compute_event_properties(("location", {'position_column': 'pixel'}))
                          

                          Step 5: Default Scanpath Visualization#

                          Create a basic scanpath plot to visualize the eye movement fixations. Each fixation is presented as a circle with radius proportional to the fixation duration. The method plots fixations with default name fixation.idt if the argument event_name is not provided.

                          # Create a basic scanpath plot
                          pm.plotting.scanpathplot(gaze)
                          
                          ../_images/0121e4f553a6c315e046ae07c9a2bec553e6807953c67cec196751ac5e211443.png
                          (<Figure size 1500x500 with 1 Axes>, <Axes: >)
                          

                          Step 6: Advanced Scanpath with Trace Plot#

                          Create an enhanced visualization that combines scanpath with trace plot. This shows both the fixation sequence with name fixation1_0.idt that we created in step 3 and the raw gaze trajectory.

                          Key Parameters:

                          • event_name: Specifies which fixation events to plot

                          • add_traceplot: Adds the continuous gaze trace to the plot

                          # Create enhanced scanpath plot with trace
                          pm.plotting.scanpathplot(gaze, event_name='fixation1_0.idt', add_traceplot=True)
                          
                          ../_images/0121e4f553a6c315e046ae07c9a2bec553e6807953c67cec196751ac5e211443.png
                          (<Figure size 1500x500 with 1 Axes>, <Axes: >)
                          

                          What you have learned in this tutorial:#

                          • Data Loading: Importing and preparing eye movement data

                          • Fixation Detection: Creating different sets of fixations with different dispersion thresholds

                          • Property Computation: Calculating fixation locations and properties

                          • Visualization: Creating scanpath plots with various parameters