mark_skipped_tokens#

pymovements.measure.reading.mark_skipped_tokens(all_tokens: DataFrame, fixations: DataFrame) DataFrame[source]#

Mark tokens that were never fixated as skipped.

Performs a left join of all_tokens against the set of fixated (trial, page, word_idx) triples and adds a binary skipped column.

Parameters:
  • all_tokens (pl.DataFrame) – Full token table as returned by all_tokens_from_aois(), containing at least trial, page, and word_idx.

  • fixations (pl.DataFrame) – Fixation events containing at least trial, page, and word_idx. Rows with null word_idx are ignored.

Returns:

all_tokens with an additional skipped column (Int8): 1 if the token was never fixated, 0 otherwise.

Return type:

pl.DataFrame