ERP plot issues

External Email - Use Caution

Dear all,

I am having problems creating an erp plot of a cropped segment of data.
What I am doing is crop the raw at some specific time points, find the stim
events at that points using my own code, epoching, averaging the epochs and
then plotting) and I always get the error: Some of the values to be plotted
are NaN. While when doing the same procedure with whole raw data file it
works fine.

Do you have any idea which might be the cause of that?

Could it be a problem with some values when epoching the short segment of
data?

Thank you in advance,

Lidia

External Email - Use Caution

hi Lidia,

many things could go wrong. I would suggest you provide a few lines of
code (as little as possible)
using the MNE sample data to replicate the problem so we can investigate.

Alex

External Email - Use Caution

Hi,

Here is the code (relevant part highlighted. It should work similarly for
the sample data set for MNE but with different loading):

External Email - Use Caution

Dear Lidia,

if you don't share with me the EDF file I cannot replicate to help you.

Alex