/** This is an experiment for determining the psychometric function for brightness discrimination. It is described in Chapter 2 of Irtel, H. (1991). Experimentalpsychologisches Praktikum. Heidelberg: Springer-Verlag. The only difference is that the book uses sound pitch discrimination while here we use brightness discrimination. */
Experiment(){
Context(){
AssignmentGroup(){
ExperimentName = lang2("Psychometric Function for Brightness Discrimination", "Psychometrische Funktion für Helligkeitsdiskrimination");
TrialFactor = 1;
BlockCounter = 1;
SubjectCode = "pxlab";
DataFileTrialFormat = "%SubjectCode% %TrialCounter% %Standard% %Comparison% %Trial.BrightnessInductionSquares.ResponseCode%";
}
Session(){
Instruction(){
Text = lang2("Discrimination of brightness\n \nPlease choose the brighter square.\n \nIf the left square is brighter, then use the key with the arrow to left.\n \nIf the right square is brighter, then use the key with the arrow to right.\n \nPress any key to start!", ["Unterscheidbarkeit von Helligkeit", " ", "Wählen Sie bitte jeweils das hellere Quadrat.", " ", "Falls links heller, dann die Taste mit dem Pfeil nach links.", "Falls rechts heller, dann die Taste mit dem Pfeil nach rechts.", " ", "Zum Start bitte eine beliebige Taste drücken!"]);
}
}
SessionEnd(){
SessionEndMessage(){
}
}
Block( BlockCounter, StoreData){
BlockStartMessage(){
}
}
BlockEnd(){
BlockEndMessage(){
}
}
Trial( TrialCounter, Standard, Comparison, BrightnessInductionSquares.VariableCenterColor, BrightnessInductionSquares.ResponseCode){
BrightnessInductionSquares(){
StandardCenterSize = 0.3;
VariableCenterSize = 0.3;
StandardSurroundSize = 400;
VariableSurroundSize = 400;
SurroundDistance = 40;
StandardSurroundColor = black();
VariableSurroundColor = black();
VariableCenterLowerLimitColor = black();
VariableCenterHigherLimitColor = white();
Timer = de.pxlab.pxl.TimerCodes.RESPONSE_TIMER;
Duration = 1000;
ResponseSet = [0, 37, 39];
}
ClearScreen(){
Timer = de.pxlab.pxl.TimerCodes.CLOCK_TIMER;
Duration = 2000;
}
}
// Command line assignments
AssignmentGroup();
}
Factors(){
IndependentFactor( Standard, Trial.BrightnessInductionSquares.StandardCenterColor, Trial.BrightnessInductionSquares.VariableCenterLowerLimitColor, Trial.BrightnessInductionSquares.VariableCenterHigherLimitColor){
FactorLevel( 10, colorAtLum(white(), 10), colorAtLum(white(), 8.5), colorAtLum(white(), 11.5));
FactorLevel( 80, colorAtLum(white(), 80), colorAtLum(white(), 67), colorAtLum(white(), 93));
}
IndependentFactor( Comparison, Trial.BrightnessInductionSquares.VariableCenterColorWeight){
FactorLevel( 1, 0);
FactorLevel( 2, 0.17);
FactorLevel( 3, 0.33);
FactorLevel( 4, 0.5);
FactorLevel( 5, 0.67);
FactorLevel( 6, 0.83);
FactorLevel( 7, 1);
}
}
Procedure(){
Session(){
Block( 1, 0){
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
}
Block( 2, 1){
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
}
Block( 3, 1){
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
}
Block( 4, 0){
Trial( ?, 10, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
}
Block( 5, 1){
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
}
Block( 6, 1){
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
Trial( ?, 80, <1, 2, 3, 4, 5, 6, 7>, ?, ?);
}
}
}
}