Experiment(){
Context(){
AssignmentGroup(){
ExperimentName = "Letter Search";
HideCursor = 0;
DataFileTrialFormat = "%SubjectCode% %Target% %Trial.LetterSearch.NumberOfItems% %Trial.Feedback.Response% %Trial.LetterSearch.ResponseTime@i%";
TrialFactor = 1;
SubjectCode = "pxlab";
StoreDataTree = 0;
RandomizeTrials = 1;
}
Session(){
Instruction(){
Text = lang2(["Searching a letter \'T\' among many letters \'L\'", " ", "Press the left mouse button if the set of letters contains a \'T\' and press the right mouse button if it does not.", " ", "Press any key now to start!"], ["Wie schnell finden Sie ein \'T\' unter vielen \'L\' ?", " ", "Drücken Sie bitte die linke Maustaste, wenn ein \'T\' dabei ist und drücken Sie die rechte Maustaste, wenn kein \'T\' dabei ist.", " ", "Zum Start drücken Sie bitte eine beliebige Taste."]);
}
}
Trial( Target, LetterSearch.NumberOfItems, LetterSearch.ResponseCode, Feedback.Response, LetterSearch.ResponseTime){
ClearScreen:Anfang(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 2000;
}
FixationMark(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 400;
}
ClearScreen:Fix(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 400;
}
LetterSearch(){
Letters = "TL";
TargetColor = lightGray();
DistractorColor = lightGray();
NumberOfItems = 12;
CellSize = 40;
Size = 40;
Width = 500;
Height = 500;
ShowTarget = 1;
Pattern = 0;
LocalRandomization = 1;
Timer = de.pxlab.pxl.TimerCodes.RESPONSE_TIMER;
ResponseSet = [1, 3];
}
Feedback(){
ResponseParameter = "Trial.LetterSearch.ResponseCode";
CorrectText = lang2("Correct!\n%Trial.LetterSearch.ResponseTime@i% ms", "Richtig!\n%Trial.LetterSearch.ResponseTime@i% ms");
FalseText = lang2("False!\n%Trial.LetterSearch.ResponseTime@i% ms", "Falsch!\n%Trial.LetterSearch.ResponseTime@i% ms");
Evaluation = de.pxlab.pxl.EvaluationCodes.COMPARE_CODE;
Visible = 1;
Protocol = 0;
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 2000;
FontSize = 40;
}
}
SessionEnd(){
SessionEndMessage(){
}
}
// Command line assignments
AssignmentGroup();
}
Factors(){
IndependentFactor( Target, Trial.LetterSearch.ShowTarget, Trial.Feedback.CorrectCode){
FactorLevel( "positive", 1, 0);
FactorLevel( "negative", 0, 1);
}
IndependentFactor( Trial.LetterSearch.NumberOfItems){
FactorLevel( 3);
FactorLevel( 6);
FactorLevel( 9);
FactorLevel( 12);
}
DependentFactor( Trial.Feedback.Response);
DependentFactor( Trial.LetterSearch.ResponseTime);
}
Procedure(){
Session(){
Block(){
Trial( <"positive", "negative">, <3, 6, 9, 12>, ?, ?, ?);
}
}
}
}