Convert .EEG to .EDF using script

Hi, I have a lot of Nihon Kohden files with .EEG format. I want to convert them into EDF which is more common using scripts. Any ideas on how should I start this?

Thank you

Hi Barry,

First, try to open the Nihon Kohden files (.eeg) in Brainstorm using the GUI, as shown in the tutorials, to verify this specific NK format is supported. If the NK files are properly opened, the you can right click on it, then File > Export to file and select EDF.

Lastly, you can write a script to automate the execution of the previous steps for all your NK files. See the scripting tutorial.

Best,
Raymundo

Thank you for your help!

I would not recommend converting the NK recordings to EDF before processing them, as it may result in loss of information due to the change of formats or bugs in the EDF+ export code. Brainstorm can handle natively the NK format, I'd recommend you keep them in this format.

If you really need to convert the recordings to a different file format, for processing them in a software that does not support NK .eeg files (e.g. if you are NOT working with Brainstorm), then it would be safer to do it with the export functions of the NK file viewer, not with Brainstorm.
Do not delete any of the original recordings, as you might need to get back to them at some point.

Thank you for your advice! I do want to analyze them using Python.

Hi, may I ask a question? If we locate SEEG using pre T1 MRI and post CT, when importing CT, we choose spm to register wihout reslicing, does this mean now CT and MRI are already registered, after reslicing, we could overlay CT on MRI, more like funsion.

You can register and reslice separately, as illustrated in the ECOG tutorial:
https://neuroimage.usc.edu/brainstorm/Tutorials/ECoG#Post-implantation_MRI

Please create a new thread for each new topic, it makes it easier to organize and follow the discussions - thanks.

I did open a new thread here Some Questions about MRI and CT when locating the positions of SEEG