[Mne_analysis] create_ecg_epochs with mne-12
JR KING
jeanremi.king at gmail.com
Thu May 12 10:16:21 EDT 2016
Elena,
Did the snippet that I wrote worked on your machine? If so, there is an
issue with your Raw object. Else, there may be a problem with mne
installation.
If you don't find the source of the error, may I suggest you to open an
issue on Github?
https://github.com/mne-tools/mne-python/issues/new
It will be easier to track it down without overloading the mailing list.
All the best,
JR
On 12 May 2016 at 08:34, Elena Orekhova <orekhova.elena.v at gmail.com> wrote:
> Dear Jean-Remi,
>
>
> Below is information you asked for.
> MEG channels are 0 to 305.
>
> Elena
>
> ######################
> raw._data.shape
> (336, 247500)
>
> reject
> {'grad': 2.5e-10, 'mag': 6e-12}
>
> picks
> array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
> 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
> 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
> 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
> 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
> 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
> 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
> 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
> 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
> 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
> 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
> 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
> 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
> 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
> 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
> 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
> 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
> 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
> 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
> 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
> 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
> 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
> 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
> 299, 300, 301, 302, 303, 304, 305])
>
> raw.ch_names
> Out[94]:
> [u'MEG0113',
> u'MEG0112',
> u'MEG0111',
> u'MEG0122',
> u'MEG0123',
> u'MEG0121',
> u'MEG0132',
> u'MEG0133',
> u'MEG0131',
> u'MEG0143',
> u'MEG0142',
> u'MEG0141',
> u'MEG0213',
> u'MEG0212',
> u'MEG0211',
> u'MEG0222',
> u'MEG0223',
> u'MEG0221',
> u'MEG0232',
> u'MEG0233',
> u'MEG0231',
> u'MEG0243',
> u'MEG0242',
> u'MEG0241',
> u'MEG0313',
> u'MEG0312',
> u'MEG0311',
> u'MEG0322',
> u'MEG0323',
> u'MEG0321',
> u'MEG0333',
> u'MEG0332',
> u'MEG0331',
> u'MEG0343',
> u'MEG0342',
> u'MEG0341',
> u'MEG0413',
> u'MEG0412',
> u'MEG0411',
> u'MEG0422',
> u'MEG0423',
> u'MEG0421',
> u'MEG0432',
> u'MEG0433',
> u'MEG0431',
> u'MEG0443',
> u'MEG0442',
> u'MEG0441',
> u'MEG0513',
> u'MEG0512',
> u'MEG0511',
> u'MEG0523',
> u'MEG0522',
> u'MEG0521',
> u'MEG0532',
> u'MEG0533',
> u'MEG0531',
> u'MEG0542',
> u'MEG0543',
> u'MEG0541',
> u'MEG0613',
> u'MEG0612',
> u'MEG0611',
> u'MEG0622',
> u'MEG0623',
> u'MEG0621',
> u'MEG0633',
> u'MEG0632',
> u'MEG0631',
> u'MEG0642',
> u'MEG0643',
> u'MEG0641',
> u'MEG0713',
> u'MEG0712',
> u'MEG0711',
> u'MEG0723',
> u'MEG0722',
> u'MEG0721',
> u'MEG0733',
> u'MEG0732',
> u'MEG0731',
> u'MEG0743',
> u'MEG0742',
> u'MEG0741',
> u'MEG0813',
> u'MEG0812',
> u'MEG0811',
> u'MEG0822',
> u'MEG0823',
> u'MEG0821',
> u'MEG0913',
> u'MEG0912',
> u'MEG0911',
> u'MEG0923',
> u'MEG0922',
> u'MEG0921',
> u'MEG0932',
> u'MEG0933',
> u'MEG0931',
> u'MEG0942',
> u'MEG0943',
> u'MEG0941',
> u'MEG1013',
> u'MEG1012',
> u'MEG1011',
> u'MEG1023',
> u'MEG1022',
> u'MEG1021',
> u'MEG1032',
> u'MEG1033',
> u'MEG1031',
> u'MEG1043',
> u'MEG1042',
> u'MEG1041',
> u'MEG1112',
> u'MEG1113',
> u'MEG1111',
> u'MEG1123',
> u'MEG1122',
> u'MEG1121',
> u'MEG1133',
> u'MEG1132',
> u'MEG1131',
> u'MEG1142',
> u'MEG1143',
> u'MEG1141',
> u'MEG1213',
> u'MEG1212',
> u'MEG1211',
> u'MEG1223',
> u'MEG1222',
> u'MEG1221',
> u'MEG1232',
> u'MEG1233',
> u'MEG1231',
> u'MEG1243',
> u'MEG1242',
> u'MEG1241',
> u'MEG1312',
> u'MEG1313',
> u'MEG1311',
> u'MEG1323',
> u'MEG1322',
> u'MEG1321',
> u'MEG1333',
> u'MEG1332',
> u'MEG1331',
> u'MEG1342',
> u'MEG1343',
> u'MEG1341',
> u'MEG1412',
> u'MEG1413',
> u'MEG1411',
> u'MEG1423',
> u'MEG1422',
> u'MEG1421',
> u'MEG1433',
> u'MEG1432',
> u'MEG1431',
> u'MEG1442',
> u'MEG1443',
> u'MEG1441',
> u'MEG1512',
> u'MEG1513',
> u'MEG1511',
> u'MEG1522',
> u'MEG1523',
> u'MEG1521',
> u'MEG1533',
> u'MEG1532',
> u'MEG1531',
> u'MEG1543',
> u'MEG1542',
> u'MEG1541',
> u'MEG1613',
> u'MEG1612',
> u'MEG1611',
> u'MEG1622',
> u'MEG1623',
> u'MEG1621',
> u'MEG1632',
> u'MEG1633',
> u'MEG1631',
> u'MEG1643',
> u'MEG1642',
> u'MEG1641',
> u'MEG1713',
> u'MEG1712',
> u'MEG1711',
> u'MEG1722',
> u'MEG1723',
> u'MEG1721',
> u'MEG1732',
> u'MEG1733',
> u'MEG1731',
> u'MEG1743',
> u'MEG1742',
> u'MEG1741',
> u'MEG1813',
> u'MEG1812',
> u'MEG1811',
> u'MEG1822',
> u'MEG1823',
> u'MEG1821',
> u'MEG1832',
> u'MEG1833',
> u'MEG1831',
> u'MEG1843',
> u'MEG1842',
> u'MEG1841',
> u'MEG1912',
> u'MEG1913',
> u'MEG1911',
> u'MEG1923',
> u'MEG1922',
> u'MEG1921',
> u'MEG1932',
> u'MEG1933',
> u'MEG1931',
> u'MEG1943',
> u'MEG1942',
> u'MEG1941',
> u'MEG2013',
> u'MEG2012',
> u'MEG2011',
> u'MEG2023',
> u'MEG2022',
> u'MEG2021',
> u'MEG2032',
> u'MEG2033',
> u'MEG2031',
> u'MEG2042',
> u'MEG2043',
> u'MEG2041',
> u'MEG2113',
> u'MEG2112',
> u'MEG2111',
> u'MEG2122',
> u'MEG2123',
> u'MEG2121',
> u'MEG2133',
> u'MEG2132',
> u'MEG2131',
> u'MEG2143',
> u'MEG2142',
> u'MEG2141',
> u'MEG2212',
> u'MEG2213',
> u'MEG2211',
> u'MEG2223',
> u'MEG2222',
> u'MEG2221',
> u'MEG2233',
> u'MEG2232',
> u'MEG2231',
> u'MEG2242',
> u'MEG2243',
> u'MEG2241',
> u'MEG2312',
> u'MEG2313',
> u'MEG2311',
> u'MEG2323',
> u'MEG2322',
> u'MEG2321',
> u'MEG2332',
> u'MEG2333',
> u'MEG2331',
> u'MEG2343',
> u'MEG2342',
> u'MEG2341',
> u'MEG2412',
> u'MEG2413',
> u'MEG2411',
> u'MEG2423',
> u'MEG2422',
> u'MEG2421',
> u'MEG2433',
> u'MEG2432',
> u'MEG2431',
> u'MEG2442',
> u'MEG2443',
> u'MEG2441',
> u'MEG2512',
> u'MEG2513',
> u'MEG2511',
> u'MEG2522',
> u'MEG2523',
> u'MEG2521',
> u'MEG2533',
> u'MEG2532',
> u'MEG2531',
> u'MEG2543',
> u'MEG2542',
> u'MEG2541',
> u'MEG2612',
> u'MEG2613',
> u'MEG2611',
> u'MEG2623',
> u'MEG2622',
> u'MEG2621',
> u'MEG2633',
> u'MEG2632',
> u'MEG2631',
> u'MEG2642',
> u'MEG2643',
> u'MEG2641',
> u'STI001',
> u'STI002',
> u'STI003',
> u'STI004',
> u'STI005',
> u'STI006',
> u'STI007',
> u'STI008',
> u'EEG030',
> u'EEG048',
> u'EEG057',
> u'EEG058',
> u'EEG059',
> u'EOG061',
> u'EOG062',
> u'ECG063',
> u'EMG064',
> u'MISC001',
> u'STI101',
> u'STI201',
> u'STI301',
> u'CHPI001',
> u'CHPI002',
> u'CHPI003',
> u'CHPI004',
> u'CHPI005',
> u'CHPI006',
> u'CHPI007',
> u'CHPI008',
> u'CHPI009']
>
>
> On 12 May 2016 at 12:18, JR KING <jeanremi.king at gmail.com> wrote:
>
>> Dear Elena,
>>
>> This may be due to this bug fix:
>>
>> https://github.com/mne-tools/mne-python/pull/3055/files
>>
>> Previously, a synthetic ecg channel was incorrectly created even when the
>> ecg channel was set by the user.
>>
>> To check that the `create_ecg_epochs` function works on your computer,
>> try:
>>
>> ```
>> from mne.io import Raw
>> from mne.preprocessing import create_ecg_epochs
>> from mne.datasets import sample
>>
>> data_path = sample.data_path()
>> fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
>> raw = Raw(fname, preload=True)
>>
>> ecg_epochs = create_ecg_epochs(raw, tmin=-.15, tmax=.4,
>> l_freq=1.0, h_freq=20.0,
>> reject=dict(grad=4000e-13),
>> ch_name=None, picks=None)
>> ```
>>
>> I haven't been able to reproduce your error, so I suspect that there is
>> something wrong with your raw. Can you report us
>>
>> ```
>> raw._data.shape
>> raw.ch_names
>> reject
>> picks
>> ```
>>
>> Best,
>>
>> Jean-Rémi
>>
>> On 12 May 2016 at 04:52, Elena Orekhova <orekhova.elena.v at gmail.com>
>> wrote:
>>
>>> Hello mne developers,
>>>
>>> I upgraded to mne-12 by
>>> % pip install --upgrade --user mne
>>>
>>> (although the output indicates that in this way I installed mne-0.11.0
>>> ...? See below )
>>> #################
>>> Collecting mne
>>> Using cached mne-0.12.0.tar.gz
>>> Installing collected packages: mne
>>> Running setup.py install for mne ... done
>>> Successfully installed mne-0.11.0
>>> ################
>>>
>>> After the upgrade running this line (that previously worked OK)
>>> ecg_epochs = create_ecg_epochs(RAW, reject=reject, tmin=-.15, tmax=.4,
>>> ch_name=ECG_ch, l_freq=1.0, h_freq=20.0, picks=picks)
>>> gives me an error:
>>> Data must be a 2D array of shape (n_channels, n_samples
>>>
>>> The full error output is below.
>>> I believe that this relates to the upgrade.
>>>
>>> Regards,
>>> Elena
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Mne_analysis mailing list
>>> Mne_analysis at nmr.mgh.harvard.edu
>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>
>>>
>>> The information in this e-mail is intended only for the person to whom
>>> it is
>>> addressed. If you believe this e-mail was sent to you in error and the
>>> e-mail
>>> contains patient information, please contact the Partners Compliance
>>> HelpLine at
>>> http://www.partners.org/complianceline . If the e-mail was sent to you
>>> in error
>>> but does not contain patient information, please contact the sender and
>>> properly
>>> dispose of the e-mail.
>>>
>>>
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>
>>
>> The information in this e-mail is intended only for the person to whom it
>> is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you
>> in error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160512/d8eca938/attachment-0001.html
More information about the Mne_analysis
mailing list