-
Notifications
You must be signed in to change notification settings - Fork 161
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
[Tutorial] EEG and epilepsy - add cMEM estimate #721
base: master
Are you sure you want to change the base?
[Tutorial] EEG and epilepsy - add cMEM estimate #721
Conversation
When trying to run the pipeline, running:
gives the error:
Firs,t login in the in the Brainstorm website, button at upper right corner. After login, on the tutorial page to edit, go to the top navigatin bar, then Menu > Attachments. {{attachment:sim_ar_spectra_metrics.png||width="100%"}} |
Did you download the new MEM version https://github.com/Edouard2laire/best-brainstorm/archive/refs/heads/wMEM.zip? this error is due to the fact that the script is having an error with the forward model So for some vertex, G is 0 for all the sensors and it cause issue with MEM. I made the new version of MEM more robust to that multifunkim/best-brainstorm@9fe8740 but I guess we should also fix the forward model from the script :)
Thx. :) |
also @rcassani, what do you think of the idea to move MEM just after sLoreta ? i think it make more sense to do all the Source analysis: Surface at the same time instead of sLoreta, then volume then back to surface with MEM |
I tried with the About the order, I think we can move MEM after sLORETA. With its own section with the [Advance] label. |
ok. if I may, the tutorial editor is probably the worst editor i had to use to write text so far. Like, i think it can really remove the will to live to even the most joyous person... Page took 20 minutes to save and is now full of conflict without even the slightest possibility to go back in time, that pasting doesn't work (what text editor doesn't support ctrl+c, ctrl+v???), or that the editor chooses randomly to put half of the page in bold without possibility to remove it if you select the link at the same time as text... or the attachment system! |
Indeed, writing in MoinMoin is a real pain, apologies for all the suffering.
|
Indeed, the raw text editor is much better ! :) |
This reverts commit fcce1d7.
multifunkim/best-brainstorm#13 is now merged. The PR is now ready to be reviewed :) |
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.
@Edouard2laire, to avoid duplication of code, and potential problems in maintenance.
I think for the tutorial_BEst.m
we can use the same approach as in the brain fingerprint tutorial script, where it starts with an already processed Protocol.
- https://neuroimage.usc.edu/brainstorm/Tutorials/BrainFingerprint
brainstorm3/toolbox/script/tutorial_brain_fingerprint.m
Lines 63 to 68 in 6c646d2
%% ===== VERIFY REQUIRED PROTOCOL ===== % Check Protocol that it exists iProtocolOmega = bst_get('Protocol', ProtocolNameOmega); if isempty(iProtocolOmega) error(['Unknown protocol: ' ProtocolNameOmega]); end
So tutorial_BEst.m
will look for the the 'TutorialIntroduction' and do the steps starting with L411:
%% ===== TUTORIAL #20: HEAD MODEL ====================================================
% ===================================================================================
'baseline', [], ... | ||
'sensortypes', 'MEG', ... | ||
'target', 1, ... % Noise covariance (covariance over baseline time window) | ||
'dcoffset', 0, ... % Block by block, to avoid effects of slow shifts in data |
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.
As identity is required, the dcoffset
is ignored. However, dcoffset
is a radio
option, it's value must be >=1
.
Set it to 1
so it matches the comment of the same line
% =================================================================================== | ||
disp([10 'DEMO> Tutorial #22: Source estimation' 10]); | ||
|
||
% coherent Maximu Entropy on the Mean (cMEM) |
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.
Typo
'Comment', 'Average Devient (cMEM)'); | ||
|
||
|
||
% wawelet Maximum Entropy on the Mean (wMEM) |
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.
Typo
'threshold', 0, ... | ||
'Comment', 'Average Devient (wMEM - scale 5 )'); | ||
|
||
% 3. Localizing all scale: |
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.
Typo
'time', 83.3*1e-3, ... | ||
'threshold', 0, ... | ||
'Comment', 'Average Devient (wMEM - all scale)'); | ||
%% ===== SAVE REPORT ===== |
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.
Empty line is needed
Hello,
As we will be merging multifunkim/best-brainstorm#13 soon, this PR update the script corresponding to cMEM of the two following tutorials:
Note: I am getting this warning from the script:
Should we fix the script to get a better head model?