|
40 | 40 |
|
41 | 41 | # %% |
42 | 42 | # Load and prepare the data |
43 | | -# ------------------------------- |
| 43 | +# -------------------------- |
44 | 44 |
|
45 | 45 | # The data were collected with an Elekta Neuromag VectorView system |
46 | 46 | # at 1000 Hz and low-pass filtered at 330 Hz. |
|
60 | 60 |
|
61 | 61 | # %% |
62 | 62 | # Epoch the data and plot evokeds |
63 | | -# --------------- |
| 63 | +# -------------------------------- |
64 | 64 | # |
65 | 65 | # We epoch the data around dipole events and apply baseline correction. |
66 | 66 |
|
|
79 | 79 | # You can see that the burst envelope repeats at approximately 3 Hz. |
80 | 80 | # |
81 | 81 | # Determine peak activation using Global Field Power (GFP) |
82 | | -# -------------------------------------------------------- |
| 82 | +# --------------------------------------------------------- |
83 | 83 |
|
84 | 84 | # GFP is the standard deviation across sensors at each time |
85 | 85 | # point, providing a reference-independent measure of signal strength. |
|
124 | 124 |
|
125 | 125 | # %% |
126 | 126 | # Fit dipoles |
127 | | -# ----------- |
| 127 | +# ------------ |
128 | 128 |
|
129 | 129 | # We fit dipoles for each phantom and store them in a list. |
130 | 130 | dip_all, residuals_all = [], [] |
|
149 | 149 | # We can see that GOF varies between 50 % and up to 95 %. |
150 | 150 | # |
151 | 151 | # Compare estimated and true dipoles |
152 | | -# -------------------------------- |
| 152 | +# ----------------------------------- |
153 | 153 |
|
154 | 154 | actual_pos, actual_ori = mne.dipole.get_phantom_dipoles() |
155 | 155 | actual_amp = 200.0 # nAm |
|
190 | 190 | # achieving sub-centimeter accuracy (mean position error 2.7mm). |
191 | 191 | # |
192 | 192 | # Visualise estimated and true dipoles |
193 | | -# ----------------------- |
| 193 | +# ------------------------------------- |
194 | 194 |
|
195 | 195 | actual_amp = np.ones(len(dip)) # fake amp, needed to create Dipole instance |
196 | 196 | actual_gof = np.ones(len(dip)) # fake goodness-of-fit (GOF) |
|
0 commit comments