compute_reading_measures#
- pymovements.measure.reading.compute_reading_measures(fixations: DataFrame, aois: DataFrame, *, word_index_column: str = 'word_idx', word_column: str = 'word') DataFrame[source]#
Compute reading measures from fixation sequences.
This function expects fixations annotated with AOI data. See
map_to_aois()for further details.- Parameters:
fixations (pl.DataFrame) – DataFrame with fixation data, containing the column specified by
word_index_column.aois (pl.DataFrame) – DataFrame with AOI data, containing the columns specified by
word_index_columnandword_column.word_index_column (str) – Shared column name in
fixationsandaoisthat corresponds to the word index of the text. (default:'aoi')word_column (str) – Column in
aoiswith the content within each AOI. (default:'word')
- Returns:
DataFrame with computed reading measures.
- Return type:
pl.DataFrame