umyelab / LabGym

Quantify user-defined behaviors.
GNU General Public License v3.0
58 stars 5 forks source link

missing data after "analyze behaviors" #157

Closed vzimmern closed 2 weeks ago

vzimmern commented 1 month ago

Good afternoon,

I am using "Analyze Behaviors", only obtaining animal kinematics (no categorizer). I selected 4 locomotion parameters and I'm interested in acceleration.

In the resulting excel file, there is some missing data. Here's a screenshot.

image

Is there a reason for the missing data? Anything I can do to fix that? Thanks!

yujiahu415 commented 1 month ago

Hi, I guess the missing data is ‘acceleration’, right? It is calculated as (max velocity - min Velocity) / t, where Vmax and Vmin is found within a behavior episode, and t is the duration of the change from Vmax to Vmin or Vmin to Vmax. So when during a behavior episode the Vmax equals to Vmin, the t is 0 and cannot be divided. And at that frame, the data is ‘na’. You can simply replace all the missing data with ‘0’ if you want.

vzimmern commented 1 month ago

Great, that works.

Another question. I'm trying to obtain the "angle" and the "distance" as described in your Cell Reports Methods paper. However, even after using my categorizer and detector with the Analyze Behaviors module, I can't find an excel file with the distance and the angle. I'm trying to use angle to identify behaviors during which a mouse jumps vertically, so I would like to select using an angle corresponding to a vertical movement. Where can I find the angle and distance excel files?

yujiahu415 commented 1 month ago

Hi, The ‘angle’ has been deprecated since v1.9 because later I realized that the calculation sometimes may not represent the true angle and thus may not be always useful. But the ‘distance’ is still there. You can choose ‘4 locomotion parameters’ and the distance will be calculated.