Need help with me Experiment!


Author
Message
Claud_l
Claud_l
Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)
Group: Forum Members
Posts: 7, Visits: 45
Hello there, I have very limited experience with Inquisit and am looking for advice


The idea here is participants would complete 48 trials per block. They would complete a letter search on each trial where they have to indicate whether the target letter x or n was present by pressing the up and right arrow key. The letter search is varied on load e.g., one block could be high or it could be low load.

In my previous experiment we added a smell into these trials using Inquisit where a smell would be presented for the same time as the letter display, once participants made their response to the letter task I branched to the present or absent trial where they would indicate if the smell was present or absent with the p or a keys. 

In the new experiment participants will not know when the smell is going to be presented/unpredictable and the idea would be to have 5 different intensities of the same smell presented for 2 seconds in succession, the onset of the smells would start at the same time as the letter display in a random trial on each block and would carry on into other trials until participant responded or until the 10 seconds were over, so response would be measured from the moment the first smell begins even though this could be several trials later <- this is the bit I need help with! 

I guess what I am asking is is it possible on Inquisit to have trials running parallel e.g. the smell trial and the letter task trial. The smell trials would last 10 seconds and 
whereas the letter task trials would only last 2.6 seconds and I would need to record the response to the presence of the smell and the response to the letter task.

I am sorry if this does not make sense and thanks for any help!!




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
Claud_l - 2/2/2023
Hello there, I have very limited experience with Inquisit and am looking for advice


The idea here is participants would complete 48 trials per block. They would complete a letter search on each trial where they have to indicate whether the target letter x or n was present by pressing the up and right arrow key. The letter search is varied on load e.g., one block could be high or it could be low load.

In my previous experiment we added a smell into these trials using Inquisit where a smell would be presented for the same time as the letter display, once participants made their response to the letter task I branched to the present or absent trial where they would indicate if the smell was present or absent with the p or a keys. 

In the new experiment participants will not know when the smell is going to be presented/unpredictable and the idea would be to have 5 different intensities of the same smell presented for 2 seconds in succession, the onset of the smells would start at the same time as the letter display in a random trial on each block and would carry on into other trials until participant responded or until the 10 seconds were over, so response would be measured from the moment the first smell begins even though this could be several trials later <- this is the bit I need help with! 

I guess what I am asking is is it possible on Inquisit to have trials running parallel e.g. the smell trial and the letter task trial. The smell trials would last 10 seconds and 
whereas the letter task trials would only last 2.6 seconds and I would need to record the response to the presence of the smell and the response to the letter task.

I am sorry if this does not make sense and thanks for any help!!




> I guess what I am asking is is it possible on Inquisit to have trials running parallel e.g. the smell trial and the letter task trial.

No, it is not possible to have trials run in parallel, so unfortunately I don't think this is doable.

Claud_l
Claud_l
Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)Associate Member (79 reputation)
Group: Forum Members
Posts: 7, Visits: 45
Thank you for your quick reply, are you aware of anything I could do to make this possible or potentially other software that allows me to do 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: 12K, Visits: 98K
Claud_l - 2/2/2023
Thank you for your quick reply, are you aware of anything I could do to make this possible or potentially other software that allows me to do this

What you'd basically  have to do, which will be very finicky, is have the letter search trials present both the smell intensities and collect responses for both the letter search and the smell detection, across multiple trials (starting from whatever random letter search trial initiates the smell). I.e. once you've determined the trial that's supposed to intiiate the smell, dynamically insert the 1st smell intensity stimulus at t0 in that trial and the 2nd intensity at t2000, in the following trial, insert the 3rd intensity at t1400, i.e. 2000 ms after the 2nd intensity was triggered in the previous trial. Then in the next trial, the 4th intensity ought to be inserted at t800, and in the search trial after, the 5th and final intensity at t200.

Schematically:
absolute time
smell: 00000----------02000----------04000----------06000----------08000
i1 i2 i3 i4 i5
search: 00000-------------02600-------------05200-------------07800-------------10400
trial 1 trial 2 trial 3 trial 4 trial 5

relative time
smell: 00000----------02000----------01400----------00800----------00200
i1 i2 i3 i4 i5
search: 00000-------------00000-------------00000-------------00000-------------00000
trial 1 trial 2 trial 3 trial 4 trial 5


Throughout it all, you'd have to use /isvalidresponse logic to collect responses for both the letter search (target present vs target absent) and the smell detection. If the smell has been detected successfully in any of the trials, you would obviously not move on to present further smell intensity levels.

The above is probably doable, but it's not entirely straightforward or easy.

I cannot speak to other software.

Edited Last Year by Dave
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
Dave - 2/2/2023
Claud_l - 2/2/2023
Thank you for your quick reply, are you aware of anything I could do to make this possible or potentially other software that allows me to do this

What you'd basically  have to do, which will be very finicky, is have the letter search trials present both the smell intensities and collect responses for both the letter search and the smell detection, across multiple trials (starting from whatever random letter search trial initiates the smell). I.e. once you've determined the trial that's supposed to intiiate the smell, dynamically insert the 1st smell intensity stimulus at t0 in that trial and the 2nd intensity at t2000, in the following trial, insert the 3rd intensity at t1400, i.e. 2000 ms after the 2nd intensity was triggered in the previous trial. Then in the next trial, the 4th intensity ought to be inserted at t800, and in the search trial after, the 5th and final intensity at t200.

Schematically:
absolute time
smell: 00000----------02000----------04000----------06000----------08000
i1 i2 i3 i4 i5
search: 00000-------------02600-------------05200-------------07800-------------10400
trial 1 trial 2 trial 3 trial 4 trial 5

relative time
smell: 00000----------02000----------01400----------00800----------00200
i1 i2 i3 i4 i5
search: 00000-------------00000-------------00000-------------00000-------------00000
trial 1 trial 2 trial 3 trial 4 trial 5


Throughout it all, you'd have to use /isvalidresponse logic to collect responses for both the letter search (target present vs target absent) and the smell detection. If the smell has been detected successfully in any of the trials, you would obviously not move on to present further smell intensity levels.

The above is probably doable, but it's not entirely straightforward or easy.

I cannot speak to other software.

Here's an example to illustrate the general idea outlined above.

<parameters>
/ targetpresentkey = "P"
/ targetabsentkey = "A"
/ smellpresentkey = "S"
</parameters>

<values>
/ isTargetPresent = 0
/ isSmellPresent = 0
/ targetitem = 0
/ searchtrialcount = 0
/ letter_search_response = 0
/ letter_search_latency = -1
/ letter_search_correct = 0
/ smelltrialcount = 0
/ smellinittrial = 0
/ smellinittime = 0
/ smelldetected = false
/ smelldetectiontime = -1
/ smellfalsealarm = false
/ smelldetectionlatency = -1
</values>

<list targetpresent>
/ items = (0, 1)
/ poolsize = 48
</list>

<trial letter_search>
/ ontrialbegin = [
    // reset stimulus presentation sequence to original state
    trial.letter_search.resetstimulusframes();
    // increase trial counter
    values.searchtrialcount += 1;
    // reset some variables
    values.smellfalsealarm = 0;
    values.letter_search_response = 0;
    values.letter_search_latency = 0;
    values.letter_search_correct = 0;
    // determine if letter search target is present
    values.isTargetPresent = list.targetpresent.nextvalue;
    values.targetitem = values.isTargetPresent + 1;
    // check if we ought to initiate the smell in this trial
    if (values.searchtrialcount == values.smellinittrial) {
        values.isSmellPresent = true; // set smell presence flag to true
        values.smellinittime = script.elapsedtime; // record the time
    };
    // count the "smell" trials
    if (values.isSmellPresent) {
        values.smelltrialcount += 1;
    };
    // after we're done with the "smell" trials
    if (values.smelltrialcount > 4) {
        values.isSmellPresent = false; // set the smell presence flag back to false
        values.smelltrialcount = 0;
    };
    // insert the different smell intensities at the appropriate times across 4 consecutive trials,
    // such that there's an approx. 2000ms gap between consecutive intensity levels
    if (values.smelltrialcount == 1 && values.smelldetected == false) {
        trial.letter_search.insertstimulustime(text.smellintensity1, 0);
        trial.letter_search.insertstimulustime(text.smellintensity2, 2000);
    } else if (values.smelltrialcount == 2 && values.smelldetected == false) {
        trial.letter_search.insertstimulustime(text.smellintensity3, 1400);
    } else if (values.smelltrialcount == 3 && values.smelldetected == false) {
        trial.letter_search.insertstimulustime(text.smellintensity4, 800);
    } else if (values.smelltrialcount == 4 && values.smelldetected == false) {
        trial.letter_search.insertstimulustime(text.smellintensity5, 200);
    };
]

/ stimulustimes = [0=letter_string, debug]
/ validresponse = (parameters.targetpresentkey, parameters.targetabsentkey, parameters.smellpresentkey)
/ isvalidresponse = [
    // is smell is present and participant indicates so
    if (values.isSmellPresent == true && trial.letter_search.responsetext == parameters.smellpresentkey) {
        values.smelldetected = true; // set the detection flag to true
        values.smelldetectiontime = script.elapsedtime; // record the time of the detection
        if (values.smelldetectiontime > 0) {
            values.smelldetectionlatency = values.smelldetectiontime - values.smellinittime; // calculate the latency as difference between detection and initiation time
        };
        return false;
    };
    // if smell is absent, but participant indicates presence of smell nonetheless
    if (values.isSmellPresent == false && trial.letter_search.responsetext == parameters.smellpresentkey) {
        values.smellfalsealarm = true; // we have a false alarm
        return false;
    };
    // deal with the responses to the main letter search task
    if (trial.letter_search.responsetext == parameters.targetpresentkey || trial.letter_search.responsetext == parameters.targetabsentkey) {
        values.letter_search_response = trial.letter_search.responsetext;
        values.letter_search_latency = trial.letter_search.latency;
        if ((values.isTargetPresent == true && trial.letter_search.responsetext == parameters.targetpresentkey) || (values.isTargetPresent == false && trial.letter_search.responsetext == parameters.targetabsentkey)){
            values.letter_search_correct = true;
        };
        return false;
    };
]
/ beginresponsetime = 0
/ trialduration = 2600
</trial>


<text letter_string>
/ items = ("Target is absent", "Target is present")
/ select = values.targetitem
</text>

<text debug>
/ items = ("Trial #<%values.searchtrialcount%>")
/ txcolor = red
/ erase = false
/ position = (50%, 90%)
</text>

<text smellintensity1>
/ items = ("SMELL INTENSITY 1")
/ txcolor = red
/ erase = false
/ position = (50%, 10%)
</text>

<text smellintensity2>
/ items = ("SMELL INTENSITY 2")
/ txcolor = red
/ erase = false
/ position = (50%, 10%)
</text>

<text smellintensity3>
/ items = ("SMELL INTENSITY 3")
/ txcolor = red
/ erase = false
/ position = (50%, 10%)
</text>

<text smellintensity4>
/ items = ("SMELL INTENSITY 4")
/ txcolor = red
/ erase = false
/ position = (50%, 10%)
</text>

<text smellintensity5>
/ items = ("SMELL INTENSITY 5")
/ txcolor = red
/ erase = false
/ position = (50%, 10%)
</text>

<block exampleblock>
/ onblockbegin = [
    values.smellinittrial = round(rand(7, 20)); // pick random trial that should initiate the smell
]
/ trials = [1-48 = letter_search]
</block>

<data>
/ columns = (date time subject group session blocknum blockcode trialnum trialcode
    values.isTargetPresent values.letter_search_response values.letter_search_latency values.letter_search_correct
    values.isSmellPresent values.smelldetected values.smellinittime values.smelldetectiontime values.smelldetectionlatency
    values.smellfalsealarm values.smellinittrial values.smelltrialcount)
</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