about online trial
-
RobinWang
- Posts: 26
- Joined: 14 Nov 2011, 06:38
about online trial
Hi, Now i have a new question,I use the SignalGenerator and FeedbackDemo to generator EEG data. Here is the Application parameter:
PreRunDuration:0s. PreFeedbackDuration:2s. FeedbackDuration:6s. PostFeedbackDuration :1s. ITID:0s; the samplingrate is 128Hz.
When the NumberOfTrials=1 the number of samples is 1152 and i think it's right. When the NumberOfTrials=2,there are 2288 samples.NumberOftrials=3, 3424 samples.
But I think the number of the samples should be 1152*numberoftrials, why this happen?
Thank you.
PreRunDuration:0s. PreFeedbackDuration:2s. FeedbackDuration:6s. PostFeedbackDuration :1s. ITID:0s; the samplingrate is 128Hz.
When the NumberOfTrials=1 the number of samples is 1152 and i think it's right. When the NumberOfTrials=2,there are 2288 samples.NumberOftrials=3, 3424 samples.
But I think the number of the samples should be 1152*numberoftrials, why this happen?
Thank you.
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
Re: about online trial
FeedbackDuration is not an exact parameter, it is only used to scale cursor speed. Actual trial duration will depend on whether the target has been hit or not.
You should not use FeedbackDemo for actual experiments. It is meant to be an example teaching programmers how to write feedback applications. Rather, use CursorTask.
With CursorTask, you will be able to specify "TestAllTargets", which will imply identical duration for all trials, provided your targets cover the entire edge of the window.
For an example configuration that uses CursorTask to display 1D-Feedback, start up from batch/CursorTask_SignalGenerator.bat, and then load parms/fragments/feedback/CursorTask1D.prm.
Regards,
Juergen
You should not use FeedbackDemo for actual experiments. It is meant to be an example teaching programmers how to write feedback applications. Rather, use CursorTask.
With CursorTask, you will be able to specify "TestAllTargets", which will imply identical duration for all trials, provided your targets cover the entire edge of the window.
For an example configuration that uses CursorTask to display 1D-Feedback, start up from batch/CursorTask_SignalGenerator.bat, and then load parms/fragments/feedback/CursorTask1D.prm.
Regards,
Juergen
-
RobinWang
- Posts: 26
- Joined: 14 Nov 2011, 06:38
Re: about online trial
In my project I am using Fileplaback for testing new algorithms. I had modify the cursor speed as this: (WindowWidth-TargetWidth-CursorWidth/2/FeedbackDuration/2. (cursorPos=windowwidth/2,and in bci_process.m,control signal=1 or -1). So cursor will move to the target in a constant speed in the duration. I don't think it is the main problem. So why this happened?mellinger wrote:FeedbackDuration is not an exact parameter, it is only used to scale cursor speed. Actual trial duration will depend on whether the target has been hit or not.
I use the CursorTask instead the FeedbackDemo as you said, when the first trial end, System Log window displayed Warning: DataIOFilter::Process: Roundtrip time approaches block duration(currently 77.39%) every time, but in feedbackDemo the warning wasn't found. If the warning appeared, whether the results are credible?
Here is the third question. I was confused whether the postfeedbackduration was contained in the total time of each trial?
In "TestAllTargets" mode, I thought one trial will be end while the edge of the target has been hit even though the edge of the window hasn't be hit, I understand the wrong?mellinger wrote:With CursorTask, you will be able to specify "TestAllTargets", which will imply identical duration for all trials, provided your targets cover the entire edge of the window.
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
Re: about online trial
How are you measuring the number of samples that correspond to a trial?So why this happened?
How do you measure the total time of each trial?I was confused whether the postfeedbackduration was contained in the total time of each trial?
A trial will always end when a target is hit. The edge of the window does not matter for the duration a trial with CursorTask. The difference with "TestAllTargets" is that the hit test includes all targets rather than just the highlighted one.In "TestAllTargets" mode, I thought one trial will be end while the edge of the target has been hit even though the edge of the window hasn't be hit, I understand the wrong?
That warning should disappear once you switch the CursorTask's RenderingQuality to "Low".System Log window displayed Warning
-Juergen
-
RobinWang
- Posts: 26
- Joined: 14 Nov 2011, 06:38
Re: about online trial
I used the FeedbackDemo and didn't modify anything, SignalGenerator, and did one trial, then did twice, triple. used load_bcidat.m. then i found this problem. Even though FeedbackDuration decides the speed, but the CursorSpeedX was constant, I think this makes the cursor move from the edge of the left to the right during same time.
I am using Fileplaback for testing new algorithms, the data i have told me each trial has 9s, and when i set the parameter(in cursorTask) PreRunDuration=0s, PreFeedback=2s, Feedback=7s,PostFeedback=1s, the result was the same as offline analysis.
the warning problem was not solved, Whether a relationship with computer configuration or my program of matlab?
Thanks for help.
I am using Fileplaback for testing new algorithms, the data i have told me each trial has 9s, and when i set the parameter(in cursorTask) PreRunDuration=0s, PreFeedback=2s, Feedback=7s,PostFeedback=1s, the result was the same as offline analysis.
the warning problem was not solved, Whether a relationship with computer configuration or my program of matlab?
Thanks for help.
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
Re: about online trial
I still don't know how you measured the number of samples corresponding to a trial.used load_bcidat.m. then i found this problem.
What do you mean by saying "the result of FilePlayback was the same as OfflineAnalysis"?the result was the same as offline analysis.
You may safely ignore that warning. It is telling you that your setup is too slow to do realtime analysis, but this does not matter because you are using FilePlayback. You may start up FilePlayback with --EvaluateTiming=0 to suppress these warnings. What I don't understand is why the warning does not appear with FeedbackDemo, as it is probably related to the amount of time used up by your Matlab code. You might also increase the SampleBlockSize parameter in order to improve timing.the warning problem was not solved, Whether a relationship with computer configuration or my program of matlab?
-Juergen
-
RobinWang
- Posts: 26
- Joined: 14 Nov 2011, 06:38
Re: about online trial
sorry for wasting your time. My English is so terrible!
I used the SignalGenerator to Generate bci2000 data file test1.dat. the function load_bcidat.m was used for loading test1.dat to matlab: [ signal, states, parameters ] = load_bcidat( test1.dat); so I thought the number of the sample equals the length of the signal. Didn't it?
And i used the competition data to simulate online trial, the description of this data said each trial has 9s. When PreRunDuration=0s, PreFeedback=2s, Feedback=7s,PostFeedback=1s,the accuracy ratio was equal to the accuracy in my offline analysis. According to the configuration of the parameters ,there were 10s.
I'm sorry to occupy your time , and thank you.
I used the SignalGenerator to Generate bci2000 data file test1.dat. the function load_bcidat.m was used for loading test1.dat to matlab: [ signal, states, parameters ] = load_bcidat( test1.dat); so I thought the number of the sample equals the length of the signal. Didn't it?
And i used the competition data to simulate online trial, the description of this data said each trial has 9s. When PreRunDuration=0s, PreFeedback=2s, Feedback=7s,PostFeedback=1s,the accuracy ratio was equal to the accuracy in my offline analysis. According to the configuration of the parameters ,there were 10s.
I'm sorry to occupy your time , and thank you.
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
Re: about online trial
Hi,
there will always be one additional sample block at the end of a run, i.e. data file. I don't know what your SampleBlockSize setting is, but I guess that explains your number of samples.
In order to obtain the duration of a trial, you need to analyze the TargetCode state. A trial lasts as long as that state is nonzero.
FilePlayback cannot be used to simulate online behavior of an algorithm. The _only_ purpose of FilePlayback is to replay data that has been recorded with the _exact_ _same_ parameter settings in the _exact_ _same_ configuration.
Also, during _recording_, the option --RandomSeed=123 (or any number except 0) must have been specified when starting up the source module. Otherwise, the system will behave inconsistently with the data from the file. E.g., targets will be chosen at random, and differently than in the recorded data. As a result, a hit will not be counted as a hit any more.
Best regards,
Juergen
there will always be one additional sample block at the end of a run, i.e. data file. I don't know what your SampleBlockSize setting is, but I guess that explains your number of samples.
In order to obtain the duration of a trial, you need to analyze the TargetCode state. A trial lasts as long as that state is nonzero.
FilePlayback cannot be used to simulate online behavior of an algorithm. The _only_ purpose of FilePlayback is to replay data that has been recorded with the _exact_ _same_ parameter settings in the _exact_ _same_ configuration.
Also, during _recording_, the option --RandomSeed=123 (or any number except 0) must have been specified when starting up the source module. Otherwise, the system will behave inconsistently with the data from the file. E.g., targets will be chosen at random, and differently than in the recorded data. As a result, a hit will not be counted as a hit any more.
Best regards,
Juergen
-
RobinWang
- Posts: 26
- Joined: 14 Nov 2011, 06:38
Re: about online trial
Thanks for your answer . I appreciated you all.
Who is online
Users browsing this forum: No registered users and 0 guests
