Time (s) length is different to that of what is actually recorded

Hello,

We have just recently started using Brainstorm.
We noticed that the when we upload a dataset up on brainstorm using .mat file, the dataset time increases to 14547.967s, when we only recorded for 2 hours (~7200s).
We have tried other file formats such as .dat file and when we had recorded for 90min (~5400s) we were only able to get a read out of ~300s.

It looks like we are looking at the frames from epoch when we compare to the read out from EEGLAB.
These files were originally converted from open ephys file to .mat using the following script:

If you take a look at the screenshots below:
when we open it in EEGLAB it shows the correct time (s) that was recorded.

However when we upload it to brainstorm the time changes and from 2hr to almost 4 hrs. If you also take a look at MATLAB in the workspace the timestamps shows the similar value as the time in seconds but the decimal value is different.

Are we misinterpreting the time here wrong or is it possible that the timestamps (frames/epoch) have been put into the place of time?

Any and all help will be greatly appreciated.
Thank you very much!

Hello,

We tested with other files and it looks like the timestamp value is being inserted into the time (s). However this is not correct insertion is there a way to have the correct time (s) output?

We have noticed that the timestamp is usually 2x the value of the time recorded. Why might this be?

Thank you?

How are you opening the .mat in Brainstorm?

The issue is the sampling frequency, as you can see in the Brainstorm GUI it indicates 1000Hz, while the screenshot from EEGLAB shows 2000 Hz.

Hi Raymundo,

We open the mat file as shown in the screenshot below:
Screenshot 2024-03-08 at 12.08.28 PM

I also tried to resample at 2000Hz and it still shows the wrong time:

Thank you very much!
Rahmi

This will not work. The initial times are bad, the resampled times will be also bad



Don't you get a window asking for the properties of the data to import?
image

Is in this one where the sampling frequency needs to be set to 2000 Hz

Hi Raymundo,

It worked thank you very much!

I noticed before and when I tried to look up the difference between
create a link to raw data vs import raw eeg
from the resources I found it said there was no difference between which method I use to import the raw data.

However since I can only adjust the sampling frequency via the latter just wanted to know if there were further differences or reasons to choose one vs the other method.

Thank you very much!

These are the general differences between review and import:
https://neuroimage.usc.edu/brainstorm/Tutorials/ChannelFile#Review_vs_Import

Reviewing, creates a link to the raw data, and it does not modified in any manner. As mentioned in the tutorial, most of the pre-processing (filters and artifact removal happens when in the raw data) then you can turn on and off SSP and ICA components and see their impact in the signals. Moreover, in the specific case for data coming from Matlab .mat files, as in your case, reviewing automatically generates a binary (.bst) file with the data in the mat file. Reading from the binary file instead of the mat file, allows reading only the data to be plotted, instead of reading the entire file, thus it's possible to explore long recordings without using all the memory in the computer.

Importing is used once your data is pre-processed. It will created copies of the data in the Brainstorm database. The import options allow to import segments of the raw data, either by time, or by events (option that is useful to extract epochs/trials).

The recommendation is to use review if pre-processing will be performed on the data. This is also true if the data is already pre-processed, but stills need to be epoched.

Thank you very much Raymundo!