pymovements.stimulus.TextStimulus.from_csv#
- static TextStimulus.from_csv(path: str | Path, *, 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, trial_column: str | None = None, writing_system: WritingSystem | str = 'left-to-right', read_csv_kwargs: dict[str, Any] | None = None) TextStimulus[source]#
Load text stimulus from file.
- Parameters:
path (str | Path) – Path to file to be read.
aoi_column (str) – Name of column that contains the content of the aois.
start_x_column (str) – Name of column which contains the x coordinate’s start position of the areas of interest.
start_y_column (str) – Name of 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 column which contains the height of the area of interest. (default: None)
end_x_column (str | None) – Name of column which contains the x coordinate’s end position of the areas of interest. (default: None)
end_y_column (str | None) – Name of column which contains the y coordinate’s end position of the areas of interest. (default: None)
page_column (str | None) – Name of column which contains the page information of the area of interest. (default: None)
trial_column (str | None) – Name of column that specifies the unique trial id. (default: None)
writing_system (WritingSystem | str) – Writing system of the text. If
writing_systemis a string,from_descriptor()for initialization. (default:'left-to-right')read_csv_kwargs (dict[str, Any] | None) – Custom read keyword arguments for polars. (default: None)
- Returns:
Returns the text stimulus file.
- Return type: