From 8cf0ce73da97c4e7dd65bc1d133fe209b5c14153 Mon Sep 17 00:00:00 2001 From: lawhead Date: Thu, 7 Dec 2023 17:17:18 -0800 Subject: [PATCH] Removed parameter for VEP flicker rate configuration --- bcipy/display/paradigm/vep/codes.py | 2 ++ bcipy/parameters/parameters.json | 8 -------- bcipy/task/paradigm/vep/calibration.py | 8 +++++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/bcipy/display/paradigm/vep/codes.py b/bcipy/display/paradigm/vep/codes.py index 14b9fdeee..e96067e3d 100644 --- a/bcipy/display/paradigm/vep/codes.py +++ b/bcipy/display/paradigm/vep/codes.py @@ -8,6 +8,8 @@ log = logging.getLogger(__name__) +DEFAULT_FLICKER_RATES = [4, 5, 6, 10, 12, 15] + def create_vep_codes(length=32, count=4) -> List[List[int]]: """Create a list of random VEP codes. diff --git a/bcipy/parameters/parameters.json b/bcipy/parameters/parameters.json index 6c4565c2a..90eb22511 100755 --- a/bcipy/parameters/parameters.json +++ b/bcipy/parameters/parameters.json @@ -375,14 +375,6 @@ "recommended_values": "", "type": "float" }, - "vep_flicker_rates": { - "value": "4,5,6,10,12,15", - "section": "bci_config", - "readableName": "VEP Flicker Rates (hz)", - "helpTip": "Delimited list of flash rates, where a rate represents the hz of the box at that position. Each rate should be less than the refresh rate of the monitor.", - "recommended_values": "4,5,6,10,12,15", - "type": "str" - }, "stim_jitter": { "value": "0.0", "section": "bci_config", diff --git a/bcipy/task/paradigm/vep/calibration.py b/bcipy/task/paradigm/vep/calibration.py index 29030bbe6..8147ea8f3 100644 --- a/bcipy/task/paradigm/vep/calibration.py +++ b/bcipy/task/paradigm/vep/calibration.py @@ -8,7 +8,9 @@ from bcipy.display import InformationProperties, VEPStimuliProperties from bcipy.display.components.layout import centered from bcipy.display.components.task_bar import CalibrationTaskBar -from bcipy.display.paradigm.vep.codes import round_refresh_rate, ssvep_to_code +from bcipy.display.paradigm.vep.codes import (DEFAULT_FLICKER_RATES, + round_refresh_rate, + ssvep_to_code) from bcipy.display.paradigm.vep.display import VEPDisplay from bcipy.display.paradigm.vep.layout import BoxConfiguration from bcipy.helpers.clock import Clock @@ -243,8 +245,8 @@ def init_calibration_display(parameters: Parameters, font=parameters['font'], height=parameters['task_height']) - # create codes from configuration - flicker_rates = parameters['vep_flicker_rates'].split(',') + # issue #186641183 ; determine a better configuration strategy + flicker_rates = DEFAULT_FLICKER_RATES rate = round_refresh_rate(window.getActualFrameRate()) codes = [ ssvep_to_code(refresh_rate=rate, flicker_rate=int(hz))