bachlab / PsPM

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

Refactor `pspm_interpolate` #684

Closed dominikbach closed 7 months ago

dominikbach commented 7 months ago

Fixes #673 : refactors pspm_interpolate.

Changes proposed in this pull request:

  1. Remove option to work on multiple data files at a time, as this is not used in other pre-processing functions.
  2. Remove option to work on several channels at a time: either work on all continuous channels (and write new file) or work on one channel only (and write to same file).
  3. Use pspm_load_channel for single channel option, and pspm_select_channels for all channel option.
  4. Remove option to work on struct input - this is not supported by other PsPM functions and makes the code more clunky. (It is straightforward to deal with struct input as pspm_load_data gracefully handles this, but producing the output is more complex.)
  5. Change channel selector in GUI is changed in reflection of step 2 from many to any. Also, file selector is changed to allowing just one file at a time.
  6. Extrapolate handling is changed. Previously, if there were NaNs at beginning or end of file, options.extrapolate was forced to 1. However, then the option does not make sense, as it would always be enforced whenever it is relevant. Thus, this is no longer enforced, but a warning is still given that NaN remain in the data.
  7. pspm_options is changed to deal with the larger number of methods allowed.
  8. pspm_load_channel is changed to allow detecting whether a channel is a wave or events channel.