Dear Lotus,
On Sun, May 27, 2012 at 5:09 AM, jo-fu lotus lin
<[log in to unmask]> wrote:
> For the Neurmag122 data set, I am still trying to combine analog triggers
> into one composite trigger number. Here are the three approaches I have
> been trying. Could you please give me some suggestions on how to proceed?
>
> [1] Modify "events" structure after [Convert]:
>
> D1=spm_eeg_load('spm8_HirAdditionEJ1raw.mat')
>
> I used the event file from MNE suite (HirAdditionJJ1raw_eve1.txt; attached),
> and then modify the trigger values (or, the last column) based on reaction
> times and created 'HirAdditionJJ1raw_eve2.txt' (attached). For SPM, I was
> planning to remove the D1.events field, and then assign new values to the
> D1.events field based on 'HirAdditionJJ1raw_eve2.txt'. That is, use the
> second column in 'HirAdditionJJ1raw_eve2.txt' for D1.events.time, use the
> last column in 'HirAdditionJJ1raw_eve2.txt' for D1.events.value, use [] for
> events.duration, '0' for events.offset, and an arbitrary name 'STI 014' for
> D1.events.name.
>
> However, when I tried rmfield(D1, 'events'), I got the following message.
> ####################
> Error using rmfield (line 37)
> A field named 'events' doesn't exist.
>
> Error in meeg/rmfield (line 10)
> this.other = rmfield(this.other, fields);
> #####################
>
>
> I also tried to overwrite the D1.events field by assigning a new field
> eventsNew. When I used D1.events=eventsNew (after defining eventsNew.type,
> eventsNew.value, eventsNew.duration, eventsNew.time, eventsNew.offset as
> described above), I got the following error.
> ######################
> Error using meeg/subsasgn (line 19)
> meeg method names cannot be used for custom fields
> ######################
>
>
> Is there a way I can modify the "D1.events" field?
>
Try:
D1 = events(D1, 1, eventsNew);
save(D1);
>
> [2] Modify "trl" and "conditionlabels" before [Epoching]
>
> I used the first column in "HirAdditionJJ1raw_eve2.txt" to define the first
> column in trl. Then, I used the last column in "HirAdditionJJ1raw_eve2.txt"
> to define conditionlabels.
>
> S.D='ffspm8_HirAdditionEJ1raw.mat'
> S.epochinfo.trl =trl;
> S.epochinfo.conditionlabels=conditionlabels;
> spm_eeg_epochs(S)
>
> I got the following message, but I suppose it does not affect the epoching
> process, right?
Yes, it's normal.
> ###################
> In spm_eeg_epochs at 175 checkmeeg: data type is missing or incorrect,
> assigning default
> ###################
>
>
> The above spm_eeg_epochs(S) looks like working. But, I'd like to confirm
> what should be included in this trl matrix. In spm_eeg_epoch.m, the comment
> says "trl is a Nx2 or Nx3 matrix (N - number of trials); [start end
> offset]". Are values in the [start end offset] columns in the unit of
> sampling points?
>
> I am not sure what I should assign to the "end" column. Does "start" refer
> to "up" (voltage goes from low to high), and "end" refer to "down" (voltage
> goes from high to low) in a given trigger channel? Also, what does offset
> refer to (the third column is always -50 in this example)?
>
See the manual page 109.
>
> [3] Use mne_make_combined_event_file from MNE suite?
>
> There is a function called "mne_make_combined_event_file.m" for combining
> separate trigger channels (STI 001 ... STI 006) into one number. Is there a
> way to integrate this function into SPM i/o routines?
>
>
I'm not familiar with this function but if it outputs a fif file with
a new kind of events you can try reading it and seeing whether these
events show up in SPM and make sense to you.
Best,
Vladimir
|