# ============================================== #
# DATE: 20-10-2020 BEHAVIORAL LEARNING SESSION - Sarah Kusch
# ============================================== #
scenario="pons_fmri";
no_logfile=true;
pcl_file="scanner_preplay_block_03.pcl";

# =======  COMMENT this for fMRI-Mode ========== #
scenario_type=fMRI_emulation;
scan_period=1500; # time between mri scans (TR)

# ======  UNCOMMENT this for fMRI-Mode  ======== #
#scenario_type=fMRI;
#pulse_code=97; # to identity main pulses
#pulses_per_scan=1;

# ============ SCREEN SETTINGS ================= #
# BEHAVIORAL LAB
screen_width=1280;
screen_height=800;
screen_bit_depth = 32;
screen_width_distance = 12.75;
screen_height_distance = 9.5;
screen_distance = 17.0;

/*
#SIEMENS PrismaFit BOLDscreen fMRI 2020-10
screen_width=1920;
screen_height=1080;
screen_bit_depth = 24;
screen_width_distance = 27.5;
screen_height_distance = 15.47;
screen_distance = 52.76; */
# ============================================== #
active_buttons=1;
button_codes=1;

response_matching=simple_matching;
default_font_size=0.7;
default_font="Arial";
default_text_color=255,255,255;
default_background_color = 0,0,0;			# black

# SDL
begin;

# Pictures ===================================== #

text {caption="+";font_color=255,255,255;font="Arial";}txt_fixcross_white; #to reuse variable, but if default not used, not necessary either

picture {   # needed for continuous presentation of fixation cross
	text txt_fixcross_white;
	x=0;y=0;
}default;

picture {
	text txt_fixcross_white;
	x=0;y=0;
}pic_fixcross;

picture {
	text {caption="+";font_color=255,0,0;font="Arial";};	
	x=0;y=0;
}pic_fixcross_red;

picture {
	text {caption="+";font_color=0,255,0;font="Arial";};	
	x=0;y=0;
}pic_fixcross_green;

ellipse_graphic {
	ellipse_width = 1.5;
	ellipse_height = 1.5;
	color = 255, 255, 255;
}ellipse1;

ellipse_graphic {
	ellipse_width = 1.5;
	ellipse_height = 1.5;
	color = 255, 255, 255;
}ellipse2;

ellipse_graphic {
	ellipse_width = 1.5;
	ellipse_height = 1.5;
	color = 255, 255, 255;
}ellipse3;

ellipse_graphic {
	ellipse_width = 1.5;
	ellipse_height = 1.5;
	color = 255, 255, 255;
}ellipse4;


picture {
   ellipse_graphic ellipse1;
      x = 0; y = 0;
      text {caption="+";};
		x=0;y=0;
	}pic_dot1;
	
picture {
   ellipse_graphic ellipse2;
      x = 0; y = 0;
      text {caption="+";};
		x=0;y=0;
	}pic_dot2;

picture {
   ellipse_graphic ellipse3;
      x = 0; y = 0;
      text {caption="+";};
		x=0;y=0;
	}pic_dot3;
	
picture {
   ellipse_graphic ellipse4;
      x = 0; y = 0;	
      text {caption="+";};
		x=0;y=0;
	}pic_dot4;
	
# blocked feedback text
trial {
	trial_duration = 3000;
	picture {
		text {caption = "";font_color=255,255,255;font="Arial";}accuracy_text;
		x=0;y=2;
		text {caption="+";};
		x=0;y=0;
	}pic_feedback;
	code = "feedback";
} trial_blocked_feedback;

# Trial ======================================= #
# locations are specified later in pcl file

trial {
   trial_duration = 1500;	# will be changed in pcl files (depending on ITI)
   stimulus_event {
	picture pic_dot1;
	time=0;
	duration = 100; # adjust form pcl
	code="1";
	#response_active=true;
	#target_button=1; #is done in pcl I think
	stimulus_time_in=0; # lower limit for response events to be associated with response active stimuli. 
	stimulus_time_out = 1000;
	}ev_dot1;
	
   stimulus_event {
	picture pic_dot2;
	time=100; # adjust form pcl
	duration = 100; # adjust form pcl
	code="2";
	#response_active=true;
	stimulus_time_in=0; # lower limit for response events to be associated with response active stimuli. 
	stimulus_time_out = 1000;
	#target_button=1;
	}ev_dot2;

   stimulus_event {
	picture pic_dot3;	
	time=200; # adjust form pcl
	duration = 100; # adjust form pcl
	code="3";
	#response_active=true;
	#target_button=1;
	stimulus_time_in=0; # lower limit for response events to be associated with response active stimuli. 
	stimulus_time_out = 1000;
	}ev_dot3;

   stimulus_event {
		picture pic_dot4;	
	time=300; # adjust form pcl
	duration = 100; # adjust form pcl
	code="4";
	#response_active=true;
	#target_button=1; # adjust form pcl
	stimulus_time_in=0; # lower limit for response events to be associated with response active stimuli. 
	stimulus_time_out = 1000;
	}ev_dot4;
	
}trial_full_sequence;

trial {
   trial_duration = 1500;	# will be changed in pcl files (depending on ITI)
   stimulus_event {
	picture pic_dot1;
	time=0;
	duration = 100; # adjust form pcl
	code="100";
	stimulus_time_in=0; # lower limit for response events to be associated with response active stimuli. 
	stimulus_time_out = 1000;
	}ev_dot100;	

}preplay;


# end block
trial {
trial_duration=25000; # pcl adjust
stimulus_event {
picture {
      text {caption="Thank you! We will continue shortly... .";font_size=0.5;};
      x = 0; y = 5;
      text {caption="+";};
x=0;y=0;
}pic_tmp; 
time=6000;
code="end_of_block";
duration=25000; # adjust from pcl
}ev_end_of_block;
}trial_end_of_block; 



# instructions
text { caption = "XXX"; preload = false; max_text_width=22;}text_instructions;
# instruction block
trial {
	trial_duration=12000; # pcl adjust
	stimulus_event {
	picture {
		text text_instructions;
      x = 0; y = 5;
      text {caption="+";};
      x = 0; y = 0;
	}pic_instr;	
	time=0;
	code="instructions";
	}ev_instr_block;
}trial_instr_block;
