bouter.free package¶
Module contents¶
- 
class 
bouter.free.FreelySwimmingExperiment(path, session_id=None, cache_active=False)[source]¶ Bases:
bouter.experiment.Experiment- 
property 
camera_px_in_mm¶ Return camera pixel size in millimeters
- Parameters
 exp –
- Returns
 
- 
compute_velocity(max_interpolate=2, recalculate_vel=False, scale=None, median_vel=False, window_size=7)[source]¶ Compute the squared total swimming velocity for each fish. Add them as new columns to the dataframe log and return the complete dataframe.
- Parameters
 max_interpolate – number of points to interpolate if surrounded by NaNs in tracking
recalculate_vel –
scale – mm per pixel, recalculated by default
- Returns
 
- 
get_bout_properties(continuity=None)[source]¶ Makes a summary of all extracted bouts with basic kinematic parameters and timing.
- Parameters
 continuity –
- Returns
 a dataframe containing all bouts
- 
get_bouts(scale=None, threshold=1, **kwargs)[source]¶ Extracts all bouts from a freely-swimming tracking experiment
- Parameters
 exp – the experiment object
scale – mm per pixel, recalculated by default
threshold – velocity threshold in mm/s
- Returns
 tuple: (list of single bout dataframes, list of boolean arrays marking if the bout i follows bout i-1)
- 
property 
n_fish¶ 
- 
property 
n_tail_segments¶ 
- 
property 
tail_columns¶ Return a nested list of names of columns with tracking data from all tracked segments. One list for each fish tracked during the experiment.
- 
property