DLCutils icon indicating copy to clipboard operation
DLCutils copied to clipboard

Added functionality: linear transformation and scaling of DLC data.

Open MSchellenberger opened this issue 2 years ago • 2 comments

Also fixed outdated email in code of conduct.

MSchellenberger avatar Oct 26 '23 10:10 MSchellenberger

Super! thanks for your contribution! To make it easy for someone to "see" what it does, could you have a small amount of demo data and an image? i.e., what is the output of your code? 😀

MMathisLab avatar Oct 26 '23 10:10 MMathisLab

Hi, thank you for the quick feedback!

I´ve already uploaded a demo data csv and there´s a 'tutorial' jupyter notebook which is a run through the code. Furthermore, there´s a README where I explain what the code does and what inputs it needs. In terms of example pictures, I could plot the trajectory of DLC markers, or add a frame of the video with DLC markers & real distances overlayed. If you have any other ideas for visualizing the functionality let me know :)

The code outputs a df with the same shape as the input DLC df. This code just changes the reference coordinate system of DLC to a reference coordinate system that is based on the behavioral context. Meaning that if you for example run Open Field, and you track the corners with DLC, you can transform the coordinates of DLC tracking (which depict the px distance of the marker from a corner of the field of view in the recorded video) into coordinates that depict the cm distance from a corner of the behavioral context.

I could also add a concrete use cases that highlight the need for this (e.g. having different sized camera field of views between recording days and thus different speed(px/s) values even though the speed is the same, or explain what I used it for in this preprint).

I´m super excited to contribute to the amazing DLC ecosystem!

MSchellenberger avatar Oct 26 '23 12:10 MSchellenberger