Doc_code |

Cargando...
Buscando...
Nada coincide
constants.py
Ir a la documentación de este archivo.
1
21
22
23# MAIN
24DUMMYMODE = False # False for gaze contingent display, True for dummy mode (using mouse or joystick)
25LOGFILENAME = 'default' # logfilename, without path
26LOGFILE = LOGFILENAME[:] # .txt; adding path before logfilename is optional; logs responses (NOT eye movements, these are stored in an EDF file!)
27TRIALS = 5
28
29
30# UNA OPCION
31
32# # Constants for the display
33# DISPSIZE = (1920, 1080) # Resolución en píxeles
34# SCREENSIZE = (52.8, 29.7) # Tamaño físico de la pantalla en cm
35
36# # Conversión de centímetros a píxeles basada en el tamaño físico de la pantalla
37# def cm_to_px(cm, screen_cm, screen_px):
38# return (cm / screen_cm) * screen_px
39
40# # Calcular el centro de la pantalla en píxeles
41# CENTER = (DISPSIZE[0] // 2, DISPSIZE[1] // 2)
42
43# # Establecer el tamaño del estímulo en centímetros
44# stimulus_diameter_cm = 2.09 # Estímulo de 2.09 cm
45
46# # Convertir el tamaño del estímulo a píxeles
47# stimulus_diameter_px = cm_to_px(stimulus_diameter_cm, SCREENSIZE[0], DISPSIZE[0])
48
49# # Display and eye tracker settings (kept as is)
50# DUMMYMODE = False
51# LOGFILENAME = 'default'
52# LOGFILE = LOGFILENAME[:]
53# TRIALS = 5
54
55# SCREENNR = 0
56# DISPTYPE = 'pygame'
57# MOUSEVISIBLE = False
58# BGC = (125, 125, 125)
59# FGC = (0, 0, 0)
60# ---------------------------------------------------------------
61
62
63# DISPLAY
64# used in libscreen, for the *_display functions. The values may be adjusted,
65# but not the constant's names
66SCREENNR = 0 # number of the screen used for displaying experiment
67DISPTYPE = 'pygame' # either 'psychopy' or 'pygame'
68DISPSIZE = (1920,1080) # canvas size
69CENTER = (DISPSIZE[0] // 2, DISPSIZE[1] // 2) # Centro de la pantalla en píxeles
70SCREENSIZE = (52.8, 29.7) # physical display size in cm
71MOUSEVISIBLE = False # mouse visibility
72BGC = (125, 125, 125) # backgroundcolour
73FGC = (0,0,0) # foregroundcolour
74
75# SOUND
76# defaults used in libsound. The values may be adjusted, but not the constants'
77# names
78SOUNDOSCILLATOR = 'sine' # 'sine', 'saw', 'square' or 'whitenoise'
79SOUNDFREQUENCY = 440 # Herz
80SOUNDLENGTH = 100 # milliseconds (duration)
81SOUNDATTACK = 0 # milliseconds (fade-in)
82SOUNDDECAY = 5 # milliseconds (fade-out)
83SOUNDBUFFERSIZE = 1024 # increase if playback is choppy
84SOUNDSAMPLINGFREQUENCY = 48000 # samples per second
85SOUNDSAMPLESIZE = -16 # determines bit depth (negative is signed
86SOUNDCHANNELS = 2 # 1 = mono, 2 = stereo
87
88# INPUT
89# used in libinput. The values may be adjusted, but not the constant names.
90MOUSEBUTTONLIST = None # None for all mouse buttons; list of numbers for buttons of choice (e.g. [1,3] for buttons 1 and 3)
91MOUSETIMEOUT = None # None for no timeout, or a value in milliseconds
92KEYLIST = None # None for all keys; list of keynames for keys of choice (e.g. ['space','9',':'] for space, 9 and ; keys)
93KEYTIMEOUT = 1 # None for no timeout, or a value in milliseconds
94JOYBUTTONLIST = None # None for all joystick buttons; list of button numbers (start counting at 0) for buttons of choice (e.g. [0,3] for buttons 0 and 3 - may be reffered to as 1 and 4 in other programs)
95JOYTIMEOUT = None # None for no timeout, or a value in milliseconds
96
97# EYETRACKER
98# general
99TRACKERTYPE = 'tobii' # either 'smi', 'eyelink' or 'dummy' (NB: if DUMMYMODE is True, trackertype will be set to dummy automatically)
100TRACKERSERIALNUMBER = 'TPFC6-010203158072'
101SACCVELTHRESH = 35 # degrees per second, saccade velocity threshold
102SACCACCTHRESH = 9500 # degrees per second, saccade acceleration threshold
103# EyeLink only
104# SMI only
105SMIIP = '127.0.0.1'
106SMISENDPORT = 4444
107SMIRECEIVEPORT = 5555
108
109# FRL
110# Used in libgazecon.FRL. The values may be adjusted, but not the constant names.
111FRLSIZE = 200 # pixles, FRL-size
112FRLDIST = 125 # distance between fixation point and FRL
113FRLTYPE = 'gauss' # 'circle', 'gauss', 'ramp' or 'raisedCosine'
114FRLPOS = 'center' # 'center', 'top', 'topright', 'right', 'bottomright', 'bottom', 'bottomleft', 'left', or 'topleft'
115
116# CURSOR
117# Used in libgazecon.Cursor. The values may be adjusted, but not the constants' names
118CURSORTYPE = 'cross' # 'rectangle', 'ellipse', 'plus' (+), 'cross' (X), 'arrow'
119CURSORSIZE = 20 # pixels, either an integer value or a tuple for width and height (w,h)
120CURSORCOLOUR = 'pink' # colour name (e.g. 'red'), a tuple RGB-triplet (e.g. (255, 255, 255) for white or (0,0,0) for black), or a RGBA-value (e.g. (255,0,0,255) for red)
121CURSORFILL = True # True for filled cursor, False for non filled cursor
122CURSORPENWIDTH = 3 # cursor edge width in pixels (only if cursor is not filled)