landing_position#

pymovements.measure.reading.landing_position(char_idx: str | Expr = 'char_idx') → Expr[source]#

One-based character position of the first fixation on each word (LP).

The aggregation emits the char_idx of the word’s first fixation plus one. Within compute_reading_measures() the word’s start character is subtracted, making the position relative to the word (its first character is 1), and words that were never fixated are filled with 0; a fixated word whose first fixation has a null char_idx keeps a null position. The resulting values match the landing position of the PoTeC reference implementation.

Warning

Requires onset-sorted input.

Parameters:

char_idx (str | pl.Expr) – Column name or expression of the fixated character index. (default: 'char_idx')

Returns:

Aggregation expression producing the LP column.

Return type:

pl.Expr