Print

Print


Vladimir,

All 4D data files (containing the actual MEG data and header) have an "extension" that reflects the high-pass filter for the acquisition (i.e., in Zoubir's case the filename C_RFHP0.1HZ breaks down as C for continuous (it would read E for epoched), RFHP = Real-time high-pass and 0.1HZ is the filter cutoff).

I believe the problem he describes is the one we've been dealing with, that the Magnes II has two transformation matrices, and somehow because of this the file is not recognized as 4D. I will probably work on this later this week to see if I can provide a fix. In the meantime, he can use our own in-house function to convert data to SPM8.

Best,

Don


On 3/17/09 6:29 PM, "Vladimir Litvak" <[log in to unmask]> wrote:

Dear Zoubir,

Is this the problem that was already solved with the help of Don
Rojas? The problem is that SPM does not recognize these files as BTi
files. I've never seen BTi files with extension *.1Hz before. Is this
the original extension or have you changed it? You can force SPM to
treat these files as BTi if you use the batch version of conversion
(in the latest SPM8b). There you'll have a possibility to specify the
input data type. In your case it should probably be '4d' although I'm
not sure because there are several types of 4d-related formats.

But if the problem is already solved in a different way, don't worry about it.

Best,

Vladimir

On Tue, Mar 17, 2009 at 10:03 PM, zoubir morsli <[log in to unmask]> wrote:
> Dear Dr. Vladimir Litvak,
> Many thanks for your quick information.
> Unfortunately i can not send you my data by E-mail, because the size is
> bigger than 25 MB.
>  I have tried the conversion using SPM8 but i got the following errors:
> ======Convert
> with Define settings? just read
> Warning: could not
> determine filetype of E:\Daten\kse02\C_RFHP0.1HZ
>> In fileio\private\filetype at
> 923
> In
> fileio\private\read_header at 359
> In
> fileio_read_header at 11
> In
> spm_eeg_convert at 73
> In
> spm_eeg_convert_ui at 81
> ???
> Error using ==> hastoolbox at 282
> the
> BIOSIG toolbox is not installed, see http://biosig.sourceforge.net
> Error
> in ==> read_header at 1267
> if strcmp(fallback, 'biosig') && hastoolbox('BIOSIG', 1)
> Error
> in ==> fileio_read_header at 11
> [varargout{1:nargout}] = funhandle(varargin{:});
> Error
> in ==> spm_eeg_convert at 73
> hdr = fileio_read_header(S.dataset,
> 'fallback', 'biosig');
> Error
> in ==> spm_eeg_convert_ui at 81
> D = spm_eeg_convert(S);
> ???
> Error while evaluating uicontrol Callback
>
> ===========Convert
> with Define settings?: yes
> How
> to read? : continuous
> Read
> everything? : yes
> Read
> across trial: no
> what
> channels?: all
> Warning: could not
> determine filetype of E:\Daten\kse02\C_RFHP0.1HZ
>> In fileio\private\filetype at
> 923
> In
> fileio\private\read_header at 359
> In
> fileio_read_header at 11
> In
> spm_eeg_channelselection at 33
> In
> spm_eeg_convert_ui at 68
> ???
> Error using ==> hastoolbox at 282
> the
> BIOSIG toolbox is not installed, see http://biosig.sourceforge.net
> Error
> in ==> read_header at 1267
> if strcmp(fallback, 'biosig') && hastoolbox('BIOSIG', 1)
> Error
> in ==> fileio_read_header at 11
> [varargout{1:nargout}] = funhandle(varargin{:});
> Error
> in ==> spm_eeg_channelselection at 33
> hdr = fileio_read_header(S.dataset,
> 'fallback', 'biosig');
> Error
> in ==> spm_eeg_convert_ui at 68
> S = spm_eeg_channelselection(S);
> ???
> Error while evaluating uicontrol Callback
>
> In regarding to epoching  i will be running it taking your advice and i will
> let you know about the results and thank you very much for your frindly help
>
> z morsly
> Dear Zoubir,
>
> On Sun, Mar 15, 2009 at 10:32 PM, zoubir morsli <[log in to unmask]>
> wrote:
>>   Dear Dr. Vladimir Litvak,
>> May i thank you very much for your friendly and precise answer. In fact i
>> tried to work with SPM8, but the conversion from continuous MEG data in
>> BTi
>> format (on biomagnetometer with  2*37 multichannels) to SPM8  files did
>> not
>> lead to an acceptable result.
>
> What was the problem exactly? We would be interested to fix any
> problems people find with conversion, especially for MEG data. So if
> you send me an example of your data and explain what the problem is
> I'll look at it.
>
>> I also  used the conversion  trying with pdf4D object code von Dr Eugene
>> and
>> pdf2spm8 von Dr. Rojas.But there remains still one problem for me: How to
>> create epochs with SPM8  for continuous MEG data from simultanious
>> electromyography EMG channel?
>
> There is no ready-made solution in SPM to do this, although there
> might be some code that can be used to make such a tool. You have two
> possibilities:
>
> 1) In SPM8 reviewing tool it is possible to add triggers by hand. You
> can just go over your file looking at the EMG channel and add triggers
> where necessary. You can then use these triggers for epoching. This is
> feasible if you don't have too many EMG activations. Let me know if
> you want to do this and I can give you more precise instructions.
>
> 2) You can do epoching using a trial definition file containing a
> matrix with trial borders and a cell array with condition names (more
> details in the manual). If you find a way to make such a matrix for
> your EMG events using any external tool or your own Matlab code, you
> can feed it to SPM. I know there is such a tool in BESA software.
> Other people on the list might also have something. My experience is
> that such code will probably not work 'out of the box' and will
> require some fine-tuning for your data.
>
> Best,
>
> Vladimir
>
>
>
>> Thank you very much for helping me.
>>                  Z  Morsly
>>
>> --- En date de : Mar 17.2.09, Vladimir Litvak <[log in to unmask]>
>> a
>> écrit :
>>
>> De: Vladimir Litvak <[log in to unmask]>
>> Objet: Re: conversion of continuous MEG data from the native 4D/BTi
>> formats
>> to SPM5 compatible files
>> À: [log in to unmask]
>> Date: Mardi 17 Février 2009, 18h33
>>
>> Dear Zoubir,
>>
>>
>> I'd suggest you to use SPM8b rather than SPM5 since for M/EEG data it
>> is more robust and easy to use.
>> You should make sure that you have an up-to-date version by first
>> downloading the original release from
>> http://www.fil.ion.ucl.ac.uk/spm/software/spm8b/ and then updating it
>> with the update file from
>> ftp://ftp.fil.ion.ucl.ac.uk/spm/spm8b_updates/
>>
>> You then should be able to convert your datasets by pressing the
>> 'Convert' button and choosing the raw data file (the biggest one).
>> Note that SPM8 is different in many ways from SPM5 so you should
>> follow the SPM8 manual that you can find in /man subdirectory
>> of SPM distribution.
>>
>> You can convert data as continuous or define epochs while converting.
>> Your MEG system sounds like something non-standard. I hope everything
>> will work well for you. Let me know if not.
>>
>> Best,
>>
>> Vladimir
>>
>> On Tue, Feb 17, 2009 at 5:26 PM, zoubir morsli <[log in to unmask]>
>> wrote:
>>> Dear Dr. Vladimir Litvak!
>>>
>>>   I have continuous MEG data for MEF (c,rfhpo.1Hz) on biomagnetometer
>>> with
>>> 2*37 multichannels.
>>>
>>> I have only simultaneous surface electromyography EMG Channel (muscle
>>> activity) without trigger file for MEG data epoching.
>>>
>>> It would be very kind of you if you could help me and answer the
>>> following
>>> questions:
>>>
>>> How should I manage the conversion of continuous MEG data  from the
>>> native
>>> 4D/BTi formats to SPM5 compatible files?
>>>
>>> Can the conversion happen without epoching or do I need epoching in any
>>> case?
>>>
>>>  Thank you very much for helping me.
>>>
>>>
>>>
>
>