[Eeglablist] Processing Startle in EEGlab
Tara Miskovich
miskovi2 at uwm.edu
Mon Sep 7 14:34:44 PDT 2015
Thanks for the response Steve. Thanks for catching that—it isn't exactly
1000. I ran the code you gave me and now this pops up. Thank you so much
for the help with this.
pop_epoch():64 epochs selected
Epoching...
pop_epoch():64 epochs generated
pop_epoch(): checking epochs for data discontinuity
pop_rmbase(): Removing baseline...
Warning: Out of range or non-integer values truncated during conversion to
character.
Then I get:
*Error using horzcat*
CAT arguments dimensions are not consistent.
On Sat, Sep 5, 2015 at 4:03 PM, Stephen Politzer-Ahles <
stephen.politzer-ahles at ling-phil.ox.ac.uk> wrote:
> Hello Tara,
>
> It's hard to tell without seeing the data, but this sort of thing might
> happen when the timepoints in your data are not exactly e.g. 20 and 100 ms
> (which might be the case if your sampling rate was not 1000 Hz). Is the
> issue fixed if you replace the line in question with the following?
>
> STLResponse = squeeze(max(EEG.data(1,find(EEG.times>=20 &
> EEG.times<=100),:)));
>
> Best,
> Steve
>
> On Sat, Sep 5, 2015 at 8:17 PM, Tara Miskovich <miskovi2 at uwm.edu> wrote:
>
>> Hello all,
>>
>> I am having difficulty with a script I obtained for processing startle
>> data in EEGlab:
>>
>> %% High pass filter
>> [HP28_1,HP28_2] = butter(2,28/(EEG.srate/2),'high'); %
>> generate filter coefficient for 4th order 28Hz High pass Butterworth filter
>> EEG.data = filtfilt(HP28_1,HP28_2,EEG.data); %apply that filter
>> to ORB channel; filter order is divided by 2 because we use the filtfilt
>> function to avoid phase shifts in the data
>>
>> %% Rectify
>> EEG.data = abs(EEG.data); %the 'abs' function rectifies the data
>>
>> %% Low pass filter
>> [LP30_1,LP30_2] = butter(2,30/(EEG.srate/2),'low'); % generate
>> filter coefficient for 4th order 30Hz Low pass Butterworth filter
>> EEG.data = filtfilt(LP30_1,LP30_2,EEG.data); %%apply that filter
>> to ORB channel; filter order is divided by 2 because we use the filtfilt
>> function to avoid phase shifts in the data
>>
>> %% Epoch and baseline correct
>> EventCodes = num2cell(unique([EEG.event.type])); %Extract event
>> codes for epoching
>> EEG = pop_epoch( EEG, EventCodes, [-0.05 0.25], 'epochinfo',
>> 'yes'); %Epoch file for events that indicate startle probes
>> EEG = pop_rmbase( EEG, [-50 0]); %Baseline correct
>>
>> %% Mark and reject trials with excessive artificat
>> Artifact = squeeze(max(EEG.data(1,1:find(EEG.times==0),:)) - min(
>> EEG.data(1,1:find(EEG.times==0),:)) > 40); %Identify trials with greater
>> than 40 microvolt deflections in baseline
>> EEGNA = pop_select(EEG,'notrial', find(Artifact)); %Reject these
>> trials
>>
>> %% Score startle peaks
>> STLResponse =
>> squeeze(max(EEG.data(1,find(EEG.times==20):find(EEG.times==100),:)));
>> %Identify peak response of startle trials in scoring window
>> STLResponse = [[EEG.event.type]' STLResponse]; %Store peak values
>> by event type
>>
>> I get the following output:
>>
>> pop_epoch():64 epochs selected
>> Epoching...
>> pop_epoch():64 epochs generated
>> pop_epoch(): checking epochs for data discontinuity
>> pop_rmbase(): Removing baseline...
>> Warning: Concatenation involves an empty array with an incorrect number
>> of rows.
>> This may not be allowed in a future release.
>>
>> I am not sure what is the issue here, but after "STLResponse =
>> squeeze(max(EEG.data(1,find(EEG.times==20):find(EEG.times==100),:)));
>> %Identify peak response of startle trials in scoring window" I end up with
>> an empty 0 by 64 matrix.
>>
>> I am just a little new to this and can't seem to figure out what is going
>> on here.
>>
>> Thank you!
>> Tara
>>
>>
>> _______________________________________________
>> 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
>>
>
>
--
Thank you,
Tara A. Miskovich, M.S.
Affective Neuroscience Laboratory
Department of Psychology
University of Wisconsin-Milwaukee
334 Garland Hall
miskovi2 at uwm.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20150907/1386fcfe/attachment.html>
More information about the eeglablist
mailing list