= Artifact cleaning with SSP = It is common to have portions of recordings contaminated by events coming from the subject (eye blinks, movements, heartbeats, teeth clenching, implanted stimulators...) or from the environment (stimulation equipment, elevators, cars, trains, building vibrations...). Some of them are well defined, reproducible, short and frequent, and can be removed efficiently using Signal Space Projections (SSP). The purpose of this tutorial is to introduce this technique to correct for the cardiac and ocular artifacts. For this tutorial, we are going to use the protocol created in the previous tutorial [[Tutorials/TutRawViewer|Review continuous recordings and edit markers]]. If you have not followed this tutorial yet, please do it now. <> == Signal Space Projections == The Signal-Space Projection (SSP) is one approach to rejection of external disturbances. Here is a short description of the method by Matti Hämäläinen, from the [[http://www.martinos.org/meg/manuals/MNE-manual-2.7.pdf|MNE 2.7 reference manual]], section 4.16: Unlike many other noise-cancellation approaches, SSP does not require additional reference sensors to record the disturbance fields. Instead, SSP relies on the fact that the magnetic field distributions generated by the sources in the brain have spatial distributions sufficiently different from those generated by external noise sources. Furthermore, it is implicitly assumed that the linear space spanned by the significant external noise patterns has a low dimension. Without loss of generality we can always decompose any n-channel measurement into its signal and noise components as Further, if we know that is well characterized by a few field patterns , we can express the disturbance as where the columns of constitute an orthonormal basis for , is an -component column vector, and the error term is small and does not exhibit any consistent spatial distributions over time, i.e., . Subsequently, we will call the column space of the noise subspace. The basic idea of SSP is that we can actually find a small basis set such that the conditions described above are satisfied. We can now construct the orthogonal complement operator and apply it to yielding since . The projection operator is called the signal-space projection operator and generally provides considerable rejection of noise, suppressing external disturbances by a factor of 10 or more. The effectiveness of SSP depends on two factors: 1.The basis set should be able to characterize the disturbance field patterns completely and 2.The angles between the noise subspace space spanned by and the signal vectors should be as close to as possible. If the first requirement is not satisfied, some noise will leak through because . If the any of the brain signal vectors is close to the noise subspace not only the noise but also the signal will be attenuated by the application of and, consequently, there might by little gain in signal-to-noise ratio. Figure 4.16 demonstrates the effect of SSP on the Vectorview magnetometer data. After the elimination of a three-dimensional noise subspace, the absolute value of the noise is dampened approximately by a factor of 10 and the covariance matrix becomes diagonally dominant. nbt() bt()bst()bnt()+= bnt()b1…bm bnt()Ucnt() + et() ,= Ub1…bmcnt()met()CeEeeT{}I==Ub1…bm P⊥IUUT–= bt() bt()P⊥bst() ,≈ P⊥bnt()P⊥Ucnt()=0≈P⊥ b1…bm b1…bmbst()π2⁄ P⊥bnt()0≠bst()P⊥ Since the signal-space projection modifies the signal vectors originating in the brain, it is necessary to apply the projection to the forward solution in the course of inverse computations. This is accomplished by mne_inverse_operator as described in Section 6.4. For more information on SSP, please consult the references listed in Section 13.4. For more information about the SSP method, please refer to the following publications: * C. D. Tesche, M. A. Uusitalo, R. J. Ilmoniemi, M. Huotilainen, M. Kajola, and O. Salonen, "Signal-space projections of MEG data characterize both distributed and well-localized neuronal sources," Electroencephalogr Clin Neurophysiol, vol. 95, pp. 189-200, 1995. * M. A. Uusitalo and R. J. Ilmoniemi, "Signal-space projection method for separating MEG or EEG into components," Med Biol Eng Comput, vol. 35, pp. 135-40, 1997. == Identifying the artifact == The first step for this method is to identify a large number of examples of the artifact. === Manual marking === * Select the protocol '''!TutorialRaw''' created in the previous tutorial, and select the "Functional data" view (second button in the toolbar on top of the database explorer). * Double-click on the continuous recordings ("Link to raw file") to open the MEG recordings. * Right-click on the continuous recordings again > '''Misc > Display time series'''. === Automatic detection ===