# ============================================================== #
# DATE: 17-12-2020 LOCALIZER - Sarah Kusch
# ============================================================== #
scenario="pons_fmri";
no_logfile=false; 
pcl_file="scanner_localizer.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 ================= #
/*
# my computer - in cm
screen_width=1920; #always in pixel
screen_height=1080;
screen_bit_depth = 32;
screen_width_distance = 31;
screen_height_distance = 17.5;
screen_distance = 52; 
*/
#SIEMENS PrismaFit BOLDscreen fMRI 2020-10
screen_width=1920;
screen_height=1080;
screen_bit_depth = 32;
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.5;
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; 

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

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


picture {   
	ellipse_graphic ellipse1;
   x = 0; y = 0;
	text {caption="B";font_color=255,255,255;font="Arial";}txt_letter; # to show letter when dot is on
	x=0;y=0;
}pic_letter_dot;


picture {   
	text {caption="B";font_color=255,255,255;font="Arial";}txt_letter_2; # to show letter when the dot is off
	x=0;y=0;
}pic_letter;


picture {
   ellipse_graphic ellipse1; #dot
      x = 0; y = 0;
}pic_dot1;
	

# Trial ======================================= #

trial {
   trial_duration = 500;	# Letter + Dot
	clear_active_stimuli = false;
   stimulus_event {
	picture pic_letter_dot;
	time=0;
	duration = 250; 
	code="1";
	stimulus_time_in=0; # lower limit for response events to be associated with response active stimuli. 
	stimulus_time_out = 500;

	}ev_dot1;
	
	stimulus_event {			# Letter
	picture pic_letter;
	time=250;
	duration = 250; 
	code="2";
	stimulus_time_in=0;
	stimulus_time_out = 500;
	}ev_dot2;
	
	
}trial_localizer;


# Null Event
trial {
	trial_duration=500; 
	clear_active_stimuli = false;
	stimulus_event {			# Letter
	picture pic_letter;
	time=0;
	duration = 500; 
	code="NE";
	stimulus_time_in=0;
	stimulus_time_out = 500;
	}ev_null;
	
}trial_null;


# 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;

