Skip to content

Fix field in header for physio data #874

@gjheij

Description

@gjheij

Summary

get_physio_eye_data() stores the gaze range in the header field. For the left eye, this is stored as data{i}.header.range, but for the right eye, this is data{i}.header.r:

data{i}.header.r =  [eye_data_cell{idxRight}.GazeRange.xmin, eye_data_cell{idxRight}.GazeRange.xmax] ;    % e.g. [0 1151]

resulting in downstream problems when converting the gaze with pspm_convert.gaze.m, which expects range:

[data{i}.data, data{i}.header.range] = pspm_convert_pixel2unit_core(data{i}.data, data{i}.header.range, screen_length{i});

Solved by changing line 133 in get_physio_eye_data.m from:

data{i}.header.r =  [eye_data_cell{idxRight}.GazeRange.xmin, eye_data_cell{idxRight}.GazeRange.xmax] ;    % e.g. [0 1151]

to:

data{i}.header.range =  [eye_data_cell{idxRight}.GazeRange.xmin, eye_data_cell{idxRight}.GazeRange.xmax] ;    % e.g. [0 1151]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions