Rats synchronize predictively to metronomes, Rajendran, et al. 2024
Description
Rats were trained to synchronize to metronomes, with a tempo chosen randomly on each trial between 0.5 and 2 Hz. The raw data here are from 8 rats trained on this task. The code included here includes the code to implement the model described in the article, and code to generate the figures. Please see the article for a detailed description of the methods.
Files
Steps to reproduce
Rats synchronize predictively to metronomes All data and code are provided here to reproduce the results reported in 'Rats synchronize predictively to metronomes.' Data include: - Raw data files - Preprocessed data files - Model outputs Code includes: - Preprocessing of raw data files - Running the model - Plotting manuscript figures Step 1: Data preprocessing Data preprocessing is done by running the file preproc_data_run_sim.m, which produces the output files: 1. data12_resprat.mat 2. simulations_data12.mat Step 2: Model Model fitting The model takes some time to run, so we have provided the model parameters used in the manuscript for convenience in modelout_1bins_11Feb2024.mat and modelout_5bins_14Feb24.mat. If you want to regenerate these files, you can run fmin_efficient_LINEAR_largerdrange.m to find the best model parameters for each type of model given the (preprocessed) data. Note that this can be done on all trials together, or split into 5 tempo groups (comment/uncomment the relevant code at the top of this file). Generate model predictions The file genMarkovModelPreds_1bin.m uses the optimized model parameters to generate the behavior that each model would produce based on these parameters. This file also takes some time to run, so the output files used for plotting have been included: model_durs_1bins_11Feb2024_wcorrection_BIN1.mat model_w_p_r_wr_i_wp_1bins_11Feb2024_wcorrection_BIN1.mat Step 3: Plot figures The file makefigs.m produces the main and supplementary figures from the manuscript. Before running this, ensure that there exists a preprocessed data file, simulations file, and model output and model predictions files. Note: The data structures are large with many fields, which are largely self-explanatory if looking at the code. However, if you have any further questions please contact vani.g.rajendran@gmail.com and/or israel.nelken@mail.huji.ac.il.
Institutions
Categories
Funding
Hong Kong General Research Fund
11100518
Israel Science Foundation
1126/18