How write the stimulus filename to the result file


Author
Message
Jens Bölte
Jens Bölte
Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)
Group: Forum Members
Posts: 78, Visits: 60
Hello

I am using the following code to switch between two different stimulus files based on the subject.id:
<include>
/precondition = [mod(script.subjectid,2) == 0]
/file = "Stimuli1.iqx"
</include>

<include>
/precondition = [mod(script.subjectid,2) > 0]
/file = "Stimuli2.iqx"
</include>

How do I store the stimulus-filename in the result? Adding the include property include.file to the columns-specification of the data element did not work. All suggestions are welcome.

Best wishes Jens


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
jens - Thursday, January 11, 2018
Hello

I am using the following code to switch between two different stimulus files based on the subject.id:
<include>
/precondition = [mod(script.subjectid,2) == 0]
/file = "Stimuli1.iqx"
</include>

<include>
/precondition = [mod(script.subjectid,2) > 0]
/file = "Stimuli2.iqx"
</include>

How do I store the stimulus-filename in the result? Adding the include property include.file to the columns-specification of the data element did not work. All suggestions are welcome.

Best wishes Jens


You can use the same logic as in your /precondition attributes /onexptbegin to write the information to a <values> entry. Then log that value to the data file.

<values>
/ stimulusfile = ""
</values>

<expt>
/ onexptbegin = [if (mod(script.subjectid,2) == 0) values.stimulusfile = "Stimuli1.iqx" else values.stimulusfile = "Stimuli2.iqx"]
...
</expt>

...
<data>
/ columns = [..., values.stimulusfile, ...]
...
</data>

Jens Bölte
Jens Bölte
Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)Guru (9.4K reputation)
Group: Forum Members
Posts: 78, Visits: 60
Dave - Thursday, January 11, 2018
jens - Thursday, January 11, 2018
Hello

I am using the following code to switch between two different stimulus files based on the subject.id:
<include>
/precondition = [mod(script.subjectid,2) == 0]
/file = "Stimuli1.iqx"
</include>

<include>
/precondition = [mod(script.subjectid,2) > 0]
/file = "Stimuli2.iqx"
</include>

How do I store the stimulus-filename in the result? Adding the include property include.file to the columns-specification of the data element did not work. All suggestions are welcome.

Best wishes Jens


You can use the same logic as in your /precondition attributes /onexptbegin to write the information to a <values> entry. Then log that value to the data file.

<values>
/ stimulusfile = ""
</values>

<expt>
/ onexptbegin = [if (mod(script.subjectid,2) == 0) values.stimulusfile = "Stimuli1.iqx" else values.stimulusfile = "Stimuli2.iqx"]
...
</expt>

...
<data>
/ columns = [..., values.stimulusfile, ...]
...
</data>

Thanks.

Best wishes Jens

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search