MovementAngleValidator class¶
Methods and properties:¶
-
class
trajtracker.validators.
MovementAngleValidator
(min_angle=None, max_angle=None, calc_angle_interval=None, grace_period=0, enabled=True)¶ -
__init__
(min_angle=None, max_angle=None, calc_angle_interval=None, grace_period=0, enabled=True)¶ Constructor - invoked when you create a new object by writing MovementAngleValidator()
Parameters: - min_angle – See
min_angle
- max_angle – See
max_angle
- calc_angle_interval – See
calc_angle_interval
- grace_period – See
grace_period
- enabled – See
enabled
- min_angle – See
-
calc_angle_interval
¶ Time minimal distance over which a direction vector can be calculated
-
disable_event
¶ The event on which the object should be disabled. This will work only when the object is registered to an
EventManager
Note: This property is deprecated, use disable_events instead
Type: Event
-
disable_events
¶ The events on which the object should be disabled. This will work only when the object is registered to an
EventManager
Type: collection of Event objects
-
enable_event
¶ The event on which the object should be enabled. This will work only when the object is registered to an
EventManager
Note: This property is deprecated, use enable_events instead
Type: Event
-
enable_events
¶ The events on which the object should be enabled. This will work only when the object is registered to an
EventManager
Type: collection of Event objects
-
enabled
¶ Whether the object is currently functioning or disabled
Type: bool
-
grace_period
¶ The grace period in the beginning of each trial, during which speed is not validated (in seconds).
-
log_level
¶ Logging level of this object: trajtracker.log_none, log_error (default), log_warn, log_info, log_debug, log_trace
-
max_angle
¶ The maximal valid angle (in degrees) This value can be either smaller or larger than
min_angle
-
min_angle
¶ The minimal valid angle (in degrees) This value can be either smaller or larger than
max_angle
-
reset
(time0=None)¶ Called when a trial starts - reset any previous movement
-
update_xyt
(position, time_in_trial, time_in_session=None)¶ Given a current position, check whether the movement complies with the speed limits.
Parameters: - position – Current (x,y) coordinates
- time_in_trial – Time, in seconds. The zero point doesn’t matter, as long as you’re consistent until reset() is called.
- time_in_session – ignored
Returns: None if all OK, ExperimentError if error
-