CircularTrajectoryGenerator class¶
Generate a circular movement trajectory for a stimulus.
Use this class in conjunction with StimulusAnimator
Methods and properties:¶
-
class
trajtracker.movement.CircularTrajectoryGenerator(center=None, radius=None, degrees_per_sec=None, full_rotation_duration=None, degrees_at_t0=None, clockwise=True)¶ -
__init__(center=None, radius=None, degrees_per_sec=None, full_rotation_duration=None, degrees_at_t0=None, clockwise=True)¶ Constructor - invoked when you create a new object by writing CircularTrajectoryGenerator()
Parameters: - center – See
center - radius – See
radius - degrees_per_sec – See
degrees_per_sec - degrees_at_t0 – See
degrees_at_t0
- center – See
-
get_traj_point(time)¶ Return the trajectory info at a certain time
Parameters: time – in seconds Returns: a dict with the coordinates (‘x’ and ‘y’ entries).
-
log_level¶ Logging level of this object: trajtracker.log_none, log_error (default), log_warn, log_info, log_debug, log_trace
-
center¶ The center of the circle (x,y coordinates)
-
radius¶ The radius of the circle
-
degrees_per_sec¶ The radial speed of movement (you can also specify the speed as
full_rotation_duration)
-
full_rotation_duration¶ The radial speed of movement, in seconds (you can also specify the speed as
degrees_per_sec)
-
degrees_at_t0¶ Position (specified as degrees) where the stimulus should be at time=0
-
clockwise¶ Whether the movement is clockwise or counter-clockwise
-