hey,everyone
Now I have a new issue. I have some BCI competition data whose format is .mat, I want to change it to .dat and use them in the offlineanalysis tool.
So how to change the format from .mat to .dat?
Regards,
Robin
how to change the format from .mat to .dat?
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
Re: how to change the format from .mat to .dat?
BCI2000 comes with a save_bcidat mex file that allows you to save any data in BCI2000 .dat format. However, you will need to provide trigger/event information in form of BCI2000 states. Also, OfflineAnalysis requires certain parameters to be present in a .dat file.
So it is probably best to proceed as follows:
* Use the SignalGenerator to create a BCI2000 .dat file that has been recorded with a paradigm similar to the foreign file, i.e. for an ERP paradigm, create a .dat file with StimulusPresentation, for an SMR paradigm, create a .dat file with CursorTask. Also, sampling rate and number of channels should match if possible.
* Load the .dat file into Matlab using load_bcidat.
* Replace the loaded signal with the foreign file's signal.
* Convert the foreign file's trigger information into the state variables that encodes the paradigm, i.e. StimulusCode/StimulusType for ERP paradigms, and TargetCode/ResultCode/Feedback for SMR paradigms (for a description of these state variables, see the StimulusPresentationTask and CursorTask pages on the BCI2000 wiki). The final state variables should have the same number of samples as the signal.
* Remove all remaining state variables.
* Use the save_bcidat mex file to save the data in .dat format.
Regards,
Juergen
So it is probably best to proceed as follows:
* Use the SignalGenerator to create a BCI2000 .dat file that has been recorded with a paradigm similar to the foreign file, i.e. for an ERP paradigm, create a .dat file with StimulusPresentation, for an SMR paradigm, create a .dat file with CursorTask. Also, sampling rate and number of channels should match if possible.
* Load the .dat file into Matlab using load_bcidat.
* Replace the loaded signal with the foreign file's signal.
* Convert the foreign file's trigger information into the state variables that encodes the paradigm, i.e. StimulusCode/StimulusType for ERP paradigms, and TargetCode/ResultCode/Feedback for SMR paradigms (for a description of these state variables, see the StimulusPresentationTask and CursorTask pages on the BCI2000 wiki). The final state variables should have the same number of samples as the signal.
* Remove all remaining state variables.
* Use the save_bcidat mex file to save the data in .dat format.
Regards,
Juergen
-
RobinWang
- Posts: 26
- Joined: 14 Nov 2011, 06:38
Re: how to change the format from .mat to .dat?
thank you! I get it
Who is online
Users browsing this forum: No registered users and 0 guests
