Skip to content

Updates to pspm_pupil_correct_eyelink and pspm_pupil_correct#890

Open
4gwe wants to merge 22 commits into
developfrom
887_pspm_pupil_correct_eyelink_pixel
Open

Updates to pspm_pupil_correct_eyelink and pspm_pupil_correct#890
4gwe wants to merge 22 commits into
developfrom
887_pspm_pupil_correct_eyelink_pixel

Conversation

@4gwe

@4gwe 4gwe commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

Fixes #887 and #888 .

Changes proposed in this pull request:

Fix cardiac, gaze, pupil, and channel preprocessing workflows

  • pspm_cfg_convert_cardiac
    Added an ecg2hp configuration that performs ECG → heartbeat → heart-period conversion. Heart-period limits are now limit_lower and limit_upper options.

  • pspm_cfg_ecg_editor
    Fixed the limits configuration tag to limits and changed the default correction factor from 2 to 1.

  • pspm_cfg_pupil_correct
    Removed the obsolete screen-size configuration fields because gaze data must now be converted to millimetres before pupil correction.

  • pspm_cfg_run_convert_cardiac
    Updated cardiac conversion jobs to use the new limit fields (limit_lower , limit_upper) and correctly map heart-rate settings. The ECG-to-heart-period workflow now runs ECG-to-heartbeat followed by heartbeat-to-heart-period conversion.

  • pspm_cfg_run_ecg_editor
    Updated the configuration mapping to use the nested limits structure and represent missing artefact epochs with an empty value.

  • pspm_cfg_selector_channel_action
    Clarified that the replace action replaces the processed channel.

  • pspm_convert_au2unit
    Corrected area-to-diameter conversion by using pspm_convert_area2diameter and fixed channel-data assignment. Added status checks so failed unit conversions or channel writes return correctly.

  • pspm_convert_ecg2hb_amri
    Passed the write options to pspm_write_channel so the AMRI conversion message and output-channel behavior are preserved.

  • pspm_convert_gaze
    Added validation for unsupported degree-to-metric conversions and improved exact unit matching. Updated channel replacement behavior for screen-position outputs.

  • pspm_convert_hb2hp
    Replaced the nested limit structure with limit_lower and limit_upper. Improved error handling for channel loading and writing.

  • pspm_convert_ppg2hb
    Added filename validation, corrected missing-value detection, and improved HeartPy status messages. Updated channel writing and return-status handling.

  • pspm_expand_epochs
    Added an early return when option check fails.

  • pspm_load_channel
    Updated small function documentation formatting issus.

  • pspm_load_gaze
    Initialized the eye suffix to prevent an undefined variable when no eye identifier is provided.

  • pspm_options
    Removed obsolete pupil-correction screen-size defaults and fixed the check for an existing message option.

  • pspm_pupil_correct
    Changed the function to accept a PsPM filename or data structure and load the pupil and gaze channels internally. Added validation requiring gaze channels to be in millimetres.

  • pspm_pupil_correct_eyelink
    Removed internal pixel-to-millimetre conversion and the related screen-size options. The function now requires pre-converted gaze data and delegates correction to the updated pspm_pupil_correct.

  • pspm_write_channel
    Updated replacement-channel selection to match by channel type rather than requiring both channel type and units.

  • Tests and documentation
    Updated the affected unit tests and current test-status documentation to cover the revised options, validation, conversion, and channel replacement behavior.

@4gwe 4gwe self-assigned this Mar 12, 2026
4gwe and others added 19 commits March 16, 2026 08:59
… and update to pspm_cfg_selector_channel_action helptext
…ted error handling, and updated pspm_convert_au2unit_test.
…hlab/PsPM into 887_pspm_pupil_correct_eyelink_pixel
@4gwe 4gwe added the Completed & Waiting for Review Completed and waiting for review label Jul 16, 2026
@4gwe
4gwe requested a review from dominikbach July 16, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Completed & Waiting for Review Completed and waiting for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove option to provide gaze data in pixels in pspm_pupil_correct_eyelink

2 participants