[Eeglablist] Index error when reading Neuroscan channel .dat

Cedric Cannard ccannard at protonmail.com
Tue Dec 13 09:38:55 PST 2022


Hi Grace,

They might simply need rotation. Some channel location files assume that the nose is at +Y whereas EEGLAB may have +X for example. Does your file have Cartesian (xyz) coordinates? As a simple troubleshoot, you could try to copy paste the coordinates in EEG.chanlocs in the corresponding columns, and remove the other columns. Then type EEG = eeg_checkset(EEG) and go to Plot > Channel locations > By name and see what it looks like. If the orientation is wrong, you can adjust by setting EEG.chaninfo.nosedir = '+X' or '-X' for example, until the orientation is right.

Otherwise, if still not enough to solve the problem, I just saw online that you may be able to import them in the BESA software (see https://urldefense.com/v3/__http://wiki.besa.de/index.php?title=Reading_Neuroscan_Files__;!!Mih3wA!Hh7xBHd-PKAzdEl9fz2MY7OrS8nTTbqUKsIjttVR1p1Ip73yLOjx8mgoDwbV2gUBcfHli-exjkF1QWrjlNJpzeDhCQ$  and download here https://urldefense.com/v3/__https://www.besa.de/home/downloads/besa-research/besa-research-7-1/__;!!Mih3wA!Hh7xBHd-PKAzdEl9fz2MY7OrS8nTTbqUKsIjttVR1p1Ip73yLOjx8mgoDwbV2gUBcfHli-exjkF1QWrjlNK96uvNMg$ )

Then you might be able to export them in a location file in a format that can be imported by EEGLAB.

But there is probably also an existing solution online with more digging, I can't imagine no one had this problem before.

Cheers,

Cedric

On Mon, Dec 12, 2022 at 20:56, Grace Margaret Harvie <ghar8070 at uni.sydney.edu.au> wrote:

> It's a good thought. I'm just looking at them now, however it appears that the coordinates from the .dat file don't match any of the channel coordinates when viewed using the channel locations window. I assume the .dat file must use a different coordinate system?
>
> Thanks
> Grace
>
> ---------------------------------------------------------------
>
> From: Cedric Cannard <ccannard at protonmail.com>
> Sent: 13 December 2022 12:44
> To: Grace Margaret Harvie <ghar8070 at uni.sydney.edu.au>
> Cc: eeglablist at sccn.ucsd.edu <eeglablist at sccn.ucsd.edu>
> Subject: Re: [Eeglablist] Index error when reading Neuroscan channel .dat
>
> Yes the BEM 1005 covers more labels. Should be fine. Can you open the .dat file with a text editor and compare the XYZ coordinates (or theta) with what’s in EEG.chanlocs?
>
> Cedric
>
> On Mon, Dec 12, 2022 at 16:15, Grace Margaret Harvie <ghar8070 at uni.sydney.edu.au> wrote:
>
>> Hi Cedric,
>>
>> Thanks for your reply!
>>
>> The data does have channel labels, so I was using a template while getting the hang of pre-processing (although I had to use the 10-5 template in order to get all the locations for all 26 cephalic channels; not all of the labels were present on the 10-20 or 10-10 templates).
>>
>> Mostly I just want to use the .dat file to double check the accuracy of the template locations (which is probably overkill, but I thought it was worth doing, since I had to use a template with much greater electrode density than the cap which was used).
>>
>> Thanks,
>> Grace Harvie
>>
>> ---------------------------------------------------------------
>>
>> From: Cedric Cannard <ccannard at protonmail.com>
>> Sent: 13 December 2022 09:58
>> To: Grace Margaret Harvie <ghar8070 at uni.sydney.edu.au>
>> Cc: eeglablist at sccn.ucsd.edu <eeglablist at sccn.ucsd.edu>
>> Subject: Re: [Eeglablist] Index error when reading Neuroscan channel .dat
>>
>> Dear Grace,
>>
>> I didn't have to use a .dat file when I worked with Neuroscan data in the past, but here is something you can try: When you type {EEG.chanlocs.labels} in the command window, does it return the channel labels? If so, and if you followed the 10-20 template when you recorded your data, you should be able to simply import the default BEM channel locations (Edit > channel locations > Ok > Plot 2D to check visually > Ok).
>>
>> Hope this helps,
>>
>> Cedric
>>
>> ------- Original Message -------
>> On Tuesday, December 6th, 2022 at 1:45 PM, Grace Margaret Harvie via eeglablist <eeglablist at sccn.ucsd.edu> wrote:
>>
>>> Hi All,
>>>
>>> Tried to send this same email yesterday but the filter didn't like it, so I'm sending it again.
>>>
>>> I'm trying to read channel locations from the Neuroscan .dat file for a 40 channel Quik-Cap, and I keep getting an index error:
>>>
>>>
>>> Reading file (lines): 10 20 30 40 45
>>> Index in position 1 exceeds array bounds. Index must not exceed 45.
>>>
>>> Error in readneurolocs (line 102)
>>> locs = locs(tmpind,:);
>>>
>>> Error in readlocs (line 413)
>>> eloc = readneurolocs( filename );
>>>
>>> Error in pop_chanedit (line 737)
>>> [chans] = readlocs(tmpargs{:});
>>>
>>> Error while evaluating UIControl Callback.
>>>
>>>
>>> I'm not sure if this is something I'm doing/not doing (I am very new to all this, having only been using EEGLAB for a few weeks) or if I've stumbled across a bug? Regardless, any insight anyone has would be greatly appreciated. I have also attached the channel location file in case it is of any use.
>>>
>>> Many thanks,
>>> Grace Harvie
>>> PhD Candidate, Faculty of Medicine and Health, University of Sydney
>>> Research Assistant, Brain Dynamics Centre, The Westmead Insitute for Medical Research
>>> _______________________________________________
>>> Eeglablist page: [https://urldefense.com/v3/__https://protect-au.mimecast.com/s/MTxrCK1DvKTqY8gMntM6IZz?domain=sccn.ucsd.edu*(https:**Aprotect-au.mimecast.com*s*12mtCP7LAXf4233DLizXXNx*domain=sccn.ucsd.edu)__;XS8vLy8_!!Mih3wA!Hh7xBHd-PKAzdEl9fz2MY7OrS8nTTbqUKsIjttVR1p1Ip73yLOjx8mgoDwbV2gUBcfHli-exjkF1QWrjlNL3pdUkIA$ 
>>> 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


More information about the eeglablist mailing list