Question about "mne.read_annotations"(Xia Tao)

External Email - Use Caution

Dear Alexandre Gramfort,
       Thank you for your replying. Actually, I have checked many times, I
was confused that 'annotation.duration' worked well but 'onset' did not.
They were both numbers. The attached is my csv file.
       Thanks
       Xia Tao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190328/f4e75785/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.csv
Type: application/vnd.ms-excel
Size: 332 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190328/f4e75785/attachment.xlb

External Email - Use Caution

use:

mne.read_annotations('test2.txt')

with the txt file attached.

the .csv format expects a time stamp for the onset.

we should detect this and raise an error

Alex

        External Email - Use Caution

Dear Alexandre Gramfort,
       Thank you for your replying. Actually, I have checked many times, I
was confused that 'annotation.duration' worked well but 'onset' did not.
They were both numbers. The attached is my csv file.
       Thanks
       Xia Tao
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190328/042e4181/attachment.html
-------------- next part --------------
0,119.99,Wake
119.99,420,N1
539.99,30,Art
569.99,390,N1
959.99,1050,N2
2009.99,840,N3
2849.99,90,Art
2939.99,60,N1
2999.99,30,Art
3029.99,120,N1
3149.99,60,Art
3209.99,60,N1
3269.99,1020,N2
4289.99,90,REM
4379.99,30,N1
4409.99,360,REM
4769.99,30,N2
4799.99,234.15,REM
5034.14,0.01,Wake

External Email - Use Caution

Hi!

This might be a bug. If you rename the file to .txt and comment out the first line, mne.read_annotations works correctly. Could you please open a new issue in our GitHub repo?

Thanks,
Clemens