bachlab / PsPM

A matlab suite for Psycho-Physiological Modelling
GNU General Public License v3.0
45 stars 11 forks source link

Fix issue 551 -- Add NaN filtering for `pupil_pp` #482

Closed teddychao closed 8 months ago

teddychao commented 1 year ago

Summary

Add pupil_pp's missing value filtering. This pull request added a NaN checking step in pupil_pp. The cut off value is set to be 10% (0.1) in pspm_options. If the missing values are more than the cut-off value of the full data, then pupil_pp will stop and report the error message saying "... has more than .... % missing values."

dominikbach commented 8 months ago

Hi @teddychao. I made some changes, please check the diff for my recent commit.

  1. I think the greater signs for the new flags were the wrong way - please double-check.
  2. I don't think a warning should be given when there is no combine channel - just a screen message.
  3. However, I think there should be a warning when there is just one channel but it is bad. (but without return).

Please merge if you are happy. Please also update the documentation.

teddychao commented 8 months ago

fixed some error display bugs, previously it was not displayed properly

image

fixed a strange expression error, not sure about why. fixed the invalid \ at the end of line

image
dominikbach commented 8 months ago

@teddychao thanks for reviewing. Please update GUI & documentation as well.

teddychao commented 8 months ago

GUI update

image image
teddychao commented 8 months ago

Hi @dominikbach I have completed these features. However, I have a question. Currently chan_valid_cutoff (originally nan_cutoff) is used when data combination operation is used. I am not sure if this value should be used if data combination behaviour is not used by users? For instance, users want to just do preprocessing for a channel they focus on, should chan_valid_cutoff be used at all? I have this question because data combination checking currently allows a situation that only the primary data channel is processed and used as the output when the data to combine channel is invalid.

dominikbach commented 8 months ago

@teddychao Thanks, I have added a warning and slightly re-worded GUI and Manual text.