<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi John,
<div class=""><br class="">
</div>
<div class="">Let’s consider the leadfield and spatial filter for a single dipole location. If these are not orientation constrained, these are matrices of dimensions Nchanx3, and 3xNchan respectively.</div>
<div class=""><br class="">
</div>
<div class="">Doing an svd on either of them (and then sticking to the first component only for computation of source level quantities) will yield different results (i.e. scenarios a) and b) are different). Doing it on the leadfield will result in the inverse
 algorithm assuming the dipole to have a fixed orientation (in a direction that maximizes the variance of the sensor level topographical distribution elicited by a dipole at the given location). This is different from performing an svd on the spatial filter,
 which is equivalent to performing an svd on filt*Cy*filt’ <b class="">IF</b> Cy is a (scaled) identity matrix. In other words, performing an svd on the spatial filter, and using the ’strongest’ component, extracts an orientation that is maximizing noise, under
 the assumption that the noise is spatially white.</div>
<div class=""><br class="">
</div>
<div class="">Indeed, the first orientation extracted from svd on filt*Cy*filt’ critically depends - as you point out - on what you put in as Cy. If you have different conditions, and do the orientation estimation per condition, then obviously the per condition
 orientation may end up being different, and this could result in suboptimal results (which could range from a reduction in sensitivity to the comparison of apples with oranges).</div>
<div class=""><br class="">
</div>
<div class="">If you are to compare source level data across conditions, under a assumed fixed orientation I would therefore recommend to estimate the orientation based on a covariance estimate of data combined across conditions, and subsequently use the resulting
 fixed orientation spatial filter on the per condition data as a starting point for the subsequent of the to-be-compared source level quantity of interest.</div>
<div class=""><br class="">
</div>
<div class="">I did not entirely understand your point about the data X and the cwt of these data, but in general, the svd is ambiguous with respect to the sign of the resulting orientations (u-vectors) so accidental polarity flips introduced this way result
 in flipping the sign of a correlation of 1 to -1, which is perhaps what you described.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""> </div>
<div class=""> </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 14 Oct 2020, at 15:49, RICHARDS, JOHN <<a href="mailto:RICHARDS@mailbox.sc.edu" class="">RICHARDS@mailbox.sc.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">Eelke<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">Thanks for your response. It’s a good answer and helps to elucidate my question, but part of the question remains. Your description of a) b) and c) were implicit in my question, so maybe this
 is the crux:<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">The 1) and 2) below are probably identical.  Doing this in the leadfield results in the 1 x nvoxel LF coefficients; then applying a filter (eLORETA, sLORETA) to the 1 x nv LF coefficients,
 is probably the same as first doing the filter and then the max orientation SVD (e.g., 2).<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">I guess the critical question is what 3) is doing?  What does it mean “the data covariance is projected through the filters”?<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">I have not tried 1) (leadfield step), but have done 2) and 3) and they give different results.  I presume this is because the orientation of the filters in 2) is not the same as the orientation
 of the filters modified by the data in 3).<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">Also, re your note below…   If I have X and Y datasets, and do 2), then the orientation of the projection will be the same for X and Y.  But doing 3), the projection is based on the data,<span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">e.g.    svd(filter) * data and svd(filter*covX*filter’)*data give different results; so that the orientation of svd(filter*covX*filter’) is a different orientation than svd(filter*covY*filter). 
 I worry that the difference in orientation between the two datasets might confound experimental conditions effect differences in X and Y. Are the “data sources” different, or is it just a chance occurrence due to the orientation differences.<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">One reason this came up is that we have two related sets of data, like X and transform(X), where the transform is a cwt operation. It turns out that<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">Correlation (X and transformX in the channel*time) = 1<br class="">
svd(filter)*X and svd(filter)*transform(x) also result in an identity matrix across nvoxels; (correlation over time, for each nvoxel)<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">But  svd(filter*covX*filter’)*X, and svd(filter*CovY*filter’)*Y, show weird patterns of correlations—some nvoxels are 1, some nvoxeks are -1, and then some are in the middle range; or they
 are strong positive but not 1 (like .8 to 1). <span class="Apple-converted-space"> </span><o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">The use of the cov in the svd definitely changes the results<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">This might not make a difference in the pattern of responses, but the orientation of some of the analyses flips from 1 to -1, and the intermediate correlations mean that the results from the
 svd(filter*COV*filter’) is changing the results.<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">John<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">Hi John,<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">I'm not sure the following is a full answer to your questions, but<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">it's definitely relevant to both of them. As you say, there are by<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">default 3 dipole orientations along which activity is considered. We<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">can combine these three into one (using SVD or similar) at (at least)<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">three possible levels:<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">(a) the level of the leadfield;<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">(b) the level of the filters;<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">(c) the level of the source-reconstructed data.<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">What you are suggesting in question 2 is approach b. Your phrasing<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">("the leadfield step") suggests that your proposal would be approach<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">a, but unless I'm misunderstanding you really are proposing approach<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">b.<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">What by default is implemented in FieldTrip (cfg.projectmom = 'yes')<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">is approach c. This I think answers your question 1: the data<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">covariance is projected through the filters in order to determine the<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">maximum orientation of the source-reconstructed data.<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">Also of relevance: you can use the non-downprojected (3xN) filters, as<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">computed based on some data X, and apply them to some data Y, and only<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">downproject after that. This might result in a different orientation<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">being the "maximal" one, as the maximum (in approach c) depends not<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">only on the filters (and hence the leadfield), but also on the data.<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">Hope that helps.<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">Best,<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: "Courier New";" class="">Eelke<o:p class=""></o:p></span></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Consolas;" class="">***********************************************<br class="">
John E. Richards<br class="">
Carolina Distinguished Professor<br class="">
Department of Psychology<br class="">
University of South Carolina<br class="">
Columbia, SC  29208<br class="">
Dept Phone: 803 777 2079<br class="">
Fax: 803 777 9558<br class="">
Email: </span><a href="mailto:richards-john@sc.edu" class=""><span style="font-size: 10pt; font-family: Consolas; color: rgb(5, 99, 193);" class="">richards-john@sc.edu</span></a><u class=""><span style="font-size: 10pt; font-family: Consolas; color: blue;" class=""><br class="">
</span></u><span style="font-size: 10pt; font-family: Consolas;" class=""><a href="https://jerlab.sc.edu/" class="">https://jerlab.sc.edu</a><br class="">
*************************************************<br class="">
<br class="">
</span><o:p class=""></o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fieldtrip
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://doi.org/10.1371/journal.pcbi.1002202</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>