extract_points#
- prey_capture_python.analysis.extract_points.extract_points(file, bodyparts, fr=200, pix2cm=15.8, thresh=0.7, startonly=False)#
function to extract mouse and cricket xy positions from DLC output csv will also get the likelihood values for cricket positions can be adapted later to add extraction of likelihood for the mouse
- Parameters
file (str) – filename/ path to the DLC output
bodyparts (list) – list of the bodypart labels from DLC you need added as an input since names vary across models
fr (int) – framerate of videos, default=200
pix2cm (int) – conversion from pixels to cm, default=15.8 (needs to be checked)
thresh (int) – threshold for likelihood values, default=0.7
startonly (bool) – flag to only include the first 2min in calculations so laser is always on
- Returns
xy coordinates for the mouse across the trial cricket_xy (
numpy.ndarray
): xy coordinates for the cricket across trial, cricket_xy is filtered to remove points with low likelihood cricket_p (numpy.ndarray
): likelihood values of cricket points- Return type
mouse_xy (
numpy.ndarray
)
- prey_capture_python.analysis.extract_points.getmidpoint(pt1, pt2)#