first_duration#

pymovements.measure.reading.first_duration(fixations: DataFrame) DataFrame[source]#

Compute the duration of the first fixation on each word (FD).

The first fixation is determined by the earliest onset value, regardless of reading pass.

Parameters:

fixations (pl.DataFrame) – Fixation table containing at least trial, page, word_idx, onset, and duration columns.

Returns:

DataFrame with columns trial, page, word_idx, and FD.

Return type:

pl.DataFrame