-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MRG: Fix the computation of the orientation in (..)MxNE and gamma-map #4633
Changes from all commits
d12add4
2128c94
856c90e
dbee697
98e640e
3996ac2
2a8a81b
ec0803a
e62824c
41f20ea
944f80d
7fdb0d9
df739d6
cadca0c
98f6dbc
5d9df30
93df08c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
from mne.datasets.brainstorm import bst_phantom_elekta | ||
from mne.io import read_raw_fif | ||
|
||
from mayavi import mlab | ||
print(__doc__) | ||
|
||
############################################################################### | ||
|
@@ -137,3 +138,22 @@ | |
|
||
fig.tight_layout() | ||
plt.show() | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh okay. In any case, please make this a separate section with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok |
||
############################################################################### | ||
# Let's plot the positions and the orientations of the actual and the estimated | ||
# dipoles | ||
def plot_pos_ori(pos, ori, color=(0., 0., 0.)): | ||
mlab.points3d(pos[:, 0], pos[:, 1], pos[:, 2], scale_factor=0.005, | ||
color=color) | ||
mlab.quiver3d(pos[:, 0], pos[:, 1], pos[:, 2], | ||
ori[:, 0], ori[:, 1], ori[:, 2], | ||
scale_factor=0.03, | ||
color=color) | ||
|
||
mne.viz.plot_alignment(evoked.info, bem=sphere, surfaces=[]) | ||
|
||
# Plot the position and the orientation of the actual dipole | ||
plot_pos_ori(actual_pos, actual_ori, color=(1., 0., 0.)) | ||
# Plot the position and the orientation of the estimated dipole | ||
plot_pos_ori(dip.pos, dip.ori, color=(0., 0., 1.)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you made this change because the example now otherwise looks bad, we'll have to make it clear in the
whats_new
(please update) that the computations have changed and that changingalpha
might be necessary to partially compensate.