[Mne_analysis] Error in fiff_write_raw_buffer: buffer and calibration sizes not matching.

Andres Felipe Salazar Gomez asalazar at nmr.mgh.harvard.edu
Thu Aug 6 16:46:07 EDT 2009
Search archives:

Hi MNE users,

I have a raw fif file which spectrum I want to visualize in mne_analyze.
To do this, I have obtained the frequency values from the raw channels and
copied the info structure from the raw file to use them in the
fiff_start_writing_raw and fiff_write_raw_buffer commands.

When I try to save the file, I get this error:

"??? Error using ==> fiff_write_raw_buffer at 37 buffer and calibration
sizes do not match"

I think there is a problem with the info structure, especially the
triggers declaration but I do not know what it is. Channel 65 is the
stimulus channels, labeled 'STI 014'.

Below is the script I am running in matlab:

Any help is highly appreciated, thank you all!

============================================================
freq_endbase; % <65 X 2622> matrix, 65 channels, 2622 frequency values.

FIFF = fiff_define_constants();

want_meg = false;
want_eeg = true;
want_stim = false;
include{1} = 'STI 014';

[raw] = fiff_setup_read_raw('endbase_raw.fif');

picks
=fiff_pick_types(raw.info,want_meg,want_eeg,want_stim,include,raw.info.bads);

[outfid,cals] =
fiff_start_writing_raw('freq_endbase_raw.fif',raw.info,picks);

% Writting freq_dec_endbase_raw.fif

first = 1;
first_buffer = true;
if first_buffer;
 fiff_write_int(outfid,FIFF.FIFF_FIRST_SAMPLE,first)
 'loco-era-true'
 first_buffer = false;
end
fiff_write_raw_buffer(outfid,freq_endbase,cals);
fiff_finish_writing_raw(outfid);
fclose(raw.fid);

??? Error using ==> fiff_write_raw_buffer at 37
buffer and calibration sizes do not match
============================================================

-- 
Andres F. Salazar
Research Technologist
Neuroscience Statistics Research Laboratory
asalazar at nmr.mgh.harvard.edu
149 13th Street, Room 4005
Charlestown, MA  02129








More information about the Mne_analysis mailing list