Pre-intensifying subsets of P300 alphabet
Pre-intensifying subsets of P300 alphabet
Hi, so I've been intensifying subsets of the p300 alphabet by manipulating mSequence member. My question is, how should I modify the code to do pre-intensifying of the next subset of characters, and at the same time prohibit classification during the pre-sequence period. My purpose of doing this is to prime the subject about what characters he/she can use to spell in the next sequence. Any suggestions? Thanks very much!
Hi,
I would suggest that you add a method to the P3SpellerTask class.
During the pre-sequence phase, this method will be called for each block of incoming data. In addition, setting the doProgress argument to false, you may keep the system in pre-sequence phase as long as you wish.
So what you probably need to do is to introduce a counter member variable which you set to zero from the OnPreSequence() method, and which you increment inside the newly created DoPreSequence() method. Depending on the state of the counter, you call and to highlight the stimuli associated with a certain stimulus code, and set doProgress to false during that pre-sequence stimulus presentation.
--Juergen
I would suggest that you add a method
Code: Select all
virtual void DoPreSequence( const GenericSignal&, bool& doProgress )
During the pre-sequence phase, this method will be called for each block of incoming data. In addition, setting the doProgress argument to false, you may keep the system in pre-sequence phase as long as you wish.
So what you probably need to do is to introduce a counter member variable which you set to zero from the OnPreSequence() method, and which you increment inside the newly created DoPreSequence() method. Depending on the state of the counter, you call
Code: Select all
Associations()[stimulusCode].Present();
Code: Select all
Associations()[stimulusCode].Conceal();
--Juergen
Hi Juergen,
Thanks very much for the timely reply! I've gotten it work. The following is my code:
But here's one more question. So I defined mPreSeqCount in P3SpellerTask.h, how should I compute its upper limit according to the parameter PreSequenceDuration?
Thanks again!
Ray
Thanks very much for the timely reply! I've gotten it work. The following is my code:
Code: Select all
void P3SpellerTask::DoPreSequence(const GenericSignal &, bool &doProgress)
{
mPreSeqCount +=1; // increment time-control counter
if(mPreSeqCount <= 30)
{
doProgress = false;
for(int i= 0; i < mSequence.size(); i++)
{
Associations()[ mSequence.at(i) ].Present();
}
}
else // finish DoPreSeq
{
doProgress = true;
for(int i= 0; i < mSequence.size(); i++)
{
Associations()[ mSequence[i] ].Conceal();
}
}
}
Thanks again!
Ray
Ray,
if you want to be consistent with the PreSequenceDuration parameter, you can either
For the second option, add an int member variable mPreSequenceDuration to the P3SpellerTask class, and set it from the OnInitialize() event handler as follows:
--Juergen
if you want to be consistent with the PreSequenceDuration parameter, you can either
- rely on the StimulusTask base class to do the counting for you, or
- set the upper limit from the PreSequenceDuration parameter in the OnInitialize event handler.
Code: Select all
void P3SpellerTask::DoPreSequence(const GenericSignal &, bool &doProgress)
{
mPreSeqCount +=1; // increment time-control counter
if(mPreSeqCount == 1)
{
for(int i= 0; i < mSequence.size(); i++)
{
Associations()[ mSequence.at(i) ].Present();
}
}
if(doProgress == true)
{
for(int i= 0; i < mSequence.size(); i++)
{
Associations()[ mSequence[i] ].Conceal();
}
}
}
Code: Select all
mPreSequenceDuration = MeasurementUnits::ReadAsTime( Parameter( "PreSequenceDuration" ) );
Who is online
Users browsing this forum: No registered users and 23 guests