Skip to content

Code for analysing the visual preference, two-choice bar fixation freely-flying experiments in the G4 arena.

Notifications You must be signed in to change notification settings

leburnett/G4-LB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

G4_TwoChoice

Two choice visual discrimination experiments conducted in the G4 tethered flight arena at HHMI Janelia.

This code works for experiments running a particular version of the protocol for this experiment: CL_2PatternDiscrim_Flip_2REPS_09-15-23_10-13-33.

Processing the raw data:

You must first run the process_data function from the G4_Display_Tools repository to return the processedData.mat file. In order to run this function, you have to have a processing_settings.mat file and link to this settings file when calling the process_data function.

Analysing the data from one experiment (a single fly):

Once you have generated the 'ProcessedData.mat' file for the experiment, you can run peak_values = preprocess_twochoice_barfixation_data(date_path) using the path to the date folder containing the ProcessedData.mat file. This will return a structure peak_values, containing the peak values for each trial, which can be used for further analysis.

Analysing the data from multiple experiments (multiple flies):

If you want to process the data from multiple dates and multiple experiments at the same time, you can run function process_all_2C_BF_data() which will process all of the data within the data folder.

Plotting the data:

First, generate a combined table using the following function [all_rep_data_all_flies, fly_names] = generate_tbl_all_reps(orig_flip) then run the plotting function: plot_mean_sem_histogram_all_reps()

The plotting function requires a .mat file which contains a table with the names of the 17 conditions.

You can also run through a number of different plotting functions within this script: run_plotting_functions().

About

Code for analysing the visual preference, two-choice bar fixation freely-flying experiments in the G4 arena.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors