Help with my experiment


Author
Message
Claud_l
Claud_l
Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)
Group: Forum Members
Posts: 7, Visits: 45
Hi, I am as new as the come to Inquisit and I have a script that I need to edit. The script was based on Study 1a of this paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2706319/

In the experiment I want to run, participants will make a response the the circle stimulus as they do in the script already, and then respond to whether or not they noticed a certain smell e.g. coffee. 
We will be using an olfactometer so Inquisit will send a signal to a serial port: I have figured out the code for this e.g.
// send string "3" to COM5
<port signal>
/ port = COM5
/ subport = data
/ items = ("00110011")    
</port>
// send string "2" to COM5
<port baselinesignal>
/ port = COM5
/ subport = data
/ items = ("00110010")
</port>
// send string "1" to COM5
<port responsesignal>
/ port = COM5
/ subport = data
/ items = ("00110001")
</port>
// send string "0" to COM5
<port zerosignal>
/ port = COM5
/ subport = data
/ items = ("00110000")
</port>
Then within a trial it would look like this: 1000= sequence(signal,baselinesignal,responsesignal) to turn on the smell and 1100= sequence(signal,baselinesignal,zerosignal) to turn off the smell.
the smell would need to be present on 50% of trials (24/48 trials). I also need to add in a screen participants respond to "Present' or "Absent" I have made the screen:
<text thoughtprobes>
/ items = ("Present    or      Absent
     (s)           (a)")
/ hjustify = center
/ position = (50%, 50%)
/ txcolor = black
/ txbgcolor = darkgrey
/ size = (90%, 70%)
/ fontstyle = ("Arial", 7%, false, false, false, false, 5, 1)
</text>
Participants would press "A" for absent and "S" for present. This will need to be presented on every trial and record what the responses participants made were and I am not sure how to do this.
I basically know what I want to do but am not sure how to do any of it. So any help would be really appreciated. I have uploaded the script file hopefully it works. 








Attachments
pure_pload2021_nospacebar_48.iqx (280 views, 112.00 KB)
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: 13K, Visits: 104K
Claud_l - 12/1/2021
Hi, I am as new as the come to Inquisit and I have a script that I need to edit. The script was based on Study 1a of this paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2706319/

In the experiment I want to run, participants will make a response the the circle stimulus as they do in the script already, and then respond to whether or not they noticed a certain smell e.g. coffee. 
We will be using an olfactometer so Inquisit will send a signal to a serial port: I have figured out the code for this e.g.
// send string "3" to COM5
<port signal>
/ port = COM5
/ subport = data
/ items = ("00110011")    
</port>
// send string "2" to COM5
<port baselinesignal>
/ port = COM5
/ subport = data
/ items = ("00110010")
</port>
// send string "1" to COM5
<port responsesignal>
/ port = COM5
/ subport = data
/ items = ("00110001")
</port>
// send string "0" to COM5
<port zerosignal>
/ port = COM5
/ subport = data
/ items = ("00110000")
</port>
Then within a trial it would look like this: 1000= sequence(signal,baselinesignal,responsesignal) to turn on the smell and 1100= sequence(signal,baselinesignal,zerosignal) to turn off the smell.
the smell would need to be present on 50% of trials (24/48 trials). I also need to add in a screen participants respond to "Present' or "Absent" I have made the screen:
<text thoughtprobes>
/ items = ("Present    or      Absent
     (s)           (a)")
/ hjustify = center
/ position = (50%, 50%)
/ txcolor = black
/ txbgcolor = darkgrey
/ size = (90%, 70%)
/ fontstyle = ("Arial", 7%, false, false, false, false, 5, 1)
</text>
Participants would press "A" for absent and "S" for present. This will need to be presented on every trial and record what the responses participants made were and I am not sure how to do this.
I basically know what I want to do but am not sure how to do any of it. So any help would be really appreciated. I have uploaded the script file hopefully it works. 








> I basically know what I want to do but am not sure how to do any of it.

This is not something I can work with. Please break things down into concrete questions.

Claud_l
Claud_l
Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)
Group: Forum Members
Posts: 7, Visits: 45
Okay I want to know how to make the response screen (present or absent) appear on all trials in the experiment and how to record the responses. Participants would press “a” for absent and “s” for present?
Does that make sense I’m really sorry I’m so new to this
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: 13K, Visits: 104K

Claud_l - 12/1/2021
Okay I want to know how to make the response screen (present or absent) appear on all trials in the experiment and how to record the responses. Participants would press “a” for absent and “s” for present?Does that make sense I’m really sorry I’m so new to this

Well, you need to set up an additional <trial> element that displays your "present / absent" <text> stimulus and takes "A" and "S" as responses. /branch to that trial from the respective circle task <trial> elements.

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: 13K, Visits: 104K
Dave - 12/1/2021

Claud_l - 12/1/2021
Okay I want to know how to make the response screen (present or absent) appear on all trials in the experiment and how to record the responses. Participants would press “a” for absent and “s” for present?Does that make sense I’m really sorry I’m so new to this

Well, you need to set up an additional <trial> element that displays your "present / absent" <text> stimulus and takes "A" and "S" as responses. /branch to that trial from the respective circle task <trial> elements.

Here's a very simple, self-contained example to illustrate the basic structure.
- Perform a decision task (consonant vs vowel), as a stand-in for your visual search task.
- In half the trials, a smell stimulus will be present (text stimulus serves as a stand-in for your port stimuli).
- Each decision task trial is followed by a trial asking you to indicate whether smell stimulus was present or absent during the decision trial.

<values>
/ smell_present = false
</values>

// 24 consonant trials, 24 vowel trials
<block example>
/ trials = [1-48 = noreplace(consonanttrial, voweltrial)]
</block>

// smell will be present in 12 out of 24 consonant trials
<list smell_consonant>
/ items = (true, false)
/ poolsize = 24
</list>

<trial consonanttrial>
/ ontrialbegin = [
    trial.consonanttrial.resetstimulusframes();
    values.smell_present = list.smell_consonant.nextvalue;
    if (values.smell_present) {
        trial.consonanttrial.insertstimulustime(text.mmm_coffee, 1000);
    };
]
/ stimulustimes = [0=clearscreen, fixation; 1000=consonant, c_label, v_label]
/ validresponse = ("C", "V")
/ correctresponse = ("C")
/ branch = [
    trial.smellchecktrial;
]
</trial>

// smell will be present in 12 out of 24 vowel trials
<list smell_vowel>
/ items = (true, false)
/ poolsize = 24
</list>

<trial voweltrial>
/ ontrialbegin = [
    trial.voweltrial.resetstimulusframes();
    values.smell_present = list.smell_vowel.nextvalue;
    if (values.smell_present) {
        trial.voweltrial.insertstimulustime(text.mmm_coffee, 1000);
    };
]
/ stimulustimes = [0=clearscreen, fixation; 1000=clearscreen, vowel, c_label, v_label]
/ validresponse = ("C", "V")
/ correctresponse = ("V")
/ branch = [
    trial.smellchecktrial;
]
</trial>

<trial smellchecktrial>
/ stimulusframes = [1=clearscreen, smell_question, a_label, s_label]
/ validresponse = ("A", "S")
/ iscorrectresponse = [
    (trial.smellchecktrial.response == 30 && values.smell_present == false) || (trial.smellchecktrial.response == 31 && values.smell_present == true)
]
</trial>

<text fixation>
/ items = ("+")
/ erase = false
</text>

<text consonant>
/ items = ("B", "F", "J", "P")
/ erase = false
</text>

<text vowel>
/ items = ("A", "E", "I", "O")
/ erase = false
</text>

<text c_label>
/ items = ("C = Consonant")
/ position = (20%, 80%)
/ erase = false
</text>

<text v_label>
/ items = ("V = Vowel")
/ position = (80%, 80%)
/ erase = false
</text>

<text a_label>
/ items = ("A = Smell Absent")
/ position = (20%, 80%)
/ erase = false
</text>

<text smell_question>
/ items = ("Did you smell the coffee?")
/ erase = false
</text>


<text s_label>
/ items = ("S = Smell Present")
/ position = (80%, 80%)
/ erase = false
</text>

<text mmm_coffee>
/ items = ("~~mmmmmm, tasty coffee smell~~")
/ position = (50%, 30%)
/ erase = false
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode response latency correct values.smell_present)
/ separatefiles = true
</data>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search