Print

Print


Dear Pari,

On Sun, Oct 18, 2015 at 5:21 AM, pari eghbali <[log in to unmask]>
wrote:

> Dear vladimir,
>
>
> Thank you for response. I could not find solution and I prefer to ask my
> questions with more detail. I would be appreciated to have your answers
> about them.
>
>
> I have ECoG signals recorded from 64 channels with 5 different stimuli and
> 100 trials in each channel stored in .mat file. I need to change my data
> format according to 3 dimensions as data (channel, data point, number of
> trials) in order to import it in “spm_eeg_convert_arbitrary_data.m”.  After
> format conversion, for trial definition in “prep”, I have some problems:
>
> 1)      1- For my data, number of trials in each condition is 20 but GUI
> brings me 100, how can I define trial value for spm?
>

It looks like your trial type is not encoded in the file so all off your
triggers are shown as the same type. You could epoch your dataset with that
one trigger type and then if you know the correct order of conditions you
could re-label your trials. One way to do it is to use the reviewing tool,
just make a list of labels in Excel and copy and paste into the trial type
column there, press 'update' and 'save'. Another way is:

D = spm_eeg_load
D = conditions(D, ':', lbl);
save(D);

where lbl is an array of labels.


> 2)      2- What is “time shift in trial definition”?
>

It is sometimes useful  to shift time zero in peri-stimulus time with
respect to the trigger (e.g. if there is a projector delay).

> 3)      3- Is it necessary to have trial definition file for DCM analysis?
>

DCM expects epoched or averaged data so you need an epoched dataset as
input.

Best,

Vladimir

>
> On Fri, Oct 16, 2015 at 5:13 PM, Vladimir Litvak <
> [log in to unmask]> wrote:
>
>> Dear Pari,
>>
>> You should know at which samples of your recording the stimuli occur. If
>> you know that, you can either segment your data around triggers in your own
>> code and make trials or convert your data as continuous and then epoch it
>> with spm_eeg_epochs and a trial definition file as described on p. 108 of
>> the manual.
>>
>> Best,
>>
>> Vladimir
>>
>> On Fri, Oct 16, 2015 at 9:59 AM, pari eghbali <[log in to unmask]>
>> wrote:
>>
>>> Hello,
>>>
>>> my raw data has two dimensions (row=data points of 5 different stimuli ,
>>> column=64 channel). the format of the data is .mat. In
>>> spm_eeg_convert_arbitrary file, the data has three dimensions (
>>> ftdata.trial(i)= squeeze (data(:,:,i)) !!!
>>>
>>> what is the third dimension of data? how can I define it?
>>>
>>> thank you for any response,
>>> best,
>>> pari
>>>
>>> On Thu, Oct 15, 2015 at 1:41 PM, Vladimir Litvak <
>>> [log in to unmask]> wrote:
>>>
>>>> Dear Pari,
>>>>
>>>> Trial definition can be done based on triggers or using the 'trl'
>>>> matrix built with your own code. See the manual for details. Yes, you
>>>> should have both conditions in the same dataset to model them together with
>>>> DCM.
>>>>
>>>> Best,
>>>>
>>>> Vladimir
>>>>
>>>> On Thu, Oct 15, 2015 at 7:16 AM, pari eghbali <[log in to unmask]
>>>> > wrote:
>>>>
>>>>> Dear Vladimir,
>>>>> I want to examine modulation of effective connectivity by DCM
>>>>> algorithm during 100 repetitions of same stimulation in ECoG signals.
>>>>> Actually , the condition (20 stimuli vs. 100 stimuli) effects would
>>>>> be modelled by connectivity changes in the B matrix. How can I prepare
>>>>> trial definition in spm? should I concatenate two conditions to each other
>>>>> ?
>>>>> I would be really appreciated if you help me on this matter.
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Oct 12, 2015 at 10:17 PM, Vladimir Litvak <
>>>>> [log in to unmask]> wrote:
>>>>>
>>>>>> The part about callback is not important. There is some mismatch in
>>>>>> dimensionality. You should try to figure out why by putting a breakpoint in
>>>>>> spm_dcm_csd_data.
>>>>>>
>>>>>> Vladimir
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 13 Oct 2015, at 05:24, pari eghbali <[log in to unmask]>
>>>>>> wrote:
>>>>>>
>>>>>> Dear Vladimir,
>>>>>>
>>>>>> I changed the type of channel according to your suggestion and
>>>>>> parameterized DCM model according to rat anaesthesia data example (
>>>>>> neuronal model 'CMC' and spatial model 'LFP') but I got this error:
>>>>>>
>>>>>> Error using feval
>>>>>> Undefined function 'Slocation_Callback' for input arguments of type
>>>>>> 'struct'.
>>>>>> evaluating CSD for condition 1
>>>>>> Error using  ./
>>>>>> Matrix dimensions must agree.
>>>>>>
>>>>>> Thank you,
>>>>>> Pari
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sun, Oct 11, 2015 at 8:22 AM, Vladimir Litvak <
>>>>>> [log in to unmask]> wrote:
>>>>>>
>>>>>>> You should set the channel types of channels 20 and 50 to 'LFP' and
>>>>>>> that of the rest of the channels to 'Other'. Then specify 'LFP' as the
>>>>>>> spatial model and the names of the channels as source names. See the rat
>>>>>>> anaesthesia data example in the manual.
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Vladimir
>>>>>>>
>>>>>>> On Sun, Oct 11, 2015 at 9:00 PM, pari eghbali <
>>>>>>> [log in to unmask]> wrote:
>>>>>>>
>>>>>>>> Thank you for your help.
>>>>>>>> I have one more question! In 64 channels I want to find
>>>>>>>> connectivity between channel 20 and channel 50. How can I define those
>>>>>>>> areas in electromagnetic model of DCM? Should I define source location (
>>>>>>>> dimension of 64 channels) in Prep?
>>>>>>>> Thank you again for your prompt reply,
>>>>>>>> Best,
>>>>>>>> Arezoo
>>>>>>>>
>>>>>>>> On Sun, Oct 11, 2015 at 6:58 AM, Vladimir Litvak <
>>>>>>>> [log in to unmask]> wrote:
>>>>>>>>
>>>>>>>>> Dear Pari,
>>>>>>>>>
>>>>>>>>> The channel data should be in the dat file. I think the example
>>>>>>>>> script has a data variable which you can replace with your own data.
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>>
>>>>>>>>> Vladimir
>>>>>>>>>
>>>>>>>>> On Sun, Oct 11, 2015 at 7:37 PM, pari eghbali <
>>>>>>>>> [log in to unmask]> wrote:
>>>>>>>>>
>>>>>>>>>> Hello
>>>>>>>>>> I am currently working with ECoG channel signals to investigate
>>>>>>>>>> brain effective connectivity(DCM). I used a sample script of LFP to convert
>>>>>>>>>> my data format to spm format. It gave me two format files:.dat and .mat. It
>>>>>>>>>> seems both of them have header information since there was not any function
>>>>>>>>>> in sample script to import my data. I am wondering to know where should I
>>>>>>>>>> import the channel signals?
>>>>>>>>>>
>>>>>>>>>> Thank you,
>>>>>>>>>> Pari
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>