TextStimulus#

class pymovements.stimulus.TextStimulus(aois: pl.DataFrame, *, aoi_column: str, start_x_column: str, start_y_column: str, width_column: str | None = None, height_column: str | None = None, end_x_column: str | None = None, end_y_column: str | None = None, page_column: str | None = None)[source]#

A DataFrame for the text stimulus that the gaze data was recorded on.

Parameters:
  • aois (pl.DataFrame) – A stimulus dataframe.

  • aoi_column (str) – Name of the column that contains the content of the aois.

  • start_x_column (str) – Name of the column which contains the x coordinate’s start position of the areas of interest.

  • start_y_column (str) – Name of the column which contains the y coordinate’s start position of the areas of interest.

  • width_column (str | None) – Name of the column which contains the width of the area of interest. (default: None)

  • height_column (str | None) – Name of the column which contains the height of the area of interest. (default: None)

  • end_x_column (str | None) – Name of the column which contains the x coordinate’s end position of the areas of interest. (default: None)

  • end_y_column (str | None) – Name of the column which contains the y coordinate’s end position of the areas of interest. (default: None)

  • page_column (str | None) – Name of the column which contains the page information of the area of interest. (default: None)

Methods

__init__(aois, *, aoi_column, ...[, ...])

get_aoi(*, row, x_eye, y_eye)

Given eye movement and aoi dataframe, return aoi.

split(by)

Split the AOI df.