I tried to read the raw data with mne.io.read_raw_cnt(),but i didnt find same montage with my data. In my opinion, montage ‘standard_1020’ is very similar to my condition ,but , still they have several differences. (beween Neuroscan’s montage and standard_1020).So how can i get location information about my data ,or where i can find the montage for .cnt type data.
I would appreciate your help. (i am so sorry for my poor english )
it seems this is not very well supported yet. I was able to get the montage files here Scan Acquire Configuration Files – Compumedics Neuroscan. I tried mne.channels.read_dig_dat
to read the DAT file for SynAmps 2/RT 64 channel EEG, but it fails with this error:
ValueError: Error reading SynAmps2 Quik-Cap64.DAT, line 0 has unexpected number of entries:
Nasion 0.100031 9.518287 0
Next I tried opening with mne.channels.read_custom_montage
but it doesn’t accept .dat
file extensions, so I changed the extension to .tsv
and tried again. This worked, but it seems that the cardinal landmarks (nasion, LPA, RPA) are not properly identified, and the measurement scale may be in mm rather than m, since in the plot the head is tiny (about the size of one electrode dot):
foo = mne.channels.read_custom_montage('SynAmps2 Quik-Cap64.tsv')
foo.plot()
Here’s the console output from the plot command:
1 duplicate electrode labels found:
Right/ REF.
Plotting 71 unique labels.
Creating RawArray with float64 data, n_channels=71, n_times=1
Range : 0 ... 0 = 0.000 ... 0.000 secs
Ready.
<ipython-input-25-dccde57bdb63>:1: RuntimeWarning: Fiducial point nasion not found, assuming identity unknown to head transformation
thanks for your help, I think i have found a way to solve this problem. I imported my cnt data to eeglab in matlab and exported its default location file. Than opening it with mne.channels.read_custom_montage. following are my plot and code ,also location data
data_path = "xx.cnt"
raw = mne.io.read_raw_cnt(data_path, preload=True)
raw.drop_channels(['Trigger','CB1','CB2']) # i dont need those channels
rename_dict = {'HEO': 'HEOG','VEO':'VEOG'}
raw.rename_channels(rename_dict)
print(raw.info)
locs_info_path = 'xxx.locs"
montage = mne.channels.read_custom_montage(locs_info_path)
raw.set_montage(montage)
chan_types_dict = {"HEOG":"eog", "VEOG":"eog", }
raw.set_channel_types(chan_types_dict)
1 -17.926 0.51499 FP1
2 0 0.50669 FPZ
3 17.926 0.51499 FP2
4 -22.461 0.42113 AF3
5 22.461 0.42113 AF4
6 -53.913 0.52808 F7
7 -49.405 0.43159 F5
8 -39.947 0.34459 F3
9 -23.493 0.27903 F1
10 0 0.25338 FZ
11 23.493 0.27878 F2
12 39.897 0.3445 F4
13 49.405 0.43128 F6
14 53.867 0.52807 F8
15 -71.948 0.53192 FT7
16 -69.332 0.40823 FC5
17 -62.425 0.28822 FC3
18 -44.925 0.18118 FC1
19 0 0.12662 FCZ
20 44.925 0.18118 FC2
21 62.425 0.28822 FC4
22 69.332 0.40823 FC6
23 71.948 0.53192 FT8
24 -90 0.53318 T7
25 -90 0.3999 C5
26 -90 0.26669 C3
27 -90 0.13319 C1
28 0 0 CZ
29 90 0.13348 C2
30 90 0.26667 C4
31 90 0.3999 C6
32 90 0.53318 T8
33 -108.05 0.53192 TP7
34 -110.67 0.40823 CP5
35 -117.57 0.28822 CP3
36 -135.07 0.18118 CP1
37 180 0.12662 CPZ
38 135.07 0.18118 CP2
39 117.57 0.28822 CP4
40 110.67 0.40823 CP6
41 108.11 0.53191 TP8
42 100.42 0.74733 M2
43 -126.09 0.52808 P7
44 -130.59 0.43159 P5
45 -140.05 0.34459 P3
46 -156.51 0.27903 P1
47 180 0.25338 PZ
48 156.51 0.27878 P2
49 140.1 0.3445 P4
50 130.59 0.43128 P6
51 126.13 0.52807 P8
52 -144.11 0.52233 PO7
53 -149.46 0.46649 PO5
54 -157.54 0.42113 PO3
55 180 0.37994 POZ
56 157.54 0.42113 PO4
57 149.46 0.46649 PO6
58 144.14 0.52231 PO8
59 0 0 CB1
60 -162.07 0.51499 O1
61 180 0.50669 OZ
62 162.07 0.51499 O2
63 0 0 CB2
64 -42 0.65556 HEOG
65 27 0.69444 VEOG
66 -100.42 0.74733 M1
you can just copy location data above in a .txt file. I hope i can help you and someone met same problem with me
Hello I tried to copy the coordinates above but there are missing the z values Thank you
Hello, thanks, that was really helpful could you also share the positions for CB1 and CB2 electrodes??
Thank you
The coordinates in an EEGLAB .locs
file are not XYZ, they are polar coordinates (columns are degrees, radius, channel_name; see c. Channel Locations - EEGLAB Wiki). MNE-Python will infer this as long as the file extension is .loc
or .locs
.
Thank you I was loading it as a text file and thus the problem arise. I change it to loc and problem solved. Thank you