mne-tools/mne-python — pull request #581 by rgoj (2013-04-28 14:43:21+00:00)
Title: WIP/ENH Picking normal orientation in beamformer solutions - issue #571

I'm trying to solve issue #571 - adding an option to return only the normal component of a beamformer solution. The code in the commit does the job, I think... but I'm not sure, could you check if the _pick_normal function seems good? Is there a better way to achieve choosing only the normal orientation?

Assuming that the code makes sense there are still a few other issues I'd be concerned about:

* the code in minimum_norm/inverse.py uses the *pick_normal* parameter only in conjunction with loose orientations: https://github.com/mne-tools/mne-python/blob/master/mne/minimum_norm/inverse.py#L604 (as I understand it loose orientations bias the solution towards the normal component?); is this in any way an issue? (I guess not...?)

* the code before the changes (i.e. *pick_ori*=None) always returns only positive valued solutions ( *combine_xyz* calculates vector length), whereas the current code with *pick_ori*="normal" returns both positive and negative values (depending on direction of the solution vector); is the intention to return only the absolute value of the activation of each source? or is there something more I'm missing?

* I named the new orientation-related parameter *pick_ori* instead of *pick_normal* to accommodate the future addition of a PCA option; also I didn't name it *pick* as per discussion of issue #571 because that would've been easy to confuse with the *picks* parameter

* I haven't made sure yet that the code works in the case when the *label* parameter is specified, so I need to do that