1.Make the index of the larva as the filename of stimulus sequences(mat), imaging parameters(txt), and original calcium data(xlsx).
2.Run RF_movingdots_final.m and import files of stimulus sequences, imaging parameters, and original calcium data, respectively.
3.Set other parameters necessary for analysis.
4.Export files of RF values in xlsx format in which each column represent RF values of all neurons from the same larva. Run corresponding codes in RF_movingdots_final.m for statistical analysis.
5.fit_gauss2d.m is used for 2D Gaussion fitting and could be loaded automatically.