= Tutorial 6: Computing a noise covariance matrix = The source reconstruction process requires an estimation of the noise level in the recordings. This tutorial shows to compute the noise covariance matrix for the two averaged files we have in database. * Select protocol TutorialCTF, switch to the ''Functional data (sorted by subjects) ''view. * To estimate the noise covariance matrix, we need to use only the real recordings, and not the variance of the average (second recordings file of each condition). So select them at the same time (using the SHIFT or CTRL key) : StimRightThumb/ERP and StimLeftThumb/ERP. Then right-click on one of them.<
><
> {{attachment:noiseCovMenu.gif}} * The Noise covariance menu includes: * '''Import from file''': Uses a matrix that was computed previously using the MNE software. * '''Import from Matlab''': Import from any [nChannels, nChannels] matrix in Matlab workspace. * '''Compute from recordings''': Use the selected recordings to estimate the noise covariance. * Select "Compute from recordings", the options window will appear:<
><
> {{attachment:noiseCovOptions.gif}} * The program is going to take the pre-stimulus values (= ''baseline'') for all the files that have been selected, concatenate them, and then compute the covariance matrix for this big F matrix: <
>NoiseCov = (F - mean(F)) * (F - mean(F))' * The top part of this window shows a summary of the files that have been selected: 2 files at 1250Hz. Total: 750 time samples. * In the bottom part, you can define some options: * '''Baseline''': You can specify what you consider as the pre-stimulus time window in your recordings. By default it takes all the time instants before 0ms, but you might need to redefine this depending on your experiment. * '''Output''': Compute either a full noise covariance, or just a diagonal matrix (only the variances of the channels). Keep the default selection unless you know exactly what you are doing. * Click on OK. Wait for a few seconds. Observe that two new files appeared in the database, one for each condition. Each of them contains the same [nChannels x nChannels] noise covariance matrix. Right-click on one of them:<
><
> {{attachment:noiseCovFiles.gif}} === Use a noise cov. matrix from another dataset === Divide Use as many recordings file as possible: better estimation