tellmewhentheymove.pl

 

This is the first figure. It is a blank.
It does not contain flies.

The second figure. It contains sedated flies. Yes, they are the tiny dots. If you wish you can use the whole field of view.

In the Coordinates area, you will define a tiny box around each animal.
The program will view each animal like this:

The program takes the difference between the blank and each consecutive image. The program will record the amount of white in each image. As soon as the animal moves, the image become black (identical to the blank) and the white signal drops to zero. This is the time point that the program records as the moment of recovery from sedation.

The results file looks like this. This is for a time interval of 2.


The whenawake_2 file looks like this. Notice that if a fly does not wake up that the recorded value is 0.