twoD/detect
Functions specifically related to event detection of 2D recordings
create_behavior_df
create_behavior_df (normalized_df:pandas.core.frame.DataFrame, bodyparts_to_include:List[str])
add_orientation_to_behavior_df
add_orientation_to_behavior_df (behavior_df:pandas.core.frame.DataFrame, all_bodyparts:Dict, bodyparts_for_directi on_front_to_back:List[str])
add_immobility_based_on_several_bodyparts_to_behavior_df
add_immobility_based_on_several_bodyparts_to_behavior_df (behavior_df:pa ndas.core.frame .DataFrame, all _bodyparts:Dict , bodyparts_cri tical_for_freez ing:List[str])
create_event_objects
create_event_objects (interval_border_idxs:List[Tuple[int,int]], fps:int, event_type:str)
add_event_bouts_to_behavior_df
add_event_bouts_to_behavior_df (behavior_df:pandas.core.frame.DataFrame, event_type:str, events:List[gait_analysis .core.EventBout])
get_gait_events
get_gait_events (all_bodyparts:Dict, fps:int, gait_min_rolling_speed:float, gait_min_duration:float)
get_gait_disruption_events
get_gait_disruption_events (behavior_df:pandas.core.frame.DataFrame, fps:int, gait_events:List[gait_analysis.core. EventBout], gait_disruption_max_time_to_immobility:float)
get_interval_border_idxs_from_event_type_and_id
get_interval_border_idxs_from_event_type_and_id (behavior_df:pandas.core .frame.DataFrame, event_type:str, event_id:int)