From 562f8e6cbddc34e1a4a0751916df431e7b70a15b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Santamar=C3=ADa-V=C3=A1zquez?= Date: Wed, 29 Nov 2023 15:46:56 +0100 Subject: [PATCH 1/2] Minor fixes to allow channel sets without coordinates for c-vep models --- medusa/bci/cvep_spellers.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/medusa/bci/cvep_spellers.py b/medusa/bci/cvep_spellers.py index 1524101..74e4fdf 100644 --- a/medusa/bci/cvep_spellers.py +++ b/medusa/bci/cvep_spellers.py @@ -438,7 +438,7 @@ def fit_dataset(self, dataset, **kwargs): # Feature extraction and classification fitted_info = self.get_inst('clf_method').fit_dataset( dataset=data, - std_epoch_rejection=3.0, + std_epoch_rejection=None, show_progress_bar=True ) @@ -809,6 +809,8 @@ def __init__(self, correct_raster_latencies=False, art_rej=None, **kwargs): self.correct_raster_latencies = correct_raster_latencies def _assert_consistency(self, dataset: CVEPSpellerDataset): + # TODO: this function is not necessary. Use CVEPSpellerDataset + # consistency checker instead! len_seqs = set() fs = set() fps_resolution = set() @@ -937,8 +939,10 @@ def fit_dataset(self, dataset: CVEPSpellerDataset, std_epoch_rejection=3.0, if show_progress_bar: pbar.update(1) - # Precompute nearest channels for online artifact rejection - sorted_dist_ch = rec_sig.channel_set.sort_nearest_channels() + sorted_dist_ch = None + if std_epoch_rejection is not None: + # Precompute nearest channels for online artifact rejection + sorted_dist_ch = rec_sig.channel_set.sort_nearest_channels() # New bar if show_progress_bar: From a61bcf9c86acf151fd197df5fb5c95d7a091966e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Santamar=C3=ADa-V=C3=A1zquez?= Date: Wed, 29 Nov 2023 16:03:42 +0100 Subject: [PATCH 2/2] Changed patch version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8a195e6..394b7d4 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( name='medusa-kernel', packages=find_packages(), - version='1.2.4', + version='1.2.5', keywords=['Signal', 'Biosignal', 'EEG', 'BCI'], url='https://medusabci.com/', author='Eduardo Santamaría-Vázquez, '