LineTrajectoryGenerator class

Generate a straight movement trajectory for a stimulus.

Use this class in conjunction with StimulusAnimator

Methods and properties:

class trajtracker.movement.LineTrajectoryGenerator(start_point=None, end_point=None, duration=None, return_to_start=False, cyclic=False)
__init__(start_point=None, end_point=None, duration=None, return_to_start=False, cyclic=False)

Constrcutor

Parameters:
cyclic

Whether to stop after the trajectory duration has passed (False) or to restart the same trajectory (True)

duration

The time (in seconds) it should take for moving from start to end.

end_point

The trajecotry end point (x,y)

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

return_to_start

If True, the trajectory will go to the end point and then back to the start point

start_point

The trajecotry starting point (x,y)