[Eeglablist] specifying window length for SIFT's pop_est_selModelOrder

Iversen, John jiversen at ucsd.edu
Wed Aug 1 15:40:42 PDT 2018


Hi Tyler,

Thanks for the very clear email describing your problem and explored solutions. Agree there’s a mismatch between the documentation and reality. Please file a bug (or go a step further and contribute a solution—see below).


As far as a simpler solution you were very close in your last idea. Instead, try something like this:

EEG = pop_est_selModelOrder( EEG, 'nogui', 'verb', 1, ...
'modelingApproach', struct( 'winlen', 1), 'prctWinToSample', 100);


You can get a sense of the arguments it’s expecting, by looking, as you started to, into the CAT.configs structure, e.g.

>> hlp_struct2varargin(EEG.CAT.configs.est_selModelOrder) %serializes a structure into a cell array

ans =
  1×22 cell array

    'arg_direct'    [0]    'modelingApproach'    [1×1 struct]    'morderRange'    [1×2 double]    'downdate'

    [1]    'runPll'    [1×1 struct]    'icselector'    {1×4 cell}    'winStartIdx'    []    'epochTimeLims'

    []    'prctWinToSample'    [50]    'plot'    [1×1 struct]    'verb'    [2]

So you can see that the value for modelingApproach needs to be a structure. Its default value is:

struct with fields:

          arg_direct: 0
           algorithm: [1×1 struct]
              morder: 10
         winStartIdx: []
              winlen: 0.9
             winstep: 0.05
            taperfcn: 'blackmanharris'
       epochTimeLims: []
     prctWinToSample: 100
           normalize: [1×1 struct]
             detrend: [1×1 struct]
               timer: 0
    setArgDirectMode: 1
                verb: 2
       arg_selection: 'Segmentation VAR'


One other source of clues in working with SIFT or BCILAB is to look at the ‘worker’ function behind each pop_* function, in this case est_selModelOrder.m
You can decipher the arg_define() statement at the beginning to see which arguments it is possible to specify.

It would be great if you took a shot at fixing it, taking as an example the arg() line defining the prctWinToSample parameter, then adding your own line to define e.g. a top-level winlen parameter. You’d then need to verify that it will override the winlen already specified in the modelingApproach structure.

Hope that gets you on the way.

Best,

John

John R. Iversen, PhD
University of California San Diego
Institute for Neural Computation
Swartz Center for Computational Neuroscience, Assoc. Director
9500 Gilman Dr #0559
La Jolla, CA 92093
jiversen at ucsd.edu<mailto:jiversen at ucsd.edu>


On Aug 1, 2018, at 4:21 AM, Tyler Grummett <tyler.grummett at flinders.edu.au<mailto:tyler.grummett at flinders.edu.au>> wrote:

Dear EEGLABers,

Im having difficulties doing something which is probably really simple, and thats specifying certain variables when calling pop_est_selModelOrder programmatically (as I am running it in a super computer). I'm trying to specify window length ('winlen') at the very least, but found that I cant specify the window step (winstep) either.

If I ran the code:


EEG = pop_est_selModelOrder( EEG, 'nogui', 'verb', 1, ...
'winlen', 1, 'prctWinToSample', 100);


I would get the error:


Error using arg_define (line 406)
Some of the specified arguments do not appear in the argument specification;
{setname, filename, filepath, subject, group, condition, session, comments,
nbchan, trials, pnts, srate, xmin, xmax, times, data, icaact, icawinv, icasphere,
icaweights, icachansind, chanlocs, urchanlocs, chaninfo, ref, event, urevent,
eventdescription, epoch, epochdescription, reject, stats, specdata, specicaact,
splinefile, icasplinefile, dipfit, history, saved, etc, datfile, timeseries, CAT,
winlen}.

Error in est_selModelOrder (line 100)
g = arg_define([0 1],varargin, ...

Error in arg_report>arg_report_rich (line 153)
    func(args{:});

Error in arg_report>do_report (line 125)
    feval(['arg_report_' lower(type)],func,args,have_expeval);

Error in arg_report (line 93)
    res = do_report(type,func,args);

Error in pop_est_selModelOrder (line 104)
    cfg =
    arg_tovals(arg_report('rich',fcnHandle,[{'EEG',ALLEEG(1)},varargin]),false);


Eventually I found that if I wrote the following code:


EEG.CAT.configs.est_selModelOrder = arg_tovals( arg_report( 'rich', @est_selModelOrder));
EEG.CAT.configs.est_selModelOrder.modelingApproach.winlen = 1;

And then ran the code without winlen:

EEG = pop_est_selModelOrder( EEG, 'nogui', 'verb', 1, ...
'prctWinToSample', 100);

then it would run without crashes, however, I feel that I shouldnt have to do that considering it says that it is one of the possible input arguments.

Ive also tried this variation (just to spitball):


EEG = pop_est_selModelOrder( EEG, 'nogui', 'verb', 1, ...
'modelingApproach', { 'winlen', 1}, 'prctWinToSample', 100);


but that obviously didnt work.

I would appreciate any help on this! Let me know if you need me to write a bug report on this.

Kind regards,
Tyler

*************************

Tyler Grummett ( BBSc, BSc(Hons I))
PhD Candidate
Brain Signals Laboratory
Multimodal Recording Facility
Flinders University Tonsley Building
Rm 4.17
Ext 19573
_______________________________________________
Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu<mailto: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<mailto:eeglablist-request at sccn.ucsd.edu>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20180801/3fc94946/attachment.html>


More information about the eeglablist mailing list