ffrprep.preproc.reference_data¶
- ffrprep.preproc.reference_data(eeg_data=None, ref_channels=None)[source]¶
Re-reference the provided EEG data object.
- Parameters:
data (MNE data object) – MNE data object containing EEG data and metadata.
ref_channels (list) – Channels to be used as reference. If more than one channel in list, the average of the channels in ref_channels will be used as the reference. If None, all channels will be averaged as the reference. If an empty list, the data is marked as already referenced and is not modified. Default = None.
- Returns:
referenced_eeg – MNE data object containing EEG data and metadata referenced to new provided channels.
- Return type:
MNE data object
Examples
Re-reference an EEG data object to the average of all channels.
>>> referenced_data = reference_data(eeg_data, ref_channels=None)
Re-reference an EEG data object to the average of specific channels.
>>> referenced_data = reference_data(eeg_data, ref_channels=['M1', 'M2'])
Re-reference an EEG data object to a specific channel.
>>> referenced_data = reference_data(eeg_data, ref_channels=['M1'])