Como converter um arquivo .REG em um arquivo .EEG?

  • Versão MNE-Python: 0.22
  • sistema operacional: linux

Eu sou iniciante e estou com dificuldade de trabalhar com minha amostra de dados. Quando trabalho com amostra do banco de dados que vem junto com o programa tudo ok. Mas quando vou introduzir meus dados inicia o probrema.

  1. dados da amostra do banco de dados do MNE-P são extensão raw.fif entre outras e a minha amortra é .REG. Ela pertence a dados associados a Ninhon então eu deveria usar extensão .EEG, .LOG etc. Mas quando faço a troca de extensão recebo a mensagem de retorno VolueError: Not a valid nihon EEG file REGEDIT4.

import os
import numpy as np
import mne
import matplotlib
import mne_bids
import mne_bids

sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = os.path.join( sample_data_folder, ‘MEG’, ‘sample’,
‘test.EEG’)

raw = mne.io.read_raw_nihon(fname = sample_data_raw_file, preload = True , verbose = None)

print(raw)
print(raw.info)

Hello @21012015,

I’ll respond in English because I don’t know Portuguese.

I don’t quite understand how this file, test.EEG, came to be. It is not included in the MNE sample data, so I’m wondering a) why did you place it in this directory in the first place, and b) is that actually the file you intend to work with? Are you sure it’s the right file?

This error message actually seems to indicate that you’re trying to read a Windows Registry file …

1 Like

Sorry, I forgot to write in English. I put it in that directory because I created another one and it was giving me an error too! So I tried to keep the default code and modify only the file. This file is my file with my data.
I just put it in the folder.

Yea! But I already changed the extension to .EEG // .LOG etc.
Is there a tool to do this?

I will formulate better doubts:

How do I standardize my raw data obtained from the nihon system and save it in the .REG extension to be able to work with them in MNE-PYTHON? Because in the tutorials and examples on the page they do not present information about it! And not in your YouTube class.

Save them to the EEG // LOG extension from the .REG extension.

It’s not the name of the file that is causing the problem here, but its content. Can you share the problematic file? Either publicly here, or privately with me via richard.hoechenberger@gmail.com

O Nome do arquivo é DA0935F6.REG

No I meant, can you please share the entire file? Not just its name? :sweat_smile: (sorry, I edited my above post after submitting, maybe this caused some confusion!)

1 Like

I shared the file with you via drive

Thank you!

The file is indeed a Windows Registry file. You can open it in a text editor and view it. It looks like this:

REGEDIT4

[HKEY_CURRENT_USER\Software\nfx\EEG-1100\Set2]
"PATTERN_TABLE01.G1"=hex:00,0a,1d,0c,1f,0e,01,0b,1e,0d,20,0f,00,02,23,04,4a,06,\
  64,01,03,24,05,4b,07,65,21,66,19,1b,16,68,22,67,1a,1c,17,69,6a,10,11,14,16,\
  7a,26,26,26,26,26,26,26,29,29,29,29,29,29,29,29,29,29,29,29,29,7e,7f,80,81,\
  82,83,84,85,86,87,88,89,8a,8b,8c,8d,8e,8f,90,91,92,93,94,95,96,97,98,99,9a,\
  9b,9c,9d,9e,9f,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,aa,ab,ac,ad,ae,af,b0,b1,b2,b3,\
  b4,b5,b6,b7,b8,b9,ba,bb,bc,bd,be,bf,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,ca,cb,cc,\
  cd,ce,cf,d0,d1,d2,d3,d4,d5,d6,d7,d8,d9,da,db,dc,dd,de,df,e0,e1,e2,e3,e4,e5,\
  e6,e7,e8,e9,ea,eb,ec,ed,ee,ef,f0,f1,f2,f3,f4,f5,f6,f7,f8,f9,fa,fb,fc,fd,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00
...

This is definitely not supported by mne.io.read_raw_nihon().

How was this file created?

is there any function that i can use to work with such data in MNE?

None that I know of at least. I wouldn’t even know which data format that is honestly … I’ve never seen anything like that before.

How would you normally view / process these data if you were not to use MNE?

I received this data recently! I’m starting! The instruction was to switch to the .EEG extension and create a script and execute the codes according to the Mne definitions and commands. I created the script, and running with the data from the MNE database everything is ok! When I introduce my sample that gives the problem.

Your code is not the problem, but the data is … simply renaming the file won’t fix this, unfortunately. This is none of the Nihon Kohden EEG formats that MNE supports.