>Size of the ''imaging kernel'': [Nvertices x Nchannels]. * '''Loose''': This option is available only when working with "surface" grid locations (such as the cortical surface). In addition to a dipole normal to cortex as above, two additional dipoles are adeed in the tangential plane at each cortical location. Their amplitude is constrained below a fraction of the main normal dipole's. [[https://pubmed.ncbi.nlm.nih.gov/22438263/|The recommended values]] are between 0.1 and 0.6. This option relaxes the constraint of strict orientation to the cortex to account for anatomical and physiological uncertainties.<

>Size of the imaging kernel: [3*Nvertices x Nchannels]. * '''Unconstrained''': This option is available for both "surface" and "volume" source grids. There are 3 orthogonal dipoles at each grid location along the x, y, and z ("Cartesian") directions of the coordinate system. <

>Size of the imaging kernel: [3*Nvertices x Nchannels]. * '''__Recommended option__''': The fully constrained option require only one dipole per source grid location, instead of three. Therefore, the source and kernel files are smaller, faster to compute and display. However, when using MRI templates instead of individual anatomy, loose/unconstrained orientation models may account for some of the model uncertainties (see [[http://neuroimage.usc.edu/brainstorm/Tutorials/SourceEstimation#Why_does_it_look_so_noisy.3F|Why does it looks so noisy]]). === Sensors === <)>> {{attachment:minnorm_options_sensors.gif}} <)>> Brainstorm automatically detects the type of sensors (mEg, EEG, etc.) available from the head model selected for source imaging. In the example above, only MEG sensors are available. Select one or all the sensor types available you are interested in. However, cross-modality calculations -- the fusion between MEG and EEG data to yield a joint source map -- are very sensitive to covariance calculations and head model approximations. As of Spring of 2018, we have also elected to NOT account for cross-covariances between different sensor types. If you wish to obtain a joint, multimodal source model, we recommend that you compute each source map separately and then combine them visually or quantitatively. == Source mapping of trial averages == We describe here a basic example of how to use Brainstorm to obtain a MN imaging maps of event-related average sensor data. * In Run#01, right-click on the average response for the '''deviant''' stim > '''Compute sources [2018]'''.<

>Select the options: '''Minimum norm''' imaging, '''Current density''' map, '''Constrained''': Normal to cortex. <

><

> {{attachment:minnorm_single.gif||height="433",width="529"}} (The other "Compute sources" menu is for legacy options and implementations of the same imaging options.) * The outcome of this process is a new dependent file of the sensor data, indicated with a brain icon. The file label (aka "comment") indicates "MN", which stands for "minimum-norm", and "Constr", which stands for "Constrained: normal orientation". <

><

> {{attachment:minnorm_single_tree.gif}} == Display source maps on cortex == * Right-click on this new source file with the brain icon and select > Cortical activations > '''Display on cortex'''.<

><

> {{attachment:minnorm_single_popup.gif||height="167",width="380"}} * Double-click on the '''recordings '''for the deviant average to display the sensor time series alongside their brain source maps. <

>In the filter tab, add a '''low-pass filter at 40Hz '''to smooth the time series a bit.<

><

> {{attachment:display_cortex.gif||height="163",width="482"}} * Note how the display of the sensor and brain map windows are sync'd in time (click anywhere in the white portion of the time series window or use the left/right keyboard arrows to change the time stamp). You can also use all the menus and shortcuts introduced in the anatomy tutorial to use pre-set displays (0-6 keys). * Edit the display properties of the brain map in the '''Surface '''tab: * '''Amplitude''': applies a minimum threshold to the source amplitude values displayed. The threshold is defined as a percentage ratio of the maximum amplitude value of the currrent color scale. * '''Min size''': removes the smaller clusters in the source map, which number of source is smaller than the "min size" value entered. * '''Transparency''': changes the opacity of the source map on the cortex surface. Note that these parameters only adjust the visualization of source maps. They do not have effect on the actual source time series. A few more words about the '''amplitude threshold '''parameter: * The maximum of the current colorbar depends on the ''Sources ''colormap parameters. If "Maximum: Global" is selected, the maximum indicated should be around 150 pA.m in the present dataset. This value represents the maximum of the source map across the entire dataset (across space and time). You can change the colorbar maximum value with the colormap option "Maximum: Custom". * On the screen capture below, the threshold value is set to 20%: only sources with amplitudes greater than 0.20*150 = 30 pA.m are shown. <

>The threshold value is shown in the colorbar with a horizontal white line. * In the current data example, the source map should indicate strong activations around the primary auditory cortex around 91ms, bilaterally. <

><

> {{attachment:display_sliders.gif||height="215",width="509"}} == Recommended post-processing steps == The original source maps may look noisy or patchy. This is due to the strict orientation constraint used in the brain mapping procedure, which emphasizes the sensitivity of brain current strengths to the curvature of the cortex (this effect is more pronounced with MEG than EEG). Please be cautious not to interpret disconnected colored patches as distinct brain activations without further post processing. The absolute spatial resolution of MEG source mapping is limited (~5-10mm, worse in EEG), although its relative resolution between experimental conditions, hence with post processing, can be much finer (1mm or less, see for instance [[https://pubmed.ncbi.nlm.nih.gov/27743901/|this retinotopy study]]). For now, you may generate smoother versions of the source maps by applying a spatial smoothing process (process "'''Sources > Spatial smoothing'''"), or using '''unconstrained source models''', or standardizing source amplitude by applying a z-score transformation with respect to a time period of reference. Brain maps obtained with dSPM or sLORETA are also standardize, more immune to orientation confounds (see later in this Section). == Display source maps in the MRI volume == * Right-click on the source file (brain icon) for the deviant average > Cortical activations > '''Display on MRI (MRI Viewer)'''. * See Brainstorm's MRI Viewer detailed tutorial in Sections [[Tutorials/ImportAnatomy|#2]] and [[Tutorials/ExploreAnatomy|#3]]. <

> * This display shows cortical source activity interpolated in the the MRI volume. Set the amplitude threshold to 0% to visualize the cortex ribbon used onto which source activity is mapped. <

><

> {{attachment:display_mriviewer.gif||height="356",width="330"}} * Visualization parameters: * '''MIP Anatomy''': check this box to obtain a "glass brain" view of the structural MRI, across all three spatial dimensions. MIP stands for "Maximum Intensity Projection" * '''MIP Functional''': to obtain a glass brain view of the source map. * '''Smooth level''': to smooth the source map further, for visualization purposes. Right-click on the figure to define the size of the smoothing kernel (in number of MRI slices). * '''Amplitude threshold''': in the Surface tab of the main Brainstorm window, to apply a threshold on the source map, as explained for the 3-D cortex view above. * '''Current time''': shows the current time stamp in the data recordings, at the top-right of the main Brainstorm window. You also use the right/left arrows to move in time, or click anywhere in the white area of the sensor time series window. * {{attachment:display_smooth.gif||height="356",width="363"}} == Display source maps on MRI slices in 3-D == * Right-click on the source file (brain icon) for the deviant average > Cortical activations > '''Display on MRI (3D)'''. * We detailed this feature in the previous tutorial sections about MRI and surface visualization.<

>Keep right mouse button pressed and move the mouse to change the MR slices displayed. You can also use the Resect panel of the Surface tab. <

><

> {{attachment:display_mri3d.gif||height="203",width="405"}} == A note about the sign of source amplitudes == Source brain maps consist of time series that are complex curves of positive and negative values. You can visualize how the sign of source amplitudes is distributed across the cortex using the cortical display of sources: set the amplitude threshold to 0%, then make sure the colormap shows relative (i.e., both positive and negative) values. For this, right click over the colorbar Colormap: Sources > uncheck the "Absolute values" option. At any time, you can double-click on the colorbar to reset the colormap options to default values. As shown below, a typical brain map will show ''stripes ''of positive and negative values, with sign changes around sulcal locations. This is another manifestation of the limited absolute spatial resolution of MEG/EEG source mapping. Sources of opposite sides of sulcus are oriented in opposite directions by default. Source mapping shows they have oppositive signs meaning that the respective neural currents are estimated as flowing in the same direction. We will see later how this sign ambiguity can be managed via either the processing of rectified source time series (if you wish to map source amplitude effects only). It is crucial to preserve the sign though if you are in interested in frequency specific brain activity, such for spectral, time-frequency and connectivity analyses. . {{attachment:display_negative.gif||height="173",width="452"}} '''More on sign ambiguity: '''On opposite walls of a sulcus, brain source are very close to each other, with opposite orientations. If the true brain activity sits only on one side of a sulcus as shown below with a green arrow, the MN-imaging brain map lower spatial resolution will spread the estimated currents over multiple nearby locations, shown with the red and blue arrows below, which have opposite default directions that are imposed by anatomy (dipoles pointing outwards the cortical surface). The signs of the current flows will be opposite, with positive values (red arrows) on one side of the sulcus and negative values on the other side (blue arrows). . {{attachment:minnorm_sketch.gif||height="155",width="467"}} For visualization purposes, we are mostly interested at this stage in visualizing the magnitude of brain activity, hence the default colormap option "'''absolute values'''" being selected. == Unconstrained orientations == In cases where the orientation constraint imposed on the dipole orientations produces implausible results, it is possible to relax it partially (option "loose constraints") or completely (option "unconstrained"). This produces a vector (3 component) current source at each location which can complicate interpretation, but avoids some of the noisy and discontinuous features in the current map that are often seen in the constrained maps. Unconstrained solutions are particularly appropriate when using the MNI template instead of the subject's anatomy, or when studying deeper or non-cortical brain regions for which the normal to the cortical surface obtained with FreeSurfer or BrainSuite is unlikely to match any physiological reality. In terms of data representation, the option "unconstrained" and "loose constraints" are very similar. Instead of using one dipole at each cortical location, a base of three orthogonal dipoles is used. Here we will only illustrate the fully unconstrained case. * In Run#01, right-click on the average response for the '''deviant''' stim > '''Compute sources [2018]'''.<

>Select the options: '''Minimum norm''' imaging, '''Current density''' map, '''Unconstrained'''. * Double-click on the new source file for the deviant average, open the time series simultaneously. The two brain maps below represent the same file at 91ms, with different colormap options (absolute values on the left, relative values on the right). Explanations below. <

><

> {{attachment:minnorm_unconstr_all.gif||height="413",width="652"}} * We have to be careful with the visual comparisons of constrained and unconstrained source maps displayed on the cortex surface, because they are very different types of data. In unconstrained source maps, we have '''three dipoles with orthogonal orientations at each cortex location''', therefore we cannot represent all the information at once. To display them as an activity map, Brainstorm computes the '''norm of the vectorial sum of the three orientations at each vertex'''. <

>S = sqrt(Sx^2^ + Sy^2^ + Sz^2^) <

><

> {{attachment:minnorm_unconstr_sketch.gif||height="158",width="476"}} * This explains that we only observe '''positive values''' (no blue values when the colormap is set to display positive and negative values): the norm displayed at each vertex is always positive. The underlying values along each orientation (x,y,z) can be positive or negative and oscillate around zero in time, but we cannot get access to this information with these static cortical maps. * The maps we observe here look a lot '''smoother''' than the constrained sources we computed earlier. This can be explained by the fact that there is no sharp discontinuity in the forward model between two adjacent points of the grid for a vector dipole represented in Cartesian coordinates while the normal to the surface for two nearby points can be very different, resulting in rapidly changing forward models for the constrained case. * '''Delete''' the unconstrained file, we will not explore this option in the introduction tutorials. You can refer to the tutorial [[http://neuroimage.usc.edu/brainstorm/Tutorials/Epilepsy|EEG and epilepsy]] for an example of analysis using unconstrained sources. == Source map normalization == The current density values returned by the minimum norm method have a few problems: * They depend a lot on the SNR of the signal, which may vary significantly between subjects. Their amplitude is therefore difficult to interpret directly. * The values tend to be higher at the surface of the brain (close to the sensors). * The maps are sometimes patchy and difficult to read. Normalizing the current density maps with respect to a reference level (estimated from noise recordings, pre-stimulus baseline or resting state recordings) can help with all these issues at the same time. In the case of dSPM and sLORETA, the normalizations are computed as part of the inverse routine and based on noise and data covariances, respectively. While dSPM does produce a Z-score map, we also provide an explicit Z-score normalization that offers the user more flexibility in defining a baseline period over which Brainstorm computes the standard deviation for normalization. The normalization options do not change the temporal dynamics of your results when considering a single location but they do alter the relative scaling of each point in the min norm map. If you look at the time series associated with one given source, it will be exactly the same for all normalizations, except for a scaling factor. Only the relative weights change between the sources, and these weights do not change over time. ==== dSPM, sLORETA ==== * In Run#01, right-click on the average recordings for the '''deviant''' stim > '''Compute sources [2018]'''.<

>Select successively the two normalization options: dSPM, sLORETA, ('''constrained''').<

><

> {{attachment:minnorm_normfiles.gif}} * Double-click on all of them to compare them (screen capture at '''143ms'''): <

><

> {{attachment:minnorm_normalized.gif||height="156",width="628"}} * '''Current density maps''': Tends to highlight the top of the gyri and the superficial sources. * '''dSPM''': Tends to correct this behavior and may give higher values in deeper areas. The values obtained are unitless and similar to Z-scores, therefore they are easier to interpret. They are by default not scaled with the number of averages. To obtain correctly scaled dSPM values, one has to call the process "Sources > '''Scale averaged dSPM'''", as explained in the advanced section [[https://neuroimage.usc.edu/brainstorm/Tutorials/SourceEstimation#Averaging_normalized_values|Averaging normalized values]]. * '''sLORETA''': Produces smoother maps where all the potentially activated area of the brain (given to the low spatial resolution of the source localization with MEG/EEG) is shown as connected, regardless of the depth of the sources. The maps are unitless, but unlike dSPM cannot be interpreted as Z-scores so are more difficult to interpret. ==== Z-score ==== * The '''Z-transformation''' converts the current density values to a score that represents the number of standard deviations with respect to a baseline period. We define a baseline period in our file (in this case, the pre-stimulus baseline) and compute the average and standard deviation for this segment. Then for every time point we subtract the baseline average and divide by the baseline standard deviation. '''Z = (Data - <>) / <>''' * This measure tells how much a value deviates from the baseline average, in number of times the standard deviation. This is done independently for each source location, so the sources with a low variability during baseline will be more salient in the cortical maps post-stimulus. * In Process1: Select the constrained current density maps (file ''MN: MEG(Constr)''). * Run process "'''Standardize > Baseline normalization'''", '''[-100,-1.7]ms''', '''Z-score transformation''' <

>Do not select "Use absolute values": We want the sign of the current values.<

><

> {{attachment:zscore_process.gif||height="530",width="558"}} * Double-click on the new normalized file to display it on the cortex (file with the "| zscore" tag). <

><

> {{attachment:zscore_cortex.gif||height="153",width="657"}} * You can see that the cortical maps obtained in this way are '''very similar''' to the other normalization approaches, especially with the dSPM maps. * A value of 3 in this figure means: at this vertex, the value is 3 times higher than the standard deviation from zero during the baseline. If the values during the baseline follow a normal distribution '''N(<>,<2)>>)''', then the values we computed follow a N(0,1)='''Z distribution'''. We can get a level of significance from this well known distribution, for instance a value Z=1.96 corresponds to a p-value of 0.05. These questions will be discussed in more details in the statistics tutorial. * The Z-normalized source maps are '''not impacted by the''' '''visualization filters'''. If you open simultaneously the time series and all the files you have now (MN, dSPM, sLORETA, Z-score) and modify the options in the Filter tab, all the figures are updated except for the Z-score one. We can filter easily all the linear models (MN, dSPM, sLORETA), but we would lose the interesting properties of the Z-values if we were filtering them (the values would not follow a Z-distribution anymore). * If the baseline and the active state are not in the same file, you can use the '''Process2 tab''': place the baseline in the left list (Files A) and the file to normalize in the right list (Files B). ==== Typical recommendations ==== * Use non-normalized '''current density maps''' for: * Computing shared kernels applied to single trials. * Averaging files across MEG runs. * Computing time-frequency decompositions or connectivity measures on the single trials. * Use '''normalized maps''' (dSPM, sLORETA, Z-score) for: * Estimating the sources for an average response. * Exploring visually the average response (ERP/ERF) at the source level. * Normalizing the subject averages before a group analysis. * Avoid averaging normalized maps (or computing any additional statistics) * Recommended normalization approach: * It is difficult to declare that one normalization technique is better than another. They have different advantages and may be used in different cases. Ideally, they should all converge to similar observations and inferences. If you obtain results with one method that you cannot reproduce with the others, you should question your findings. * dSPM and sLORETA are linear measures and can expressed as imaging kernels, therefore they are easier to manipulate in Brainstorm. sLORETA maps can be smoother but they are difficult to interpret. dSPMs, as z-score maps, are much easier to understand and interpret. * Z-normalized current density maps are also easy to interpret. They represent explicitly a "deviation from experimental baseline" as defined by the user. In contrast, dSPM indicates the deviation from the data that was used to define the noise covariance used in computing the min norm map. == Delete your experiments == * Select all the source files you computed until now and '''delete''' them. <

><

> {{attachment:delete_norm.gif||height="172",width="474"}} == Computing sources for single trials == Because the minimum norm model is linear, we can compute an inverse model independently from the recordings and apply it on the recordings when needed. We will now illustrate how to compute a shared inverse model for all the imported epochs. * Right-click on the '''head model''' or the '''folder '''for Run#01 > '''Compute sources [2018]'''.<

>Select: '''Minimum norm''' imaging, '''Current density''' map, '''Constrained''': Normal to cortex<

><

> {{attachment:minnorm_shared_popup.gif||height="273",width="500"}} * Because we did not request to compute an inverse model for a specific block of recordings, it computed a '''shared inverse model'''. If you right-click on this new file, you get a warning message: "Inversion kernel". It does not contain any source map, but only the inverse operator that will allow us to convert the recordings into source maps.<

><

> {{attachment:minnorm_shared_kernel.gif}} * The database explorer now shows one '''source link''' to this inverse model for each block of recordings available in this folder, single trials and averages. These links are not real files saved on the hard drive, but you can use them exactly like the previous source files we calculated for the deviant average. If you load a link, Brainstorm loads the corresponding MEG recordings, loads the inverse kernel and multiplies the two on the fly before displaying it. This optimized approach saves a lot of computation time and lot of space on the hard drive.<

><

> {{attachment:minnorm_links.gif||height="176",width="513"}} == Averaging in source space == ==== Computing the average ==== * First compute the same source model for the the second acquisition run.<

>In Run#02, right-click on the '''head model''' or the '''folder '''> '''Compute sources [2018]'''.<

>Select: '''Minimum norm''' imaging, '''Current density''' map, '''Constrained''': Normal to cortex<

><

> {{attachment:minnorm_run02.gif||height="242",width="245"}} * Now we have the source maps available for all the recordings, we can '''average them in source space''' across runs. This allows us to average MEG recordings that were recorded with different head positions (in this case Run#01 and Run#02 have different channel files so they could potentially have different head positions preventing the direct averaging at the sensor level). * Thanks to the linearity of the minimum norm model: MN(Average(trials)) = Average(MN(trials))<

>The two following approaches are equivalent: 1. Averaging the sources of all the individual trials across runs, 1. Averaging the sources for the sensor averages that we already computed for each run. * We will use the second option: using the sources for the sensor-level averages. It is a lot faster because it needs to read 4 files (one average file per run and per condition) instead of 456 files (total number of good trials in the two runs). * Drag and drop to the Process1 tab the average recordings for '''Run01 '''and '''Run02''', then press the ['''Process sources'''] button on the left to select the source files instead of the MEG recordings. * Run process "'''Average > Average files'''": <

>Select "'''By trial group (subject average)'''" to average together files with similar names. <

>Select "'''Arithmetic average'''" function. <

>Check "'''Weighted average'''" to account for the different numbers of trials in both runs.<

><

> {{attachment:average_process.gif||height="565",width="526"}} * The two averages that are produced (one for each condition) are saved in the folder '''Intra-subject'''. This is where all the files computed using information from multiple folders within the same subject are saved. If you prefer to have them somewhere else, you can create new folders and move them there, just like you would do with a regular file explorer. <

><

> {{attachment:average_files.gif||height="159",width="268"}} * The file comments say "2 files" because they were computed from two averages each (one from each run), but the number of corresponding trials is correctly updated in the file structure. <

>Right-click on each of them > File > View file contents, and check the '''Leff''' field: <

>78 trials for the deviant condition, 378 trials for the standard condition. * Double-click on the source averages to display them (deviant=top, standard=bottom). <

>Open the sensor-level averages as a time reference. <

>Use the predefined view "Left, Right" for looking at the two sides at the same time (shortcut: "7").<

><

> {{attachment:average_display_mn.gif||height="296",width="530"}} ==== Visualization filters ==== * Note that opening the source maps can be very long because of the filters for visualization. Check in the '''Filter''' '''tab''', you may have a''' '''filter applied with the option "'''Filter all results'''" selected. In the case of averaged source maps, the 15,000 source signals are filtered on the fly when you load a source file. This filtering of the full source files can take a significant amount of time, consider unchecking this option if the display is too slow on your computer. <

><

> {{attachment:filter_sources.gif||height="163",width="207"}} * It was not a problem until now because the source files were saved in the compact form (Kernel*recordings) and the visualization filters were applied on the recordings, then projected to the source space. This fast option is not available anymore with these averages across runs. * The visualization filters will not be available anymore after we apply a Z-score normalization. If we want to display Z-score source maps that are smoothed in time, we will have to apply explicitly the filters on the file, with the Process1 tab. ==== Low-pass filter ==== * Clear the Process1 list, then drag and drop the new averages in it. * Run process "'''Pre-process > Band-pass filter'''": [0,40] Hz<

><

> {{attachment:average_filter.gif||height="338",width="476"}} * '''Epochs are too short''': Look at the filter response, the expected transient duration is at least 78ms. The first and last 78ms of the average should be discarded after filtering. However, doing this would get rid of almost all the 100ms baseline, which we need for normalization. As mentioned [[http://neuroimage.usc.edu/brainstorm/Tutorials/Epoching#Epoch_length|here]], we should have been importing longer epochs in order to filter and normalize the averages properly. <

><

> {{attachment:average_filter2.gif||height="323",width="378"}} ==== Z-score normalization ==== * In Process1, select the two filtered averages. * Run process "'''Standardize > Baseline normalization'''", baseline='''[-100,-1.7]ms, ''''''Z-score.'''<

><

> {{attachment:average_zscore.gif||height="292",width="539"}} * Four new files are accessible in the database: two filtered and two filtered+normalized. <

><

> {{attachment:average_zscore_files.gif||height="205",width="341"}} * Double-click on the source averages to display them (deviant=top, standard=bottom).<

><

> {{attachment:average_display_zscore.gif||height="295",width="530"}} * The Z-score source values at 90ms are higher for the standard condition (~25) than for the deviant condition (~15). We observe this because the two conditions have very different signal-to-noise ratios. The standard condition has about 5x more trials, therefore the standard deviation over the baseline is a lot lower, leading to higher Z-score. * '''Delete''' the non-normalized filtered files, we will not use them in the following tutorials. <

><

> {{attachment:average_zscore_files2.gif||height="147",width="294"}} == Note for beginners == Everything below is advanced documentation, you can skip it for now. <

><

> {{attachment:dspm_scale.gif||height="307",width="547"}} '''Z-score''' * The same SNR issues arise while averaging Z-scores: the average of the Z-scores is lower than the Z-score of the average. * When computing averages at the subject level: Always '''avoid averaging Z-score maps'''. <

>Average the current density maps, then normalize. '''sLORETA''' * This normalization is not based on the SNR of signal, but rather on the spatial smoothness of the maps. Managing these maps is similar to min-norm maps: the variance of the individual maps is not explicitly modeled or known analytically. * As in other cases, sLORETA(Average(trials)) = Average(sLORETA(trials)), and this relationship is guaranteed to hold with averaging uneven number of samples when using the option "Weighted average". <

><

> {{attachment:contact_options.gif||height="209",width="128"}} {{attachment:contact_image.gif||height="249",width="405"}} * '''Movies''': Right-click on any figure > Snapshot > '''Movie (time): All figures'''<

><

> {{attachment:video_options.gif||height="263",width="126"}} [[http://neuroimage.usc.edu/wikidocs/average_sources_unconstr.avi|{{attachment:video_vlc.gif|http://neuroimage.usc.edu/wikidocs/average_sources_unconstr.avi|height="262",width="409"}}]] <

>MEG_simulated [Nmeg x Ntime] = Forward_model [Nmeg x Nsources] * MN_sources [Nsources x Ntime]<

>Then you can compare visually the original MEG recordings with the simulated ones. More formally, you can compute an error measure from the residuals (recordings - simulated). To simulate MEG recordings from a minimum norm source model, right-click on the source file, then select the menu "'''Model evaluation > Simulate recordings'''". . {{attachment:model_popup.gif||height="151",width="597"}} Open side-by-side the original and simulated MEG recordings for the same condition: . {{attachment:model_results.gif||height="218",width="332"}} <

>Click on the button ['''Show details'''] to bring up all the advanced minimum norm options. <)>> {{attachment:minnorm_details.gif||height="392",width="390"}} <)>> === Depth weighting === Briefly, the use of various depth weightings was far more debated in the 1990s, before the introduction of MNE normalization via dSPM, sLORETA, and other "z-scoring" methods, which mostly cancel the effects of depth weighting (put another way, after normalization min norm results tend to look quite similar whether depth weighting is used or not). By modifying the source covariance model at each point in the source grid, deeper sources are "boosted" to increase their signal strength relative to the shallower dipoles; otherwise, the resulting MNE current density maps are too dominated by the shallower sources. If using dSPM or sLORETA, little difference in using depth weighting should be noted. To understand how to set these parameters, please refer to the [[https://mne.tools/mne-c-manual/MNE-manual-2.7.3.pdf|MNE manual]]. (options --depth, --weightexp and --weightlimit). === Noise covariance regularization [TODO] === MNE and dipole modeling are best done with an accurate model of the noise covariance, which is generally computed from experimental data. As such, these estimates are themselves prone to errors that arise from relatively too few data points, weak sensors, and strange data dependencies that can cause the eigenspectrum of the covariance matrix to be illconditioned (i.e. a large eigenvalue spread or matrix condition number). In Brainstorm, we provide several means to "stabilize" or "regularize" the noise covariance matrix, so that source estimation calculations are more robust to small errors. * '''Regularize noise covariance''': The L2 matrix norm is defined as the largest eigenvalue of its eigenspectrum. This option adds to the covariance matrix a diagonal matrix whos entries are a fraction of the matrix norm. The default is 0.1, such that covariance matrix is stabilized by adding to it an identity matrix that is scaled to 10% of the largest eigenvalue. * '''Median eigenvalue''': The eigenspectrum of MEG data can often span many decades, due to highly colored spatial noise, but this broad spectrum is generally confined to the first several modes only. Thus the L2 norm is many times greater than the majority of the eigenvalues, and it is difficult to prescribe a conventional regularization parameter. Instability in the inverse is dominated by defects found in the smallest eigenvalues. This approach stabilizes the eigenspectrum by replicating the median (middle) eigenvalue for the remainder of the small eigenvalues. * '''Diagonal noise covariance''': Deficiencies in the eigenspectrum often arise from numerical inter-dependencies found among the channels, particularly in covariance matrices computed from relatively short sequences of data. One common method of stabilization is to simply take the diagonal of the covariance matrix and zero-out the cross-covariances. Each channel is therefore modeled as independent of the other channels. The eigenspectrum is now simply the (sorted) diagonal values. * '''No covariance regularization''': We simply use the noise covariance matrix as computed or provided by the user. * '''Automatic shrinkage''': Stabilization method of Ledoit and Wolf (2004), still under testing in the Brainstorm environment. Basically tries to estimate a good tradeoff between no regularization and diagonal regularization, using a "shrinkage" factor. See Brainstorm code "bst_inverse_linear_2018.m" for notes and details. * '''Recommended option''': This author (Mosher) votes for the '''median eigenvalue '''as being generally effective. The other options are useful for comparing with other software packages that generally employ similar regularization methods. '''[TODO]''' === Regularization parameter [TODO] === In minimum norm estimates, as mentioned above in the comparisons among methods, the data covariance matrix is essentially synthesized by adding the noise covariance matrix to a modeled signal covariance matrix. The signal covariance matrix is generated by passing the source prior through the forward model. The source prior is in turn prescribed by the source model orientation and the depth weighting. A final regularization parameter, however, determines how much weight the signal model should be given relative to the noise model, i.e. the "signal to noise ratio" (SNR). In Brainstorm, we follow the definition of SNR as first defined in the original MNE software of Hamalainen. The signal covariance matrix is "whitened" by the noise covariance matrix, such that the whitened eigenspectrum has elements in terms of SNR (power). We find the mean of this spectrum, then take the square root to yield the average SNR (amplitude). The default in MNE and in Brainstorm is "3", i.e. the average SNR (power) is 9. * '''Signal-to-noise ratio''': Use SNR of 3 as the classic recommendation, as discussed above. * '''RMS source amplitude''': An alternative definition of SNR, but still under test and may be dropped. '''[TODO]''' === Output mode === As mentioned above, these methods create a convenient linear imaging kernel that is "tall" in the number of elemental dipoles (one or three per grid point) and "wide" only in the number of sensors. At subsequent visualization time, we efficiently multiply the kernel with the data matrix to compute the min norm images. For some custom purposes, however, a user may find it convenient to pre-multiply the data matrix and generate the full source estimation matrix. This would only be recommended in small data sets, since the full results can become quite large. * '''Kernel only''': Saves only the linear inverse operator, a model that converts sensor values into source values. The size of this matrix is: number of sources (15000) x number of MEG sensors (274). The multiplication with the recordings is done on the fly by Brainstorm in a transparent way. For long recordings or numerous epochs, this form of compact storage helps saving a lot of disk space and computation time, and it speeds up significantly the display. Always select this option when possible. * '''Full results''': Saves in one big matrix the values of all the sources (15,000) for all the time samples (361). The size in memory of such a matrix is about 45Mb for 600ms of recordings. This is still reasonable, so you may use this option in this case. But if you need to process longer recordings, you may face "Out of memory" errors in Matlab, or fill your hard drive quickly. * Full results [15000x361] = Inverse kernel [15000x274] * Recordings [274x361] == Advanced options: LCMV beamformer == As mentioned in the introduction above, two other methods can be selected for source estimation, a beamformer and dipole modeling. In this section, we review the options for the beamformer. On top of the noise covariance matrix, you need to estimate a [[http://neuroimage.usc.edu/brainstorm/Tutorials/NoiseCovariance#Data_covariance|data covariance matrix]] in order to enable the option "LCMV beamformer" in the interface. Note that pre-whitening with the noise covariance matrix has not yet been implemented for the LCMV beamformer, and only the [[Tutorials/NoiseCovariance#Data_covariance|data covariance]] is used in the current version. The noise covariance has no impact on the LCMV beamformer results. However, if there is no noise covariance file available in the database, the "Compute sources" interface returns an error: to go around this limitation, you may select the "No noise modeling (identity matrix)" option in the contextual menu for the noise covariance. <)>> {{attachment:lcmv_options.gif||height="350",width="390"}} <)>> '''Measure''' The only option "Pseudo Neural Activity Index" (PNAI), is named after the definition of the Neural Activity Index (NAI). We have modified Van Veen’s definition to rely strictly on the data covariance, without need for a separate noise covariance matrix, but the basic premise is the same as in dSPM, sLORETA, and other normalizations. Viewing the resulting "map," in an identical manner to that with MNE, dSPM, and sLORETA described above, reveals possibly multiple sources as peaks in the map. The PNAI scores analogously to z-scoring. '''Dipole orientations''' We recommend you choose "'''unconstrained'''" and let the later [[Tutorials/TutDipScan|Dipole scanning]] process, which finds the best fitting dipole at each time point, optimize the orientation with respect to the data. '''Data covariance regularization''' Same definitions as in MNE, only applied to the data covariance matrix, rather than the noise covariance matrix. Our recommendation is to use '''median eigenvalue'''. == Advanced options: Dipole modeling == Dipole modeling fits a single dipole at each potential source location to produce a dipole scanning map. This map can be viewed as a indication of how well, and where, the dipole fits at each time point. However, we recommend using the subsequent best-dipole fitting routine ([[Tutorials/TutDipScan|dipole scanning]]) to determine the final location and orientation of the dipole (one per time point). Please note that '''this function does not fit multiple simultaneous dipoles'''. Although not widely recognized, dipole modeling and beamforming are more alike than they are different – when comparing the inverse operators required to compute the dipole scanning map (dipole modeling) and the beamformer output map (LCMV), we see that they differ only in that the former uses an inverse noise covariance matrix while the latter replaces this with the inverse of the data covariance. <)>> {{attachment:dipoles_options.gif||height="314",width="390"}} <)>> '''Measure''' This field is now missing, but the resulting imaging kernel file is directly analogous to the PNAI result from LCMV beamforming. The user can display this scanning measure just as with the LCMV case, where again the normalization and units are a form of z-scoring. '''Dipole orientations''' Use "unconstrained source" modeling and let the process "[[Tutorials/TutDipScan|dipole scanning]]" optimize the orientation of the dipole for every time instance. '''Noise covariance regularization''' Similarly, use "median eigenvalue". <)>> The tutorial "[[http://neuroimage.usc.edu/brainstorm/Tutorials/PhantomElekta#Dipole_source_estimation|MEG current phantom (Elekta)]]" demonstrates dipole modeling of 32 individual dipoles under realistic experimental noise conditions. <

>[[http://neuroimage.usc.edu/paperspdf/BailletMosherLeahy_IEEESPMAG_Nov2001.pdf|Electromagnetic brain mapping]], IEEE SP MAG 2001. * '''dSPM''': Dale AM, Liu AK, Fischl BR, Buckner RL, Belliveau JW, Lewine JD, Halgren E<

>[[http://www.ncbi.nlm.nih.gov/pubmed/10798392|Dynamic statistical parametric mapping: combining fMRI and MEG for high-resolution imaging of cortical activity]]. Neuron 2000 Apr, 26(1):55-67 * '''sLORETA''': Pascual-Marqui RD<

>[[http://www.ncbi.nlm.nih.gov/pubmed/12575463|Standardized low-resolution brain electromagnetic tomography (sLORETA): technical details]], Methods Find Exp Clin Pharmacol 2002, 24 Suppl D:5-12 * '''LCMV Beamformer''': <

>Jaiswal A, Nenonen J, Stenroos M, Gramfort A, Dalal SS, Westner BU, Litvak V, Mosher JC, Schoffelen JM, Witton C, Oostenveld R,<

>[[https://www.sciencedirect.com/science/article/pii/S1053811920302846|Comparison of beamformer implementations for MEG source localization]], <

>'''Neuroimage'''. 2020 Aug 1, 216: 116797 <

><

>Westner BU, Dalal SS, Gramfort A, Litvak V, Mosher JC, Oostenveld R, Schoffelen JM <

>[[https://www.sciencedirect.com/science/article/pii/S1053811921010612|A unified view on beamformers for M/EEG source reconstruction]]''','''<

>'''NeuroImage.''' 2022 Feb 1;246:118789 ==== Tutorials ==== * Tutorial: [[Tutorials/TutVolSource|Volume source estimation]] * Tutorial: [[Tutorials/DeepAtlas|Deep cerebral structures]] * Tutorial: [[Tutorials/TutDipScan|Computing and displaying dipoles]] * Tutorial: [[Tutorials/DipoleFitting|Dipole fitting with FieldTrip]] * Tutorial: [[Tutorials/TutBEst|Maximum Entropy on the Mean (MEM)]] ==== Forum discussions ==== * Forum: Minimum norm units (pA.m): [[http://neuroimage.usc.edu/forums/showthread.php?1246-Doubt-about-current-density-units-pA.m-or-pA-m2|http://neuroimage.usc.edu/forums/showthread.php?1246]] * Forum: Imaging resolution kernels: http://neuroimage.usc.edu/forums/showthread.php?1298 * Forum: Spatial smoothing: http://neuroimage.usc.edu/forums/showthread.php?1409 * Forum: Units for dSPM/sLORETA: [[http://neuroimage.usc.edu/forums/showthread.php?1535-Dipole-strength-units-for-dSPM-and-sLORETA|http://neuroimage.usc.edu/forums/showthread.php?1535]] * Forum: EEG reference: http://neuroimage.usc.edu/forums/showthread.php?1525#post6718 * Forum: Sign of the MNE values: [[http://neuroimage.usc.edu/forums/showthread.php?1649#post7014|http://neuroimage.usc.edu/forums/showthread.php?1649]] * Forum: Combine MEG+EEG: [[https://neuroimage.usc.edu/forums/t/combining-eeg-and-meg-for-source-analysis/1684/4|https://neuroimage.usc.edu/forums/t/1684]] * Forum: Combine mag+gradiometers: http://neuroimage.usc.edu/forums/showthread.php?1900 * Forum: Combine EEG+fMRI: http://neuroimage.usc.edu/forums/showthread.php?2679 * Forum: Residual ocular artifacts: http://neuroimage.usc.edu/forums/showthread.php?1272 * Forum: Dipole fitting: http://neuroimage.usc.edu/forums/showthread.php?2400 * Forum: Dipole scanning and goodness of fit: https://neuroimage.usc.edu/forums/t/33645 * Forum: Simulate recordings from sources: http://neuroimage.usc.edu/forums/showthread.php?2563 * Forum: Simulate recordings from simulated signals: [[https://neuroimage.usc.edu/forums/t/simulate-scalp-recording/2421/3|https://neuroimage.usc.edu/forums/t/2421]] * Forum: Pre-whitening: https://neuroimage.usc.edu/forums/t/10459 * Forum: LCMV beamformer and noise covariance: https://neuroimage.usc.edu/forums/t/30943 * Forum: Debugging weird sLORETA results: [[https://neuroimage.usc.edu/forums/t/dont-trust-the-source-power-spectrum-results/21265|https://neuroimage.usc.edu/forums/t/21265]] * Forum: Subset of sensors: https://neuroimage.usc.edu/forums/t/26496 <)>> <