Updates to pspm_pupil_correct_eyelink and pspm_pupil_correct#890
Open
4gwe wants to merge 22 commits into
Open
Conversation
…upil_correct works now with channels, smaller fix
… and update to pspm_cfg_selector_channel_action helptext
…ted error handling, and updated pspm_convert_au2unit_test.
… to call pspm_select_channels
…y to call pspm_select_channels
…s, and clean up of tests
…hlab/PsPM into 887_pspm_pupil_correct_eyelink_pixel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #887 and #888 .
Changes proposed in this pull request:
Fix cardiac, gaze, pupil, and channel preprocessing workflows
pspm_cfg_convert_cardiacAdded an
ecg2hpconfiguration that performs ECG → heartbeat → heart-period conversion. Heart-period limits are nowlimit_lowerandlimit_upperoptions.pspm_cfg_ecg_editorFixed the limits configuration tag to
limitsand changed the default correction factor from2to1.pspm_cfg_pupil_correctRemoved the obsolete screen-size configuration fields because gaze data must now be converted to millimetres before pupil correction.
pspm_cfg_run_convert_cardiacUpdated 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_editorUpdated the configuration mapping to use the nested
limitsstructure and represent missing artefact epochs with an empty value.pspm_cfg_selector_channel_actionClarified that the replace action replaces the processed channel.
pspm_convert_au2unitCorrected area-to-diameter conversion by using
pspm_convert_area2diameterand fixed channel-data assignment. Added status checks so failed unit conversions or channel writes return correctly.pspm_convert_ecg2hb_amriPassed the write options to
pspm_write_channelso the AMRI conversion message and output-channel behavior are preserved.pspm_convert_gazeAdded validation for unsupported degree-to-metric conversions and improved exact unit matching. Updated channel replacement behavior for screen-position outputs.
pspm_convert_hb2hpReplaced the nested limit structure with
limit_lowerandlimit_upper. Improved error handling for channel loading and writing.pspm_convert_ppg2hbAdded filename validation, corrected missing-value detection, and improved HeartPy status messages. Updated channel writing and return-status handling.
pspm_expand_epochsAdded an early return when option check fails.
pspm_load_channelUpdated small function documentation formatting issus.
pspm_load_gazeInitialized the eye suffix to prevent an undefined variable when no eye identifier is provided.
pspm_optionsRemoved obsolete pupil-correction screen-size defaults and fixed the check for an existing message option.
pspm_pupil_correctChanged 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_eyelinkRemoved 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_channelUpdated 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.