bachlab / PsPM

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

pspm_glm produce no results when facing many short missing epochs #338

Closed teddychao closed 2 years ago

teddychao commented 2 years ago

Summary

pspm_glm provides statistics for processed signals and missing epochs. When facing many small pieces of missing epochs, pspm_glm removes all the presenting data and produces no results.

Steps to Reproduce

  1. Build a missing_epochs file that contains many small pieces of missing epochs.
  2. Process data and missing_epochs with pspm_glm.

Expected Results

Statistics are provided for non missing epoch data.

Actual Results

Statistics are not provided as all data are treated as missing epochs and removed.

(Optional) Possible Cause and Solutions

Potentially, the different sampling rate leads to a downsampling step that makes missing epochs cover all the data unexpectedly.

Technical Info

teddychao commented 2 years ago

The current solution is:

  1. Track the sampling rates used in pspm_glm.
  2. Propose a warning when the filtered data after removing missing epochs is less than 90%.
  3. Use the information of step 1 to explain the warning of step 2.