Experiment( DataFileDestinationAddress){
Context(){
AssignmentGroup(){
ExperimentName = "Color Vision Screening Test";
new ConditionCode = 0;
new Greenish = [20, 0.282, 0.324];
new Redish = [20, 0.322, 0.303];
DataFileTrialFormat = "%SubjectCode% %Trial.RandomTilesColorVisionTest.Orientation% %Trial.Feedback.Response%";
TrialCounter = 1;
SubjectCode = "pxlab";
StoreData = 1;
DataFileDestination = "/pxlab/demos/mailer.php";
DataFileDestinationAddress = "";
HTTPRequestMethod = "POST";
ScreenBackgroundColor = [20, 0.31, 0.315];
TrialFactor = 1;
HideCursor = 0;
}
Session(){
Instruction(){
Text = lang2(["Welcome to the PXLab Color Vision Test!", " ", "In every trial you will see a circle with a gap. Please indicate the position of the gap using the number keys in the numeric key section. Use key \'8\' for 12:00, key \'9\' for 13:30, key \'6\' for 3:00, and so on.", " ", "Please take care that the numeric key section is switched on. If not then press the \'Num\'-key before starting.", " ", "Press any key now to start the test."], ["Willkommen zum PXLab Farbsehtest!", " ", "Sie werden in jedem Durchgang einen Kreis mit einer Öffnung sehen. Bitte geben Sie im numerischen Tastenfeld an, wo sich die Öffnung befindet. Verwenden Sie bitte die Taste \'8\' für 12 Uhr, die Taste \'9\' für 13:30 Uhr, die Taste \'6\' für 3 Uhr, usw. ", " ", "Bitte achten Sie darauf, dass das numerische Tastenfeld auf Zifferneingabe gechaltet ist. Gegebenenfalls drücken Sie bitte die \'Num\'-Taste.", " ", "Drücken Sie jetzt bitte eine beliebige Taste, um den Test zu starten."]);
}
}
SessionEnd(){
SessionEndMessage(){
}
}
Trial( TrialCounter, RandomTilesColorVisionTest.Color, RandomTilesColorVisionTest.DistractorColor, RandomTilesColorVisionTest.Orientation, Feedback.CorrectCode, Feedback.Response){
ClearScreen:Pause(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 500;
}
RandomTilesColorVisionTest(){
Color = [51.0204, 0.4339, 0.3243];
DistractorColor = [50, 0.2704, 0.4177];
LuminanceRange = 30;
Orientation = 0;
Width = 600;
Height = 600;
LocationX = 0;
LocationY = 0;
RasterSize = 8;
MaxTileSize = 2;
JointSize = 1;
Timer = de.pxlab.pxl.TimerCodes.RELEASE_RESPONSE_TIMER;
ResponseSet = [104, 105, 102, 99, 98, 97, 100, 103];
}
Feedback(){
Text = "";
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 1000;
ResponseParameter = "Trial.RandomTilesColorVisionTest.ResponseCode";
CorrectText = lang2("Correct!", "Richtig!");
FalseText = lang2("False!", "Falsch!");
Evaluation = de.pxlab.pxl.EvaluationCodes.COMPARE_CODE;
Visible = 1;
Protocol = 0;
Color = [50.6089, 0.3065, 0.3468];
FontSize = 60;
}
}
// Command line assignments
AssignmentGroup();
}
Procedure(){
Session(){
Block(){
Trial( ?, Greenish, Redish, 0, 0, ?);
Trial( ?, Greenish, Redish, 1, 1, ?);
Trial( ?, Greenish, Redish, 2, 2, ?);
Trial( ?, Greenish, Redish, 3, 3, ?);
Trial( ?, Greenish, Redish, 4, 4, ?);
Trial( ?, Greenish, Redish, 5, 5, ?);
Trial( ?, Greenish, Redish, 6, 6, ?);
Trial( ?, Greenish, Redish, 7, 7, ?);
Trial( ?, Redish, Greenish, 0, 0, ?);
Trial( ?, Redish, Greenish, 1, 1, ?);
Trial( ?, Redish, Greenish, 2, 2, ?);
Trial( ?, Redish, Greenish, 3, 3, ?);
Trial( ?, Redish, Greenish, 4, 4, ?);
Trial( ?, Redish, Greenish, 5, 5, ?);
Trial( ?, Redish, Greenish, 6, 6, ?);
Trial( ?, Redish, Greenish, 7, 7, ?);
}
}
}
}