

The iPhone 6 & 7, and the Samsung Galaxy S7 will all record HD (1280x720) at 240 Frames Per Second (FPS), which is eight times as fast as typical video. In the past, I've used a GoPro, but their fisheye distortion is a less than ideal. Open the Compare_Distances.R script in R studioYou'll need a camera capable of recording high-speed video at a reasonable resolution.Store the csv-files from the previous script in a folder where the same experimental groups are in the same folder (for example “Starved” folder contains the csv files of “Starved_ForR” and “Starved_ForS”).

You can also check the bar plots of mean distance and mean time of first movement.Ĭompare larval movement data of different groups (Compare_Distances.R).The plotted trajectories containing information about the name of the text file and the calculated distance can now be checked for each file.To adjust where this file should be stored change setwd above the write.csv function to your desired file path. Run the script -> A csv-file is generated containing information about the name of the Experiment and Group, the distances in cm of each larva and the time of the first movement of each larva.If you have no subfolders in the Experiment-folder you need to adjust the code. Change Experiment to the name of the experiment (= name of the Experiment folder, for example “Starved”) and Group to the fly group (= name of Group folder in the Experiment folder, for example “ForR”) you want to evaluate.Set working directory by changing setwd to the file path where your folders are stored.Make sure the required libraries are installed.Open the Calculate_Distance.R script in R studio.Safe your text files from the Kinovea tracking program in folders referring to theĮxperiment and Fly Group (for example “Starved” -> “ForR”).Analyse larval movement of a single group (Calculate_Distance.R)
