Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
The code and data in this folder enable the user to generate the bayesian estimates of gain and phase for the eye movement of mice. The fits are used in the comparison of model and data in the code in the other section, however the file required for this (the final output of the script 'makeDataAndFits.m') is included in the other folder (BayesFittingSPFC-10kSamples-final.mat). Therefore there is NO need to download or execute the code in this folder if you do not require to see the raw data or regenerate the fits. This folder also includes the output as pdf files: AllRawGraphsSPFC-final.pdf displays the raw eye position data (blue), visual stimulus position (green), vestibular stimulus position (red). There are pages for every condition and every mouse even if that mouse was not recorded under that condition. AllDataGraphsSPFC-final.pdf displays the filtered and trimmed velocity signals with the same colour coding and format as the previous. AllSinglePeriodGraphsSPFC-final.pdf displays all cut data (single period of stimulus) for each frequency and amplitude combination given a separate page and all four conditions displayed. Different colours of lines represent different mice and dashed line is the stimulus. bayesResultsSPFC_10ksamples-final.pdf Is the final output. Each of the final figures represents one of the conditions tested and displays for all freqneucies and amplitdues the mean bayesian estimate of the population response in solid black, the stimulus in dotted black and the individual mice in coloured patches representing the confidence limits of each. To create the fits from the raw data 2 files are required: RAW_MouseDataNoTrimSPFC-final.mat - this contains the raw mouse data MouseDataNoTrimSPFC-final.mat - this contains the filtered and trimmed (beginning and end of file removed) mouse data. These are specified on lines 47 and 49 of the script makeDataAndFitsSPFC.m and the variable names should not be edited or the files will not load correctly. The rest of the file names in this section can be edited but the script is designed to automatically load all previous stages of analysis as it progresses if they have already been completed. Therefore, changing one of these file names will cause that section of code to execute and save the output under the newly given filename. Conversly not changing anything from time of download will not produce any new graphs as the output of each stage already exists. Another important editable parameter is the number of bayes samples to use in the estimation process (numBayesSamples line 66). For the final analysis we used 10000 samples but this takes around 24hours on a good PC to complete, fair estimates can be obtained with a magnitude less samples. The bayesian procedure is carried out via the openbugs program which will need to be downloaded and installed: http://www.openbugs.net/w/FrontPage using the model described in SineModel.txt. Openbugs is called via the matlab function matbugs which is included in the folder however line 46 (variable bugsDirectoryLocation) in makeDataAndFits.m should be edited to reflect the installed location. After editing the lines of code required please execute the script makeDataAndFits.m from within matlab. Another useful feature may be the exFigFlag (line 75), if set to 0 this will not export the figures to pdf via export_fig (which must have another program installed to export to .pdf or .png), instead the figures are kept open in matlab. This removes the need to install the associated programs for export_fig although a lot of figures (>100) are porduced on a full run of all sections and this can crash matlab. For bugs or questions please contact Peter Holland, p.holland@erasmusmc.nl Changelog: all functions and scripts labelled v1.0 on upload on 31/08/2016
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.