How write the stimulus filename to the result file


How write the stimulus filename to the result file

Author
Message
jens
jens
Distinguished Member
Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)

Group: Forum Members
Posts: 74, Visits: 54
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
Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)

Group: Administrators
Posts: 8.9K, Visits: 37K
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
jens
Distinguished Member
Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)Distinguished Member (3.6K reputation)

Group: Forum Members
Posts: 74, Visits: 54
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


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search