Support REST Reference Electrode Standardisation Technique

Integrate reference standardisation software. The point of entry is CTAP_reref_data() The code which currently re-references is: EEG = pop_reref(EEG, chaninds, 'keepref', 'on');

This line 66 should be replaced by a conditional structure, probably a switch statement on Arg.method, which retains the original function and adds any new referencing capability.

One candidate is REST: http://www.neuro.uestc.edu.cn/rest/# See literature:

  • Dong, L., et al. (2017). "MATLAB Toolboxes for Reference Electrode Standardization Technique (REST) of Scalp EEG." Front Neurosci 11.
  • Yao, D. (2001). "A method to standardize a reference of scalp EEG recordings to a point at infinity." Physiol Meas 22(4): 693-711.
  • Offner, F. F. (1950). "The EEG as potential mapping: the value of the average monopolar reference." Electroencephalography and Clinical Neurophysiology 2(1): 213-214.
  • Yao DZ. Is the Surface Potential Integral of a Dipole in a Volume Conductor Always Zero? A Cloud Over the Average Reference of EEG and ERP. Brain Topogr. 2017;30:161-71.

PREP pipeline might also be a candidate.