[Eeglablist] Run REST plugin from the command line
pancy at udel.edu
pancy at udel.edu
Mon Aug 7 14:09:09 PDT 2023
Dear Andreas,
Thank you very much for your reply. I have reviewed the files you mentioned, and it appears that we might be looking at different scripts. In the version I examined, the "relevant code" referred to (lines 218-224) in pop_REST_reref.m are comments, not actual code. The version I referred to is provided in the eeglab tutorial on eeglab.org, and you can access it through this link: https://urldefense.com/v3/__https://github.com/sccn/REST/blob/master/pop_REST_reref.m__;!!Mih3wA!EQoUUS1vGY9WMFZoe-nfp_KnP5HKhF2GXY1d32Z5_lW3LE80cE8cVv0DbRvi0GqjxX_G_9UOk3vYA3JsIoVY$
Anyway, your reply actually help me understand where I should look (sorry that I am not very proficient in programming). Following your instructions, I found that the " OrigReferFlag" parameter is defined in line 70 - handles.cfg.OrigReferFlag = 1; % Original reference flag. Then in line 263, OrigReferFlag = handles.cfg.OrigReferFlag. That means, OrigReferFlag is 1, representing average reference as original reference and won't be anything else. The parameter "handles.cfg.OrigReferFlag" appears a few times in some if-statements but it will not change the value of it. So, I think you are right; selecting 'average' or 'fixed' in the original reference on the GUI will not make any difference in the process.
Pancy
-----Original Message-----
From: Andreas Widmann <widmann at uni-leipzig.de>
Sent: Monday, July 31, 2023 10:22 AM
To: pancy at udel.edu; Cedric Cannard <ccannard at protonmail.com>
Cc: Mike X Cohen via eeglablist <eeglablist at sccn.ucsd.edu>
Subject: Re: [Eeglablist] Run REST plugin from the command line
Dear Pancy,
just a brief comment: Currently, the GUI REST eeglab plugin unconditionally re-references to average irrespective whether you select „Average“ or „A fixed electrode“ in the GUI. The relevant code is in lines 218-224 in pop_REST_reref.m. The OrigReferFlag is not used anywhere else in the code. Not sure what it was intended for. Here, with common reference (i.e., fixed) input the results are bit-identical selecting any of both options.
In rest_refer.m it is commented "The original reference must be average reference.“ So, to my understanding no changes to the command line version should be necessary.
Best,
Andreas
> Am 28.07.2023 um 22:41 schrieb Pancy Pang via eeglablist <eeglablist at sccn.ucsd.edu>:
>
> Dear Cedric,
>
> Thank you very much for developing these scripts for REST reference, I am looking for way to do it with script and I see your reply just at the moment that I need. I am grateful that you share your work.
>
> I am now trying to adapt it to my pipeline but I have one question: in the GUI, there is an option for choosing "original reference". I am using a fixed electrode rather than average. How can I specify it in the script?
>
> Is it this part in ref_infinity.m:
> % Ref to average
> EEG.data = EEG.data - repmat(mean(EEG.data),size(EEG.data,1),1);
>
> How can I change it to a "fixed electrode"? (in the GUI, I don't need
> to specify which one is the "fixed electrode". I don't know what I
> should use to replace "mean(EEG.data)" in the above script. The
> mastoid?)
>
> Best,
> Pancy
>
> -----Original Message-----
> From: Cedric Cannard <ccannard at protonmail.com>
> Sent: Saturday, July 15, 2023 11:48 PM
> To: eeglablist at sccn.ucsd.edu
> Subject: Re: [Eeglablist] Run REST plugin from the command line
>
> Dear Luisa,
>
> I made a plugin to allow command line referencing with the REST method
> (same algorithms). See here: <a
> href="https://urldefense.com/v3/__https://github.com/amisepa/reference
> _infinity__;!!Mih3wA!FYYICgyeRto26lB5RSytzW9nJbkKzl0Ez3uhqOItkrAoAKW63
> R-F7lnJti2MAE4ja2_fMG2utwtmL_hGmH7baTNFdQ$">https://urldefense.com/v3/
> __https://urldefense.com/v3/__https://github.com/amisepa/reference_infinity__;!!Mih3wA!BqlgiVyKOdb__;!!Mih3wA!EQoUUS1vGY9WMFZoe-nfp_KnP5HKhF2GXY1d32Z5_lW3LE80cE8cVv0DbRvi0GqjxX_G_9UOk3vYAwSNbN2I$
> zJj8umTqTEriqdCqCyQsxHqIKS4o-LjmT9YbMnMpUKZaKGIe8M1_OB5aRmPl317onmBBT5
> xbL$ </a>
>
> <a href="https://urldefense.com/v3/__https://github.com/amisepa/reference_infinityYou__;!!Mih3wA!FYYICgyeRto26lB5RSytzW9nJbkKzl0Ez3uhqOItkrAoAKW63R-F7lnJti2MAE4ja2_fMG2utwtmL_hGmH7oN_VS4Q$">https://urldefense.com/v3/__https://github.com/amisepa/reference_infinityYou__;!!Mih3wA!BqlgiVyKOdbzJj8umTqTEriqdCqCyQsxHqIKS4o-LjmT9YbMnMpUKZaKGIe8M1_OB5aRmPl317onmIj4CCOP$ </a> can install it via EEGLAB extension manager, there are some examples in the tuto.
>
> Best,
>
> Cedric Cannard, PhD
>
> On Fri, Jul 14, 2023 at 15:54, Luisa Mwole via eeglablist <[eeglablist at sccn.ucsd.edu](mailto:On Fri, Jul 14, 2023 at 15:54, Luisa Mwole via eeglablist <<a href=)> wrote:
>
>> Dear all,
>>
>> Could you please help me with some example code on how to run the
>> REST plugin from the command line? I couldn't find any hints on GitHub etc.
>> Thanks!
>>
>> Kind regards
>> Luisa Mwole
>> _______________________________________________
>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
>> To unsubscribe, send an empty email to
>> eeglablist-unsubscribe at sccn.ucsd.edu
>> For digest mode, send an email with the subject "set digest mime" to
>> eeglablist-request at sccn.ucsd.edu
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu
More information about the eeglablist
mailing list