Hallo,
I would like to save some state vektors like Feedback and Running in a text file after the end of a run. I would really appreciate if somebody could give a hint hove I could manage this. TIA
State saving in text file
Re: State saving in text file
Hi,
there are several ways to do this. My preferred way is the following:
* Make sure the directory <your BCI2000 path>/tools/cmdline is in your system's PATH variable.
* On your desktop, create a file named ExtractStates.cmd, with the following text content:
* Drag-and-drop a recorded BCI2000 *.dat file onto the script to obtain a text file that contains the states from the file, in form of a table with state names provided in the file's first line.
Alternatively, you may use the AppConnector protocol to read states from BCI2000 while it is running, so you may write them into a file (see http://www.bci2000.org/wiki/index.php/T ... _Connector for reference). Using output redirection to a file, you can use the unmodified SimpleExample program provided at BCI2000/src/contrib/AppConnectorApplications/SimpleExample, or add a state name comparison to suppress unwanted states from the output.
Regards,
Juergen
there are several ways to do this. My preferred way is the following:
* Make sure the directory <your BCI2000 path>/tools/cmdline is in your system's PATH variable.
* On your desktop, create a file named ExtractStates.cmd, with the following text content:
Code: Select all
bci_dat2stream --transmit-s < "%1" | bci_stream2table > "%1.states.txt"
Alternatively, you may use the AppConnector protocol to read states from BCI2000 while it is running, so you may write them into a file (see http://www.bci2000.org/wiki/index.php/T ... _Connector for reference). Using output redirection to a file, you can use the unmodified SimpleExample program provided at BCI2000/src/contrib/AppConnectorApplications/SimpleExample, or add a state name comparison to suppress unwanted states from the output.
Regards,
Juergen
Re: State saving in text file
Hallo,
thank you for your help. I tried the option with the batch file and it didn't worked. After some testing I could extract one parameter this way:
bci_dat2stream --transmit-s < S001R01.dat | bci_stream2asc | grep Feedback > feedback.txt
Now I would like to extract for example feedback and running with the same batch in the same text file. I couldn't find a way to do this.
Greetings,
Vladi
thank you for your help. I tried the option with the batch file and it didn't worked. After some testing I could extract one parameter this way:
bci_dat2stream --transmit-s < S001R01.dat | bci_stream2asc | grep Feedback > feedback.txt
Now I would like to extract for example feedback and running with the same batch in the same text file. I couldn't find a way to do this.
Greetings,
Vladi
Re: State saving in text file
Hi,
in the meantime, I fixed bci_stream2table, so the suggested batch file should work.
When you have grep available, you may just tell it to search for two state names instead of one:
Juergen
in the meantime, I fixed bci_stream2table, so the suggested batch file should work.
When you have grep available, you may just tell it to search for two state names instead of one:
Code: Select all
bci_dat2stream --transmit-s < S001R01.dat | bci_stream2asc | grep "Feedback|Running" > feedback.txt
Re: State saving in text file
Hallo,
now I'm trying to extract EEG data from the dat file into a text file and I'm not sure which string I can use for the extraction. Because when I want to exract some parametrs I can use their names like in:
bci_dat2stream --transmit-s < S001R01.dat | bci_stream2asc | findstr "feedback" > feedback.txt
But how to go for the signal I have no idea. Would be great if you could help me out again.
Greetings,
Vladi
now I'm trying to extract EEG data from the dat file into a text file and I'm not sure which string I can use for the extraction. Because when I want to exract some parametrs I can use their names like in:
bci_dat2stream --transmit-s < S001R01.dat | bci_stream2asc | findstr "feedback" > feedback.txt
But how to go for the signal I have no idea. Would be great if you could help me out again.
Greetings,
Vladi
Re: State saving in text file
Hi,
use the BCI2000Export tool for this purpose. It is located inside the BCI2000/tools directory. From the drop-down menu, choose one of the ASCII options.
Regards,
Juergen
use the BCI2000Export tool for this purpose. It is located inside the BCI2000/tools directory. From the drop-down menu, choose one of the ASCII options.
Regards,
Juergen
Who is online
Users browsing this forum: No registered users and 21 guests