Browse Source

Add Parameter Files

master
bci 3 years ago
parent
commit
693b4662c5
3 changed files with 352 additions and 42 deletions
  1. 148
    0
      TactileCalibration.prm
  2. 154
    0
      TactileCopy.prm
  3. 50
    42
      app.py

+ 148
- 0
TactileCalibration.prm View File

@@ -0,0 +1,148 @@
Visualize:Property%20Sets matrix VisPropertySets= 0 1 // row titles are properties in the form "SRCD.Left", columns are property sets
System:Version matrix OperatorVersion= { Framework Revision Build Config Protocol } 1 3.6%20BETA.5570.5 5570.5,%202016-10-12T19:27:33Z MSVC-17.0.61030.0-AMD64,%20release,%202016-10-16T14:03:14Z,%20user@user-PC USE_DYNAMIC_CRT:OFF%20USE_OPENMP:ON%20USE_PRECOMPILED_HEADERS:ON%20USE_ASSERTS_IN_RELEASE_BUILDS:OFF%20USE_EXTERNAL_QT:OFF 2.3 // operator module version information (noedit)(readonly)
System:Protocol int AutoConfig= 1 1 0 1 // Use AutoConfig protocol extension (boolean)
System:Protocol int OperatorBackLink= 1 1 0 1 // Send final state and signal information to Operator (boolean)
System:Core%20Connections string OperatorIP= 127.0.0.1 127.0.0.1 % % // the Operator module's IP (noedit)(readonly)
Connector:ConnectorInput list ConnectorInputFilter= 0 // list of state names or signal elements to allow, "*" for any, signal elements as in "Signal(1,0)"
Connector:ConnectorInput string ConnectorInputAddress= % localhost:20320 % % // IP address/port to read from, e.g. localhost:20320
Application:Application%20Window:ApplicationWindow int WindowWidth= 1920 640 0 % // width of Application window
Application:Application%20Window:ApplicationWindow int WindowHeight= 1080 480 0 % // height of Application window
Application:Application%20Window:ApplicationWindow int WindowLeft= 0 0 % % // screen coordinate of Application window's left edge
Application:Application%20Window:ApplicationWindow int WindowTop= 0 0 % % // screen coordinate of Application window's top edge
Application:Application%20Window:ApplicationWindow string WindowBackgroundColor= 0x000000 0x505050 % % // Application window background color (color)
Visualize:Application%20Window:ApplicationWindow int VisualizeApplicationWindow= 0 0 0 1 // Display miniature copy of Application window (boolean)
Visualize:Application%20Window:ApplicationWindow int AppWindowSpatialDecimation= 8 8 1 % // Application window decimation (shrinking) factor
Visualize:Application%20Window:ApplicationWindow int AppWindowTemporalDecimation= 4 16 1 % // Application window time decimation factor
Application:AudioPlayback:ApplicationWindow float AudioPlaybackRate= auto // audio playback sampling rate
Application:AudioPlayback:ApplicationWindow int AudioPlaybackChannels= auto // number of playback output channels
Application:AudioPlayback:ApplicationWindow float AudioPlaybackBufferDuration= auto // duration of playback buffer
Visualize:Application%20Log:ApplicationBase int ShowAppLog= 1 0 0 1 // Show application log window (boolean)
Application:Sequencing:StimulusTask float PreRunDuration= 2s 1 0 % // pause preceding first sequence
Application:Sequencing:StimulusTask float PostRunDuration= 2s 0 0 % // pause following last sequence
Application:Sequencing:StimulusTask float PreSequenceDuration= 1/2s 2s 0 % // pause preceding sequences/sets of intensifications
Application:Sequencing:StimulusTask float PostSequenceDuration= 2s 2s 0 % // pause following sequences/sets of intensifications
Application:Sequencing:StimulusTask float StimulusDuration= 220ms 40ms 0 % // stimulus duration
Application:Sequencing:StimulusTask string EarlyOffsetExpression= % // abort stimulus if this expression becomes true
Application:Sequencing:StimulusTask float ISIMinDuration= 400ms 80ms 0 % // minimum duration of inter-stimulus interval
Application:Sequencing:StimulusTask float ISIMaxDuration= 400ms 80ms 0 % // maximum duration of inter-stimulus interval
Application:Result%20Processing:StimulusTask int InterpretMode= 2 0 0 2 // interpretation of results: 0 none, 1 online free mode, 2 copy mode (enumeration)
Application:Result%20Processing:StimulusTask int DisplayResults= 0 1 0 1 // display results of copy/free spelling (boolean)
Application:Result%20Processing:StimulusTask int AccumulateEvidence= 0 0 0 1 // accumulate evidence until a selection is made (boolean)
Application:Result%20Processing:StimulusTask float MinimumEvidence= 0 0 0 % // do not make a selection unless target evidence exceeds this value. For a normalized classifier, MinimumEvidence approximates -2.3*log10(Error Probability)
Application:Sequencing:P3SpellerTask int NumberOfSequences= 10 15 1 % // number of sequences in a set of intensifications
Application:Speller%20Targets:P3SpellerTask matrix TargetDefinitions= 4 { Display Enter Display%20Size Icon%20File Sound%20File } Left L 1 % % Right R 1 % % Front F 1 % % Back B 1 % % // speller target properties
Application:Speller%20Targets:P3SpellerTask intlist NumMatrixColumns= 1 1 6 1 % // display matrices' column number(s)
Application:Speller%20Targets:P3SpellerTask intlist NumMatrixRows= 1 4 6 0 % // display matrices' row number(s)
Application:Audio%20Stimuli:P3SpellerTask int AudioStimuliOn= 0 0 0 1 // Audio Stimuli Mode (0=no, 1=yes) (boolean)
Application:Audio%20Stimuli:P3SpellerTask matrix AudioStimuliRowsFiles= 6 { filename } sounds/1.wav sounds/2.wav sounds/3.wav sounds/4.wav sounds/5.wav sounds/6.wav // audio stimuli rows files
Application:Audio%20Stimuli:P3SpellerTask matrix AudioStimuliColsFiles= 6 { filename } sounds/a.wav sounds/b.wav sounds/c.wav sounds/d.wav sounds/e.wav sounds/f.wav // audio stimuli column files
Application:Speller%20Targets:P3SpellerTask floatlist TargetWidth= 1 40 0 0 100 // target width in percent of screen width
Application:Speller%20Targets:P3SpellerTask floatlist TargetHeight= 1 14 0 0 100 // target height in percent of screen height
Application:Speller%20Targets:P3SpellerTask floatlist TargetTextHeight= 1 12 0 0 100 // height of target labels in percent of screen height
Application:Speller%20Targets:P3SpellerTask stringlist BackgroundColor= 1 0x00000000 0x505050 % % // target background color (color)
Application:Speller%20Targets:P3SpellerTask stringlist TextColor= 1 0x00555555 0x505050 % % // text color (color)
Application:Speller%20Targets:P3SpellerTask stringlist TextColorIntensified= 1 0x00FFFFFF 0x505050 % % // intensified text color (color)
Application:Speller%20Targets:P3SpellerTask intlist IconHighlightMode= 1 1 1 0 4 // icon highlight method 0: Show/Hide, 1: Intensify, 2: Grayscale, 3: Invert, 4: Dim (enumeration)
Application:Speller%20Targets:P3SpellerTask floatlist IconHighlightFactor= 1 0.5 0.5 0 % // scale factor for highlighted icon pixel values
Application:Speller:P3SpellerTask int FirstActiveMenu= 1 1 1 % // Index of first active menu
Storage:Data%20Location:DataIOFilter string DataDirectory= ../data/WheelchairTraining ..\data % % // path to top level data directory (directory)
Application:Speller:P3SpellerTask float StatusBarSize= 25 0 0 100 // size of status bar in percent of screen height
Storage:Session:DataIOFilter string SubjectName= WT-tacCalib Name % % // subject alias
Application:Speller:P3SpellerTask float StatusBarTextHeight= 12 0 0 100 // size of status bar text in percent of screen height
Storage:Session:DataIOFilter string SubjectSession= 001 001 % % // three-digit session number
Application:Speller:P3SpellerTask string TextToSpell= LRFBLRFB // character or string to spell in offline copy mode
Storage:Session:DataIOFilter string SubjectRun= 00 00 % % // two-digit run number
Application:Speller:P3SpellerTask string TextResult= % // user spelling result
Storage:Documentation:DataIOFilter string ID_System= % // BCI2000 System Code
Application:Speller:P3SpellerTask int TestMode= 1 0 0 1 // select targets by clicking on their associated stimuli (0=no, 1=yes) (boolean)
Storage:Documentation:DataIOFilter string ID_Amp= % // BCI2000 Amp Code
Application:Speller:P3SpellerTask string DestinationAddress= % // network address for speller output in IP:port format
Storage:Documentation:DataIOFilter string ID_Montage= % // BCI2000 Cap Montage Code
Application:Text%20Window:P3SpellerTask int TextWindowEnabled= 0 0 0 1 // Show Text Window (0=no, 1=yes) (boolean)
Visualize:Timing:DataIOFilter int VisualizeTiming= 0 1 0 1 // visualize system timing (0=no, 1=yes) (boolean)
Application:Text%20Window:P3SpellerTask int TextWindowLeft= 600 0 0 % // Text Window X location
Visualize:Source%20Signal:DataIOFilter int VisualizeSource= 1 1 0 1 // visualize raw brain signal (0=no, 1=yes) (boolean)
Application:Text%20Window:P3SpellerTask int TextWindowTop= 5 0 0 % // Text Window Y location
Visualize:Source%20Signal:DataIOFilter int VisualizeSourceDecimation= 1 auto % % // decimation factor for raw brain signal
Application:Text%20Window:P3SpellerTask int TextWindowWidth= 512 512 0 % // Text Window Width
Visualize:Source%20Signal:DataIOFilter int VisualizeSourceBufferSize= auto auto % % // number of blocks to aggregate before sending to operator
Application:Text%20Window:P3SpellerTask int TextWindowHeight= 512 512 0 % // Text Window Height
Visualize:Source%20Signal:DataIOFilter int VisualizeSourceTime= 2s 2s 0 % // how much time in Source visualization
Application:Text%20Window:P3SpellerTask string TextWindowFontName= Courier // Text Window Font Name
Visualize:Source%20Signal:DataIOFilter int SourceMin= -100muV // raw signal vis Min Value
Application:Text%20Window:P3SpellerTask int TextWindowFontSize= 10 4 1 % // Text Window Font Size
Visualize:Source%20Signal:DataIOFilter int SourceMax= 100muV // raw signal vis Max Value
Application:Text%20Window:P3SpellerTask string TextWindowFilePath= % // Path for Saved Text File (directory)
Source:gUSBampADC int SamplingRate= 256 256Hz % % // the signal sampling rate
Application:Human%20Interface%20Devices:KeystrokeFilter string KeystrokeStateName= % // State to be translated into keystrokes (0-F), empty for off
Source:gUSBampADC int SampleBlockSize= 8 1 % % // number of samples per block
Application:Human%20Interface%20Devices:KeystrokeFilter string KeystrokeExpression= % // Expression that evaluates to a virtual keycode, empty for off
Source:gUSBampADC int SourceCh= 8 auto 0 % // number of digitized channels total
Application:Human%20Interface%20Devices:KeystrokeFilter string KeystrokeExpressionOnStartRun= % // Expression that initializes expression variables on StartRun
Source:gUSBampADC list SourceChGain= 8 1 1 1 1 1 1 1 1
Connector:ConnectorOutput string ConnectorOutputAddress= localhost:5001 localhost:20321 % % // one or more IP:Port combinations, e.g. localhost:20321
Source:gUSBampADC list SourceChOffset= 8 0 0 0 0 0 0 0 0
Application:Localization:Localization string Language= Default Default % % // Language for user messages
Source:gUSBampADC list ChannelNames= 7 Fz Cz Pz T3 C3 C4 T4
Application:Localization:Localization matrix LocalizedStrings= { German } { TIME%20OUT%20!!! Waiting%20to%20start%20... Sleeping--Select%20SLEEP%20twice%20to%20resume Select%20SLEEP%20once%20more%20to%20resume Paused--Select%20PAUSE%20again%20to%20resume } Zeit%20abgelaufen! Warte%20... Angehalten:%20Zweimal%20SLEEP%20fur%20Weiter Angehalten:%20Noch%20einmal%20SLEEP%20fur%20Weiter Angehalten:%20Noch%20einmal%20PAUSE%20fur%20Weiter // Localized user messages
Source:gUSBamp:Acquisition:gUSBampADC int AcquisitionMode= 0 0 0 2 // data acquisition mode: 0: analog signal acquisition, 1: calibration signal, 2: impedance measurement (enumeration)
System string OperatorAddress= 127.0.0.1:4001
Source:gUSBamp:Acquisition:gUSBampADC int CommonGround= 1 0 0 1 // internally connect GNDs from all blocks: 0: false, 1: true (enumeration)
Source:gUSBamp:Acquisition:gUSBampADC int CommonReference= 1 0 0 1 // internally connect Refs from all blocks: 0: false, 1: true (enumeration)
System:Core%20Connections string ApplicationIP= 192.168.2.100 // (readonly)(noedit)
System:Core%20Connections string ApplicationPort= 50135 // (readonly)(noedit)
Source:gUSBamp:DigitalIO:gUSBampADC int EnableDigitalInput= 0 0 0 1 // enable digital inputs (boolean)
Source:gUSBamp:DigitalIO:gUSBampADC int EnableDigitalOutput= 0 0 0 2 // enable digital output on block acquisition 0: off, 1: use expressions, 2: timing test (enumeration)
System:Version matrix ApplicationVersion= { Framework Revision Build Config Protocol } 1 3.6%20BETA.5570.5 5570.5,%202016-10-12T19:27:33Z MSVC-17.0.61030.0-AMD64,%20release,%202016-10-16T14:03:14Z,%20user@user-PC USE_DYNAMIC_CRT:OFF%20USE_OPENMP:ON%20USE_PRECOMPILED_HEADERS:ON%20USE_ASSERTS_IN_RELEASE_BUILDS:OFF%20USE_EXTERNAL_QT:OFF%20Qt:5.3.2:C:/BCI2000.x64/build/CMakeFiles/extlib/qt-5.3.2/win32-amd64-msvc2012/bin/qmake.exe 2.3 // Application version information (noedit)(readonly)
Source:gUSBamp:DigitalIO:gUSBampADC matrix DigitalOutputEx= 1 1 % // Matrix of Expressions for digital output
System:Configuration matrix ApplicationFilterChain= 4 { Filter%20Name Position%20String } ConnectorInput 2.9999 P3SpellerTask 3 KeystrokeFilter 3.1 ConnectorOutput 3.9999 // Application filter chain (noedit)(readonly)
Source:gUSBamp:Acquisition:gUSBampADC int DetectDataLoss= 0 0 0 1 // use gUSBamp counter mode to detect data loss (boolean)
System:Configuration matrix Filters= 12 1 /3/ConnectorInput /3/P3SpellerTask /3/KeystrokeFilter /3/ConnectorOutput /1/DataIOFilter /1/gUSBampADC /1/BCI2000FileWriter /1/AlignmentFilter /1/TransmissionFilter /2/SpatialFilter /2/P3TemporalFilter /2/LinearClassifier // Filter Directory (noedit)(readonly)
Source:gUSBamp:Acquisition:gUSBampADC int NumBuffers= 2 5 2 % // IO queue length
Source:Buffering:gUSBampADC int SourceBufferSize= 2s 2s % % // size of data acquisition ring buffer (in blocks or seconds)
Source:gUSBamp:Multiple%20Devices:gUSBampADC list DeviceIDs= 1 auto // list of USBamps to be used (or auto)
Source:gUSBamp:Multiple%20Devices:gUSBampADC string DeviceIDMaster= auto // deviceID for the device whose SYNC goes to the slaves
Source:gUSBamp:Multiple%20Devices:gUSBampADC intlist SourceChList= 0 // list of channels to digitize, in terms of physical inputs numbered across all devices
Source:gUSBamp:Multiple%20Devices:gUSBampADC intlist SourceChDevices= 1 8 // number of digitized channels per device
Source:gUSBamp:DSP:gUSBampADC int FilterEnabled= 1 1 0 1 // Enable pass band filter (0=no, 1=yes)
Source:gUSBamp:DSP:gUSBampADC float FilterHighPass= 0.1 0.1 0 50 // high pass filter for pass band
Source:gUSBamp:DSP:gUSBampADC float FilterLowPass= 60 60 0 4000 // low pass filter for pass band
Source:gUSBamp:DSP:gUSBampADC int FilterModelOrder= 8 8 1 12 // filter model order for pass band
Source:gUSBamp:DSP:gUSBampADC int FilterType= 1 1 1 2 // filter type for pass band (1=BUTTERWORTH, 2=CHEBYSHEV)
Source:gUSBamp:DSP:gUSBampADC int NotchEnabled= 1 1 0 1 // Enable notch (0=no, 1=yes)
Source:gUSBamp:DSP:gUSBampADC float NotchHighPass= 48 58 0 70 // high pass filter for notch filter
Source:gUSBamp:DSP:gUSBampADC float NotchLowPass= 52 62 0 4000 // low pass filter for notch filter
Source:gUSBamp:DSP:gUSBampADC int NotchModelOrder= 4 4 1 10 // filter model order for notch filter
Source:gUSBamp:DSP:gUSBampADC int NotchType= 1 1 1 2 // filter type for pass band (1=CHEBYSHEV, 2=BUTTERWORTH)
Storage:BCI2000FileWriter string FileFormat= dat // format of data file (readonly)
Storage:Documentation:BCI2000FileWriter string StorageTime= % // time of beginning of data storage
Source:Alignment:AlignmentFilter int AlignChannels= 1 0 0 1 // align channels in time (0=no, 1=yes)
Source:Alignment:AlignmentFilter floatlist SourceChTimeOffset= 0 0 % % // time offsets for all source channels (may be empty)
Source:Online%20Processing:TransmissionFilter list TransmitChList= 8 1 2 3 4 5 6 7 8 // list of transmitted channels: Channel names may contain * and ? wildcards, and character ranges enclosed in []; wildcard patterns may be negated by prepending an exclamation mark. Ranges of channels may be specified using : or - to separate begin from end.
System:Protocol:EventLink int EventLink= 1 1 0 1 // Send events from Operator to Source module (boolean)
Storage:Data%20Location:RunManager string DataFile= $%7bSubjectName%7d$%7bSubjectSession%7d/$%7bSubjectName%7dS$%7bSubjectSession%7dR$%7bSubjectRun%7d.$%7bFileFormat%7d // name of data file relative to DataDirectory
System:Core%20Connections string SignalSourceIP= 192.168.2.100 // (readonly)(noedit)
System:Core%20Connections string SignalSourcePort= 50141 // (readonly)(noedit)
System:Version matrix SignalSourceVersion= { Framework Revision Build Config Protocol } 1 3.6%20BETA.5570.5 5570.5,%202016-10-12T19:27:33Z MSVC-17.0.61030.0-AMD64,%20release,%202016-10-16T14:03:14Z,%20user@user-PC USE_DYNAMIC_CRT:OFF%20USE_OPENMP:ON%20USE_PRECOMPILED_HEADERS:ON%20USE_ASSERTS_IN_RELEASE_BUILDS:OFF%20USE_EXTERNAL_QT:OFF 2.3 // SignalSource version information (noedit)(readonly)
System:Configuration matrix SignalSourceFilterChain= 8 { Filter%20Name Position%20String } DataIOFilter 0 gUSBampADC 1 NullFileWriter 1 BCI2000FileWriter 1 EDFFileWriter 1 GDFFileWriter 1 AlignmentFilter 1.1 TransmissionFilter 1.2 // SignalSource filter chain (noedit)(readonly)
Visualize:Processing%20Stages int VisualizeAlignmentFilter= 0 0 0 1 // Visualize AlignmentFilter output (boolean)
Visualize:Processing%20Stages int VisualizeTransmissionFilter= 0 0 0 1 // Visualize TransmissionFilter output (boolean)
Filtering:SpatialFilter int SpatialFilterType= 0 2 0 3 // spatial filter type 0: none, 1: full matrix, 2: sparse matrix, 3: common average reference (CAR) (enumeration)
Filtering:SpatialFilter:SpatialFilter matrix SpatialFilter= 4 4 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 % % // columns represent input channels, rows represent output channels
Filtering:SpatialFilter:SpatialFilter intlist SpatialFilterCAROutput= 0 // when using CAR filter type: list of output channels, or empty for all channels
Filtering:SpatialFilter:SpatialFilter int SpatialFilterMissingChannels= 1 0 0 1 // how to handle missing channels 0: ignore, 1: report error (enumeration)
Filtering:P3TemporalFilter int EpochLength= 800ms 500ms 0 % // Length of data epoch from stimulus onset
Filtering:P3TemporalFilter int EpochsToAverage= 10 1 0 % // Number of epochs to average
Filtering:P3TemporalFilter int SingleEpochMode= 0 0 0 1 // Report result after each epoch (boolean)
Visualize:P3TemporalFilter int VisualizeP3TemporalFiltering= 0 0 0 1 // Visualize averaged epochs (0=no 1=yes) (boolean)
Visualize:P3TemporalFilter int TargetERPChannel= 1 1 % % // Input channel for which to display ERP data
Filtering:LinearClassifier matrix Classifier= 2 { input%20channel input%20element%20(bin) output%20channel weight } 1 4 1 1 1 6 2 1 // Linear classification matrix in sparse representation
System:Core%20Connections string SignalProcessingIP= 192.168.2.100 // (readonly)(noedit)
System:Core%20Connections string SignalProcessingPort= 50150 // (readonly)(noedit)
System:Version matrix SignalProcessingVersion= { Framework Revision Build Config Protocol } 1 3.6%20BETA.5570.5 5570.5,%202016-10-12T19:27:33Z MSVC-17.0.61030.0-AMD64,%20release,%202016-10-16T14:03:14Z,%20user@user-PC USE_DYNAMIC_CRT:OFF%20USE_OPENMP:ON%20USE_PRECOMPILED_HEADERS:ON%20USE_ASSERTS_IN_RELEASE_BUILDS:OFF%20USE_EXTERNAL_QT:OFF 2.3 // SignalProcessing version information (noedit)(readonly)
System:Configuration matrix SignalProcessingFilterChain= 3 { Filter%20Name Position%20String } SpatialFilter 2.A P3TemporalFilter 2.B LinearClassifier 2.C // SignalProcessing filter chain (noedit)(readonly)
Visualize:Processing%20Stages int VisualizeSpatialFilter= 0 0 0 1 // Visualize SpatialFilter output (boolean)
Visualize:Processing%20Stages int VisualizeLinearClassifier= 0 0 0 1 // Visualize LinearClassifier output (boolean)
System:Randomization int RandomSeed= 13310 0 % % // seed for the BCI2000 pseudo random number generator (readonly)
System:Randomization int RandomizationWarning= 1 1 0 1 // warn if subsequent Runs have identical RandomSeed value (boolean)
System:State%20Vector int StateVectorLength= 37 16 % % // length of the state vector in bytes (noedit)(readonly)

+ 154
- 0
TactileCopy.prm
File diff suppressed because it is too large
View File


+ 50
- 42
app.py View File

@@ -2,16 +2,13 @@
"""
Created on Fri Sep 4 11:36:24 2020

@author:
V0.1 Matthias Eidel
V0.2 Igor Beloschapkin
V0.3 Igor Beloschapkin
@author: Igor Beloschapkin
"""

from tkinter import *
import tkinter.font as tkFont
#import tkMessageBox
import os
import subprocess

# own code:
# from questionnaire import quest
@@ -30,7 +27,7 @@ pathTactileBciFilter = r'C:\Users\bci\Desktop\Qt Filter Program\build-TactileBCI
# Hier findet man die P300Classifier.exe
pathP300Classifier = r'C:\Users\bci\Desktop\Igor\PythonBCIgui_v0.2\bin'

# TODO Config in txt file verlagern
# TODO Config in txt file verlagern oder sogar Config Einstellung!!!
# Config Ende
##################################################

@@ -41,15 +38,17 @@ class App:
# App.paradigmText = sys.argv[1]
# print sys.argv[1]
# pathOrigin = os.path.dirname(os.path.realpath(__file__))
# TODO current working directory auf root von dieser file setzen

# global pathSave
# pathSave = "\\questions\\" + self.paradigmText
# pathSave = os.getcwd() + pathSave

textH = 2
textHsmall = 2
textW = 8
# Einstellung der GUI Größe
textH = 4
textHsmall = 4
textW = 20

def makeBtn(self, text, bg, command, side):
self.button = Button(frame, text=text, bg=bg, command=command)
@@ -69,65 +68,74 @@ class App:
frame.pack()

# button generation
self.Bfilter = makeBtn(self, "1. Filter", "lightblue", self.btn_filter, LEFT)
self.BtacCal = makeBtn(self, "2. Calibrate", "lightblue", self.btn_tacCal, LEFT)
self.Bp300 = makeBtn(self, "3. P300 Classifier", "lightblue", self.btn_p300, LEFT)
self.BtacCopy = makeBtn(self, "Tactile Copy", "lightblue", self.btn_tacCopy, LEFT)
self.BtacQuest = makeBtnSmall(self, "Fragebogen", "lightgreen", self.btn_tacQuest, LEFT)
self.Bfilter = makeBtnSmall(self, "1. Filter", "lightyellow", self.btn_filter, TOP)
self.BtacCal = makeBtnSmall(self, "2. Kalibrierung", "lightgreen", self.btn_tacCal, TOP)
self.Bp300 = makeBtnSmall(self, "3. P300 Klassifizierung", "orange", self.btn_p300, TOP)
self.BtacCopy = makeBtnSmall(self, "4. Freies Buchstabieren", "lightblue", self.btn_tacCopy, TOP)
# self.BtacQuest = makeBtnSmall(self, "5. Fragebogen", "pink", self.btn_tacQuest, TOP)
self.BtacSettings = makeBtnSmall(self, "Einstellungen", "gray", self.btn_settings, TOP)

frame.rowconfigure((0,1), weight=1) # make buttons stretch when
frame.columnconfigure((0,2), weight=1) # when window is resized

# self.Bfilter.grid(row=0, column=0, columnspan=1, sticky='EWNS')
# self.BtacCal.grid(row=1, column=0, columnspan=1, sticky='EWNS')
# self.Bp300.grid(row=2, column=0, columnspan=1, sticky='EWNS')
# self.BtacCopy.grid(row=3, column=0, columnspan=1, sticky='EWNS')
# self.BtacQuest.grid(row=4, column=0, columnspan=1, sticky='EWNS')
# TODO Hilfestellung nach jedem Button aufploppen lassen:
# Was tun? Wo klicken? Welche File wo laden?

# 1. FILTER ##################################
def btn_filter(self):
print('Starte TactileBCIFilter.exe')
os.startfile(pathTactileBciFilter + '\TactileBCIFilter.exe')
subprocess.Popen(pathTactileBciFilter + '\TactileBCIFilter.exe')

# 2. KALIBIERUNGEN ###########################
def btn_tacCal(self):
print('starte taktile kalibrierung')
os.system('bin\WT-tacCalib.bat')
print('starte taktile Kalibrierung')
subprocess.Popen([pathBci2000 + '\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileCalibration.prm'])
subprocess.Popen([pathBci2000 + '\prog\gUSBampSource.exe', '127.0.0.1'])
subprocess.Popen([pathBci2000 + '\prog\P3SignalProcessing.exe', '127.0.0.1'])
subprocess.Popen([pathBci2000 + '\prog\P3Speller.exe', '127.0.0.1'])
# TODO Lock einführen und bei Returnwert Lock öffnen

# 3. P300 Classifier #########################
def btn_p300(self):
print('Starte P300 Classifier')
os.startfile(pathP300Classifier + '\P300Classifier.exe')
print('Starte P300Classifier.exe')
subprocess.Popen(pathP300Classifier + '\P300Classifier.exe')

# 3. COPYSPELL ###########################
def btn_tacCopy(self):
print('starte tactile bci')
os.system('bin\WT-tacCopy.bat')
print('Starte taktilen Copyspeller')
# os.system('bin\WT-tacCopy.bat')
subprocess.Popen([pathBci2000 + '\prog\Operator.exe', '--OnConnect', '-LOAD PARAMETERFILE TactileCopy.prm'])
subprocess.Popen([pathBci2000 + '\prog\gUSBampSource.exe', '127.0.0.1'])
subprocess.Popen([pathBci2000 + '\prog\P3SignalProcessing.exe', '127.0.0.1'])
subprocess.Popen([pathBci2000 + '\prog\P3Speller.exe', '127.0.0.1'])

# QUESTIONNAIRE PROMPT ###########################
# def btn_visQuest(self):
# #os.system('python .\PythonBCIgui\q-helper.py ' + "Visual")
# root.destroy()
# self.startQuestions("Visual")
def btn_tacQuest(self):
root.destroy()
self.startQuestions("Tactile")
# def btn_tacQuest(self):
# root.destroy()
# self.startQuestions("Tactile")
# def btn_audQuest(self):
# root.destroy()
# self.startQuestions("Auditory")

def startQuestions(self, para):
print('starte Fragebogen')
# TODO
# q = quest(para)
# q.qSatisfaction()
# q.qExhaustion()
# q.qSubjControl()
# q.qCtrlChange()
# q.save()
# def startQuestions(self, para):
# print('starte Fragebogen')
# # TODO
# # q = quest(para)
# # q.qSatisfaction()
# # q.qExhaustion()
# # q.qSubjControl()
# # q.qCtrlChange()
# # q.save()
# 3. P300 Classifier #########################
def btn_settings(self):
print('Einstellungen')

def global_close(self, window):
print('quitting?')
print('Beenden')
window.destroy()


@@ -135,7 +143,7 @@ root = Tk()

def on_closing():
#self.global_close(root)
print('quitting?')
print('Beenden')
root.destroy()
root.protocol("WM_DELETE_WINDOW", on_closing)

Loading…
Cancel
Save