Hi everyone!
I was trying to export some segment of a raw EEG to a .bst file, First I used the right click option to manually select the time range (4 s to 216 s), then I clicked on the option: Time-Selection --> Export to file --> bst file, but I got this message:
** Error: Line 237: Index exceeds matrix dimensions.
**
** Call stack:
** >export_data.m at 237
** >out_figure_timeseries.m at 293
** >bst_call.m at 28
** >figure_timeseries.m>@(h,ev)bst_call(@out_figure_timeseries,hFig,[],'SelectedChannels','SelectedTime') at 2331
**
I'm not sure what is wrong,
Thanks in advance!
I think error might be that you are trying to export time series that were downsampled before displaying. This was allowed by the interface, but it does not make much sense technically, I added a cleaner error message to prevent this to happen.
https://github.com/brainstorm-tools/brainstorm3/commit/12c2bedac1a5c57216a00b838ba6534c5f20c492
The format .bst is an internal file format for storing continuous file. It might not be the best solution for you to store/exchange files.
Using the popup menus File>Snapshop>Export to file from a figure is not a good solution for selecting a subset of files, since it does not save the values from the original file, but the contents of the figure (montages, subsampling and filters applied). You should use the process "Extract > Extract time" or "Extract values" instead.
This is not available on continuous files though. If for some reason you want to remove some portion of the continuous recordings (which is not recommended, since you have other ways to exclude some data segments):
- import the segment you are interested in to the database (eg. 4s-216s)
- do not open the imported file for reviewing (it might be very long to display)
- right-click on the file in the database explorer > Review as raw.
- right-click on the "link to raw file" newly created > File > Show in file explorer: This will take you directly to the .bst file created for this file.
Thank you for the reply!
I'm trying to analize an EEG file which has 2 conditions: it begins with closed eyes and then (about 3 minutes later) it changes to opened eyes, I wanted to perform ICA decomposition to clean the EEG, but I'm not sure wheter it is ok to run ICA on the entire raw signal or should I split the signal before to separate conditions and then, run ICA.
That's why I was trying to split it in two files in bst format, one file per condition in order to perform ICA separately
Thanks in advance!
As @Marc.Lalancette replied on your other thread:
if you want to compare the two conditions directly, it is better to use the same ICA decomposition and remove the same components for both. Splitting the file in two and cleaning them separately would introduce a bias in your analysis: you wouldn't be able to say if the differences are coming from the preprocessing or from the brain.
Yes, Thanks for helping me @Marc.Lalancette and @Francois!
I'll perform the ICA decomposition in that way