You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/_includes/channel_interpolation.rst
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,12 +22,11 @@ In short, data repair using spherical spline interpolation :footcite:`PerrinEtAl
22
22
Spherical splines assume that the potential :math:`V(\boldsymbol{r_i})` at any point :math:`\boldsymbol{r_i}` on the surface of the sphere can be represented by:
where :math:`P_{n}(x)` are `Legendre polynomials`_ of order :math:`n`.
33
32
@@ -36,22 +35,22 @@ where :math:`P_{n}(x)` are `Legendre polynomials`_ of order :math:`n`.
36
35
To estimate the constants :math:`C`, we must solve the following two equations simultaneously:
37
36
38
37
.. math:: G_{ss}C + T_{s}c_0 = X
39
-
:label: matrix_form
38
+
:name: matrix_form
40
39
41
40
.. math:: {T_s}^{T}C = 0
42
-
:label: constraint
41
+
:name: constraint
43
42
44
43
where :math:`G_{ss} \in R^{N \times N}` is a matrix whose entries are :math:`G_{ss}[i, j] = g_{m}(cos(\boldsymbol{r_i}, \boldsymbol{r_j}))` and :math:`X \in R^{N \times1}` are the potentials :math:`V(\boldsymbol{r_i})` measured at the good channels. :math:`T_{s} = (1, 1, ..., 1)^\top` is a column vector of dimension :math:`N`. Equation :eq:`matrix_form` is the matrix formulation of Equation :eq:`model` and equation :eq:`constraint` is like applying an average reference to the data. From equation :eq:`matrix_form` and :eq:`constraint`, we get:
:math:`C_{i}` is the same as matrix :math:`{\begin{bmatrix} {T_s}^{T} && 0 \\ T_s && G_{ss} \end{bmatrix}}^{-1}` but with its first column deleted, therefore giving a matrix of dimension :math:`(N + 1) \times N`.
50
49
51
50
Now, to estimate the potentials :math:`\hat{X} \in R^{M \times1}` at the bad channels, we have to do:
52
51
53
52
.. math:: \hat{X} = G_{ds}C + T_{d}c_0
54
-
:label: estimate_data
53
+
:name: estimate_data
55
54
56
55
where :math:`G_{ds} \in R^{M \times N}` computes :math:`g_{m}(\boldsymbol{r_i}, \boldsymbol{r_j})` between the bad and good channels. :math:`T_{d} = (1, 1, ..., 1)^\top` is a column vector of dimension :math:`M`. Plugging in equation :eq:`estimate_constant` in :eq:`estimate_data`, we get
Copy file name to clipboardExpand all lines: doc/_includes/inverse.rst
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ this by writing :math:`R' = R/ \lambda^2 = R \lambda^{-2}`, which yields the
70
70
inverse operator
71
71
72
72
.. math::
73
-
:label: inv_m
73
+
:name: inv_m
74
74
75
75
M &= R' G^\top (G R' G^\top + C)^{-1} \\
76
76
&= R \lambda^{-2} G^\top (G R \lambda^{-2} G^\top + C)^{-1} \\
@@ -106,12 +106,12 @@ The MNE software employs data whitening so that a 'whitened' inverse operator
106
106
assumes the form
107
107
108
108
.. math:: \tilde{M} = M C^{^1/_2} = R \tilde{G}^\top (\tilde{G} R \tilde{G}^\top + \lambda^2 I)^{-1}\ ,
109
-
:label: inv_m_tilde
109
+
:name: inv_m_tilde
110
110
111
111
where
112
112
113
113
.. math:: \tilde{G} = C^{-^1/_2}G
114
-
:label: inv_g_tilde
114
+
:name: inv_g_tilde
115
115
116
116
is the spatially whitened gain matrix. We arrive at the whitened inverse
117
117
operator equation :eq:`inv_m_tilde` by making the substitution for
@@ -128,7 +128,7 @@ operator equation :eq:`inv_m_tilde` by making the substitution for
128
128
The expected current values are
129
129
130
130
.. math::
131
-
:label: inv_j_hat_t
131
+
:name: inv_j_hat_t
132
132
133
133
\hat{j}(t) &= Mx(t) \\
134
134
&= M C^{^1/_2} C^{-^1/_2} x(t) \\
@@ -137,7 +137,7 @@ The expected current values are
137
137
knowing :eq:`inv_m_tilde` and taking
138
138
139
139
.. math::
140
-
:label: inv_tilde_x_t
140
+
:name: inv_tilde_x_t
141
141
142
142
\tilde{x}(t) = C^{-^1/_2}x(t)
143
143
@@ -151,7 +151,7 @@ to raw data. To reflect the decrease of noise due to averaging, this matrix,
151
151
C_0 / L`.
152
152
153
153
.. note::
154
-
When EEG data are included, the gain matrix :math:`G` needs to be average referenced when computing the linear inverse operator :math:`M`. This is incorporated during creating the spatial whitening operator :math:`C^{-^1/_2}`, which includes any projectors on the data. EEG data average reference (using a projector) is mandatory for source modeling and is checked when calculating the inverse operator.
154
+
When EEG data are included, the gain matrix :math:`G` needs to be average referenced when computing the linear inverse operator :math:`M`. This is incorporated during creating the spatial whitening operator :math:`C^{-^1/_2}`, which includes any projectors on the data. EEG data average reference (using a projector) is mandatory for source modeling and is checked when calculating the inverse operator.
155
155
156
156
As shown above, regularization of the inverse solution is equivalent to a
157
157
change in the variance of the current amplitudes in the Bayesian *a priori*
@@ -224,7 +224,7 @@ computational convenience we prefer to take another route, which employs the
224
224
singular-value decomposition (SVD) of the matrix
225
225
226
226
.. math::
227
-
:label: inv_a
227
+
:name: inv_a
228
228
229
229
A &= \tilde{G} R^{^1/_2} \\
230
230
&= U \Lambda V^\top
@@ -238,7 +238,7 @@ Combining the SVD from :eq:`inv_a` with the inverse equation :eq:`inv_m` it is
238
238
easy to show that
239
239
240
240
.. math::
241
-
:label: inv_m_tilde_svd
241
+
:name: inv_m_tilde_svd
242
242
243
243
\tilde{M} &= R \tilde{G}^\top (\tilde{G} R \tilde{G}^\top + \lambda^2 I)^{-1} \\
244
244
&= R^{^1/_2} A^\top (A A^\top + \lambda^2 I)^{-1} \\
@@ -253,23 +253,23 @@ where the elements of the diagonal matrix :math:`\Gamma` are simply
0 commit comments