[Eeglablist] using pop_eegplot and eeg_eegrej in a script

Chang Gu chang.gu at vanderbilt.edu
Thu Jun 9 11:16:50 PDT 2011


Dear James & colleagues,

I also have similar questions about eegplot(). I tied using UserData to
control the total number of channels displayed by eegplot:

pop_eegplot( EEG, 1, 1, 1);
ud=get(gcf,'UserData');
ud.dispchans=30; % e.g. 30 channels only
set(gcf,'UserData',ud);
eegplot('draws',0);

A "scroll EEG plot" pops out successfully, but only with the last 30
channels of EEG data: there's no scroll button on the left for selecting
which 30 channels... Does anyone know if there's a way to add it so that we
can scroll channels? Or, instead of always showing last 30 channels, a way
to show certain 30 channels?

Another question about eegplot() is that,  how can I plot certain channels
within certain segments by different color? I image that we could pass the
channel number and segments as arguments to eegplot to do that. ( just like
the in 'all method' artifact detection, EEGlab plots bad channels in
segments in red . ) Does someone have any idea about that?

Thanks in advance!



On Mon, Jun 6, 2011 at 2:42 PM, James Desjardins <jdesjardins at brocku.ca>wrote:

> Hi Sebastian,
>
>
> Regarding your first question:
>
> I find it useful to batch interactive pruning procedures as well (if
> for no other reason ... it drastically reduces the number of coffee
> breaks that I take while pruning data!). To make streamlined
> interactive batch scripts I have found that accessing the figure's
> UserData is the best way to proceed.
>
> If your script is already loading the data that you want to display
> and edit the following code will (1) create the eegplot, (2) access
> the current eegplot's UserData structure, (3) adjust the "winlength"
> field of UserData, (4) set the current eegplot's UserData using the
> new values, (5) redraw the current eegplot figure with the new values,
> (6) wait for this figure to close before continuing on with the
> remainder of the script.
>
> pop_eegplot( EEG, 1, 1, 1); %1
> ud=get(gcf,'UserData');     %2
> ud.winlength=40;            %3
> set(gcf,'UserData',ud);     %4
> eegplot('draws',0)          %5
> uiwait;                     %6
>
>
> This procedure is flexible in that any figure properties or UserData
> fields can be adjusted in script. For example changing step 4 above to:
>
> set(gcf,'UserData',ud, 'Position', [1,1,1024,768]);
>
> ... will also move the figure to the bottom-left corner of the display
> and change the size to 1024x768 pixels.
>
>
> Regarding your second question:
>
> The final input to the pop_eegplot function ("reject") when set to 1
> allows the immediate removal of marked time periods. When using this
> setting simply click the "REJECT" button in the bottom left corner of
> the eegplot figure when you are finished pruning and then a separate
> call to pop_eegrej will not be necessary.
>
> I hope that this is helpful.
>
> James Desjardins
> Technician, MA Student
> Department of Psychology, Behavioural Neuroscience
> Cognitive and Affective Neuroscience Lab
> Brock University
> 500 Glenridge Ave.
> St. Catharines, ON, Canada
> L2S 3A1
> 905-688-5550 x4676
>
>
> Quoting Sebastian Urchs <sebastian.urchs at gmail.com>:
>
> > Hi,
> >
> >
> >
> > I am setting up a pipeline for multi-subject data preprocessing including
> > ICA on a cluster. Now in order to clean up the data before running ICA I
> > would like to use pop_eegplot() from inside a script that loops through
> all
> > my subjects. I will then halt the script until the pop_eegplot() window
> is
> > closed again and run eeg_eegrej() on the marked data-parts.
> >
> >
> >
> > Now my questions are:
> >
> >
> >
> > : First, sliding through a large dataset in pop_eegplot() is not
> effective
> > at the default displayed timerange. Of course this can be changed
> manually
> > each time by pointing and clicking but it would be great if I could hand
> > over arguments to pop_eegplot() when it is called that make the displayed
> > time range say 50s. I have not managed to change
> >
> >
> >
> > "eegplotoptions = { 'winlength', 5, 'events', EEG.event };"
> >
> >
> >
> > arguments from the pop_eegplot.m file itself - could it be that those
> > settings are hardwired into the file?
> >
> >
> >
> > : Second, I am wondering where the arrays with the data marked for
> rejection
> > are stored within the EEG structure. I would then use this information to
> > call pop_eegrej() in the script which would make the whole rejection
> process
> > much faster.
> >
> >
> >
> > Thanks a lot in advance!
> >
> >
> >
> > Sebastian,
> >
> > LMU Munich
> >
> >
>
>
>
>
> _______________________________________________
> 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
>



-- 
Chang Gu
Psychology & Human Development
Vanderbilt University
Nashville, TN





-- 
Chang Gu
Psychology & Human Development
Vanderbilt University
Nashville, TN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110609/fa848f22/attachment.html>


More information about the eeglablist mailing list