RectStartPoint class¶
This is a specific implementation of StartPoint
that shows a rectangular
“start” area, and expects the movement to start in an upward direction.
The differences between the basic StartPoint
and this class are:
- The present class also creates the visual rectangle to display on screen.
The rectangle is created with default visual properties and you can modify it later
(access it via
start_area
) - Consequently, unlike
StartPoint
the present class does not allow defining the start & exit area flexibly. - The present class lets you also tilt the rectangle (
rotation
)
Methods and properties:¶
-
class
trajtracker.movement.
RectStartPoint
(size=None, position=(0, 0), rotation=0, colour=(200, 200, 200), can_exit_in_any_direction=False)¶ -
__init__
(size=None, position=(0, 0), rotation=0, colour=(200, 200, 200), can_exit_in_any_direction=False)¶
-
can_exit_in_any_direction
¶ Whether the finger/mouse can exit the “start” rectangle in any direction (True) or only upwards (False)
This property cannot be updated after the start point was preloaded
-
check_xy
(x_coord, y_coord)¶
-
colour
¶ Color of the start rectangle :type: tuple (red, green, blue)
-
log_level
¶ Logging level of this object: trajtracker.log_none, log_error (default), log_warn, log_info, log_debug, log_trace
-
mark_as_initialized
()¶
-
position
¶ The position of the “start” rectangle on screen
This property cannot be updated after the start point was preloaded
Type: (x,y) tuple
-
preload
()¶ Prepare the stimuli.
Once this is done, you cannot modify
size
,position
, androtation
This method is automatically called if you call
reset()
orcheck_xy()
, however, it is a better practice to call it yourself before the experiment starts, because the method is more time-consuming than other methods.
-
reset
()¶
-
rotation
¶ The tilt of the start rectangle, in degrees (positive number = clockwise)
This property cannot be updated after the start point was preloaded
-
size
¶ The size of the “start” rectangle.
This property cannot be updated after the start point was preloaded
Type: (x,y) tuple
-
start_area
¶ Access the visual rectangle stimulus (an expyriment.stimuli.Rectangle object) - allows modifying its properties.
Note: changing the size/position of this rectangle may result in unexpected behavior
-
state
¶ See
StartPoint.state
-
wait_until_exit
(exp, on_loop_callback=None, on_loop_present=None, event_manager=None, trial_start_time=None, session_start_time=None, max_wait_time=None)¶
-
wait_until_startpoint_touched
(exp, on_loop_callback=None, on_loop_present=None, event_manager=None, trial_start_time=None, session_start_time=None, max_wait_time=None)¶
-