[Eeglablist] Automation

Tarik S Bel-Bahar tarikbelbahar at gmail.com
Wed Aug 17 19:58:02 PDT 2016


​Hello Mike, yes, see notes below, cheers!


**********If you haven't had a chance to yet, familiarize yourself with the
table of contents for the eeglab tutorial, and with googling eeglablist.


***************************************
​FIRST QUESTION: ​
Is there an easy way to see what functions are being called as you click
through eeglab?
​ ​
***************************************

****
​​click the HELP button on any of the eeglab gui interfaces. That will open
the current function documentation.

**** look at the TITLE BAR of the specific eeglab gui interface you are
running (such as when you click
​
Plot > Channel Spectra Maps... it runs "pop_spectopo"

*****
type
​EEGH (in lower caps)

​in the matlab command line​
after running (pressing OK) on a particular eeglab gui action such as
​​
Plot > Channel Spectra Maps
​. You will see the function that was run.  The output of eegh is
essentially the bits that should be put into scripts (with your
modifications of course).
You can find more information about these specifics
​by reviewing
 advanced eeglab tutorials that refer to the mechanics of eeglab and how to
write eeglab scripts
​​, as well as googling eeglablist +your topic.
​

​
****​
You can type "open name_of_function" or "doc name_of_function" at the
command line to examine it, see what other functions it calls, where it
holds the details of user input, etc.
​Open and doc are very useful matlab functions and necessary for learning
how to use matlab, and programs that use matlab.​




***************************************
SECOND QUESTION: I
​
t would be fantastic to be able to automate this. Does anyone have any
suggestions?
*
​*************************************
​
​​
Y
​es doing a sequence of steps is easy. Basically you should first look and
try using the EEGLAB tutorial information on writing scripts. This will
teach you how to make scripts to batch process.
​
You can google eeglablist for examples of small scripts that loop through a
set of files, loading each file at a time from a list of files, doing some
steps to the file, saving the file with a new name, plotting something,
saving the figure with a correct name, ...then redoing the steps on a large
number of files. Any step you can run from the eeglab gui, you can also run
it from command line. See eegh command to get history of recent commands
that have been run via the eeglab gui.

Every action that is available in the gui (open file, save file, plot
components, etc...) is possible to run from the command line, thus you can
build a script by stacking the eegh output. Then show yourself your
"all-steps-for-one-file-script" runs correctly on one file to do everything
you want, and then you may put it in a loop that does it to a set of files,
one at a time as mentioned before. You'll  want to test each "step" within
your script to make sure it does what you want exactly.

You can also google terms such as "making scripts in eeglab" and this will
give you several resources, not just the main eeglab tutorial on scripting
(which is your first stop).
If you haven't had a chance to yet, the following should help you: working
with the tutorial data, and reviewing the online eeglab video course.

Googling eeglablist +your topic also helps in learning about automation.
​
If you've not had a chance to learn scripting or coding in matlab, you will
benefit from googling basic tutorials and youtube videos on basic ways to
writes scripts, make loops, find files in directories, save figures, etc...
anything you will want in your loop besides the eeglab functions.























On Aug 17, 2016 12:34 PM, "Mike Urich" <michaelurich210 at gmail.com> wrote:

> Hi all,
>
> Is there an easy way to see what functions are being called as you click
> through eeglab? I have a workflow of importing data from a text file,
> filtering, removing the mean, and running ICA and then viewing a Component
> Scroll plot. I need to perform this sequence on many datasets and it’ll be
> the same process for each one, so it would be fantastic to be able to
> automate this. Does anyone have any suggestions?
>
> Thanks!
>
> Mike Urich
> michaelurich210 at gmail.com
>
>
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
> sd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20160817/e9b19845/attachment.html>


More information about the eeglablist mailing list