"mne_process_raw" vs "mne_raw2mat" sample # mismatch

Hello,

I am reading raw data into matlab using mne_raw2mat. For the files I have
read in, I have noticed a mismatch between the sample numbering in the
resulting matlab structure and the sample numbering in the event file
produced mne_browse_raw.

For example, a particular trigger value (3) first appears at column number
64,016 in my MNE_raw.data structure in the STI 14 row, while it is listed at
sample 72,415 in the event file produced by mne_browse_raw.

Does anyone have any idea what the source of the sample # mismatch could be?
I tried manipulating the "keep initial skip" option in mne_browse_raw but
this didn't seem to make any difference in the event file output.

Thanks,

Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20110805/9897ae58/attachment.html

Hi Matt,

can you run fiff_setup_read_raw on the raw data and look if the #
mismatch is equal to the first_samp in the output structure ?

data = fiff_setup_read_raw('data_raw.fif')
data.first_samp

Alex

Hi Alex,

data.first_sample does equal the mismatch; this means that the difference in
sample numbering is due to whether or not the "initial skip" is taken into
account, correct? Are there any flags which allow mne_fiff2mat be modified
so that it doesn't exclude this initial skip? (I didn't see anything in the
help.)

If not, I can just use the data.first_sample value to convert between the
two numberings as needed.

Thanks a lot,

Matt

Hi Matt,

glad this solved the pb. The current choice makes the content of event files
and the output of mne_raw2mat consistent which is I feel a good behavior.

Alex

Hi Matt,

glad this solved the pb. The current choice makes the content of event files
and the output of mne_raw2mat consistent which is I feel a good behavior.

Hi Matt,

An additional comment: Why do you go to the trouble of using mne_raw2mat at all? You can read the raw data quite efficiently with the MNE matlab routines directly without the conversion and wasted disk space.

Incidentally, the first line in the (text) event file also tells you the offset you need to subtract from the event sample numbers to get to the sample numbers in mne_raw2mat output.

- Matti