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 would like to add a response screen in before my fixation point appears on my trial that allows participants to press space 'when ready to inhale'.

Essentially before each trial participants would need to inhale. I have created a separate trial called Inhale:
<trial Inhale>
/ stimulustimes = [1= inhale]
/ validresponse = (anyresponse)
/ correctresponse = (57)
/ recorddata = false
</trial>

Below is an example of the main experimental trials (its very long sorry :/ ) I would want to add the screen in before fixation on stimulus times. I just don't know an easy way to do this e.g. can you branch to the Inhale trial at the beginning of the Target_present trial? or is there a way to add this screen in as a stimulus in the trial (it would need to appear for unlimited time/ until participant presses space)

I don't know if I am making any sense so sorry if I am unclear but hopefully you can understand?

thank you in advance!

<trial set6KTARGET_PRESENT>
/ ontrialbegin = [
    values.thoughtprobe="";
    values.spacebarpresscount = 0;
    values.latencies="";
    values.valid = 0;
    values.correct_high = 0;
    values.correct_low = 0;
    values.validcorrect = 0;
    values.trialcount += 1;
    values.present = "present";
    values.load ="high";]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler1K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler2K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler3K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler4K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler5K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6targetK.nextvalue,1000);]
/ ontrialbegin = [values.fillerhpos1 = list.s6filler1_hK.nextvalue]
/ ontrialbegin = [values.fillervpos1 = list.s6filler1_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos2 = list.s6filler2_hK.nextvalue]
/ ontrialbegin = [values.fillervpos2 = list.s6filler2_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos3 = list.s6filler3_hK.nextvalue]
/ ontrialbegin = [values.fillervpos3 = list.s6filler3_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos4 = list.s6filler4_hK.nextvalue]
/ ontrialbegin = [values.fillervpos4 = list.s6filler4_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos5 = list.s6filler5_hK.nextvalue]
/ ontrialbegin = [values.fillervpos5 = list.s6filler5_vK.nextvalue]
/ ontrialbegin = [values.Ktargetpos_h = list.s6target_hK.nextvalue]
/ ontrialbegin = [values.Ktargetpos_v = list.s6target_vK.nextvalue]
/ ontrialend = [
    trial.set6KTARGET_PRESENT.resetstimulusframes();]
/ stimulustimes = [1=fixation; 1000= fixationcover, text.mmm_coffee; 1100=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6, eraserleft, eraserright),text.mmm_coffee_off;
2100=text.xornscreen; 2200=textcover]
/ validresponse = (200, 203)
/ correctresponse = (200)
/ response = timeout(4000)
/ beginresponsetime = 2100
/ ontrialend = [
    if (trial.set6KTARGET_PRESENT.latency <= parameters.max_latency)
        values.valid = 1;
    if (values.valid == 1) {
        if (trial.set6KTARGET_PRESENT.response == 200) {
            values.validcorrect = 1;
            values.correct_high = 1;
            values.sumcorrect += 1;
            values.sumrt += trial.set6KTARGET_PRESENT.latency
            if (values.load == "high") {
                values.sumcorrect_highload += 1;
                values.sumrt_highload += trial.set6KTARGET_PRESENT.latency;
                list.latencies_highload.insertitem(trial.set6KTARGET_PRESENT.latency, 1);
                list.latencies.insertitem(trial.set6KTARGET_PRESENT.latency, 1);
            }
        }
    } ;
    list.accuracy.insertitem(values.validcorrect, 1);
    values.testeracc = list.accuracy.currentindex
    if (values.load == "high") {
        list.accuracy_highload.insertitem(values.validcorrect, 1);
    } else if (values.load == "low") {
        list.accuracy_lowload.insertitem(values.validcorrect, 1);
    };]
/ ontrialend = [values.TrialNum = values.TrialNum + 1]
/ branch = [trial.present]
</trial>

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 - 1/25/2022
Hi,
I would like to add a response screen in before my fixation point appears on my trial that allows participants to press space 'when ready to inhale'.

Essentially before each trial participants would need to inhale. I have created a separate trial called Inhale:
<trial Inhale>
/ stimulustimes = [1= inhale]
/ validresponse = (anyresponse)
/ correctresponse = (57)
/ recorddata = false
</trial>

Below is an example of the main experimental trials (its very long sorry :/ ) I would want to add the screen in before fixation on stimulus times. I just don't know an easy way to do this e.g. can you branch to the Inhale trial at the beginning of the Target_present trial? or is there a way to add this screen in as a stimulus in the trial (it would need to appear for unlimited time/ until participant presses space)

I don't know if I am making any sense so sorry if I am unclear but hopefully you can understand?

thank you in advance!

<trial set6KTARGET_PRESENT>
/ ontrialbegin = [
    values.thoughtprobe="";
    values.spacebarpresscount = 0;
    values.latencies="";
    values.valid = 0;
    values.correct_high = 0;
    values.correct_low = 0;
    values.validcorrect = 0;
    values.trialcount += 1;
    values.present = "present";
    values.load ="high";]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler1K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler2K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler3K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler4K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler5K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6targetK.nextvalue,1000);]
/ ontrialbegin = [values.fillerhpos1 = list.s6filler1_hK.nextvalue]
/ ontrialbegin = [values.fillervpos1 = list.s6filler1_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos2 = list.s6filler2_hK.nextvalue]
/ ontrialbegin = [values.fillervpos2 = list.s6filler2_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos3 = list.s6filler3_hK.nextvalue]
/ ontrialbegin = [values.fillervpos3 = list.s6filler3_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos4 = list.s6filler4_hK.nextvalue]
/ ontrialbegin = [values.fillervpos4 = list.s6filler4_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos5 = list.s6filler5_hK.nextvalue]
/ ontrialbegin = [values.fillervpos5 = list.s6filler5_vK.nextvalue]
/ ontrialbegin = [values.Ktargetpos_h = list.s6target_hK.nextvalue]
/ ontrialbegin = [values.Ktargetpos_v = list.s6target_vK.nextvalue]
/ ontrialend = [
    trial.set6KTARGET_PRESENT.resetstimulusframes();]
/ stimulustimes = [1=fixation; 1000= fixationcover, text.mmm_coffee; 1100=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6, eraserleft, eraserright),text.mmm_coffee_off;
2100=text.xornscreen; 2200=textcover]
/ validresponse = (200, 203)
/ correctresponse = (200)
/ response = timeout(4000)
/ beginresponsetime = 2100
/ ontrialend = [
    if (trial.set6KTARGET_PRESENT.latency <= parameters.max_latency)
        values.valid = 1;
    if (values.valid == 1) {
        if (trial.set6KTARGET_PRESENT.response == 200) {
            values.validcorrect = 1;
            values.correct_high = 1;
            values.sumcorrect += 1;
            values.sumrt += trial.set6KTARGET_PRESENT.latency
            if (values.load == "high") {
                values.sumcorrect_highload += 1;
                values.sumrt_highload += trial.set6KTARGET_PRESENT.latency;
                list.latencies_highload.insertitem(trial.set6KTARGET_PRESENT.latency, 1);
                list.latencies.insertitem(trial.set6KTARGET_PRESENT.latency, 1);
            }
        }
    } ;
    list.accuracy.insertitem(values.validcorrect, 1);
    values.testeracc = list.accuracy.currentindex
    if (values.load == "high") {
        list.accuracy_highload.insertitem(values.validcorrect, 1);
    } else if (values.load == "low") {
        list.accuracy_lowload.insertitem(values.validcorrect, 1);
    };]
/ ontrialend = [values.TrialNum = values.TrialNum + 1]
/ branch = [trial.present]
</trial>

> I just don't know an easy way to do this e.g. can you branch to the Inhale trial at the beginning of the Target_present trial?

No. Since the inhale trial is supposed to precede the target_present trial, you need to do it the other way around. The program cannot go backwards in time.
From the inhale trial, /branch to the target_present trial.

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
Dave - 1/25/2022
Claud_l - 1/25/2022
Hi,
I would like to add a response screen in before my fixation point appears on my trial that allows participants to press space 'when ready to inhale'.

Essentially before each trial participants would need to inhale. I have created a separate trial called Inhale:
<trial Inhale>
/ stimulustimes = [1= inhale]
/ validresponse = (anyresponse)
/ correctresponse = (57)
/ recorddata = false
</trial>

Below is an example of the main experimental trials (its very long sorry :/ ) I would want to add the screen in before fixation on stimulus times. I just don't know an easy way to do this e.g. can you branch to the Inhale trial at the beginning of the Target_present trial? or is there a way to add this screen in as a stimulus in the trial (it would need to appear for unlimited time/ until participant presses space)

I don't know if I am making any sense so sorry if I am unclear but hopefully you can understand?

thank you in advance!

<trial set6KTARGET_PRESENT>
/ ontrialbegin = [
    values.thoughtprobe="";
    values.spacebarpresscount = 0;
    values.latencies="";
    values.valid = 0;
    values.correct_high = 0;
    values.correct_low = 0;
    values.validcorrect = 0;
    values.trialcount += 1;
    values.present = "present";
    values.load ="high";]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler1K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler2K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler3K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler4K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler5K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6targetK.nextvalue,1000);]
/ ontrialbegin = [values.fillerhpos1 = list.s6filler1_hK.nextvalue]
/ ontrialbegin = [values.fillervpos1 = list.s6filler1_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos2 = list.s6filler2_hK.nextvalue]
/ ontrialbegin = [values.fillervpos2 = list.s6filler2_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos3 = list.s6filler3_hK.nextvalue]
/ ontrialbegin = [values.fillervpos3 = list.s6filler3_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos4 = list.s6filler4_hK.nextvalue]
/ ontrialbegin = [values.fillervpos4 = list.s6filler4_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos5 = list.s6filler5_hK.nextvalue]
/ ontrialbegin = [values.fillervpos5 = list.s6filler5_vK.nextvalue]
/ ontrialbegin = [values.Ktargetpos_h = list.s6target_hK.nextvalue]
/ ontrialbegin = [values.Ktargetpos_v = list.s6target_vK.nextvalue]
/ ontrialend = [
    trial.set6KTARGET_PRESENT.resetstimulusframes();]
/ stimulustimes = [1=fixation; 1000= fixationcover, text.mmm_coffee; 1100=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6, eraserleft, eraserright),text.mmm_coffee_off;
2100=text.xornscreen; 2200=textcover]
/ validresponse = (200, 203)
/ correctresponse = (200)
/ response = timeout(4000)
/ beginresponsetime = 2100
/ ontrialend = [
    if (trial.set6KTARGET_PRESENT.latency <= parameters.max_latency)
        values.valid = 1;
    if (values.valid == 1) {
        if (trial.set6KTARGET_PRESENT.response == 200) {
            values.validcorrect = 1;
            values.correct_high = 1;
            values.sumcorrect += 1;
            values.sumrt += trial.set6KTARGET_PRESENT.latency
            if (values.load == "high") {
                values.sumcorrect_highload += 1;
                values.sumrt_highload += trial.set6KTARGET_PRESENT.latency;
                list.latencies_highload.insertitem(trial.set6KTARGET_PRESENT.latency, 1);
                list.latencies.insertitem(trial.set6KTARGET_PRESENT.latency, 1);
            }
        }
    } ;
    list.accuracy.insertitem(values.validcorrect, 1);
    values.testeracc = list.accuracy.currentindex
    if (values.load == "high") {
        list.accuracy_highload.insertitem(values.validcorrect, 1);
    } else if (values.load == "low") {
        list.accuracy_lowload.insertitem(values.validcorrect, 1);
    };]
/ ontrialend = [values.TrialNum = values.TrialNum + 1]
/ branch = [trial.present]
</trial>

> I just don't know an easy way to do this e.g. can you branch to the Inhale trial at the beginning of the Target_present trial?

No. Since the inhale trial is supposed to precede the target_present trial, you need to do it the other way around. The program cannot go backwards in time.
From the inhale trial, /branch to the target_present trial.


Thanks Dave, Is there not an easier way to add a screen in though e.g. as a stimulus in my trial or for example in a block I have 48 trials so I write trials =1-48 list.set6trials, I want the inhale screen to appear before every trial would that mean I then have to write out out 1 =Inhale; 2=list.set6trials; 3 etc. This would take ages wouldn't it?

Edited 2 Years Ago 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: 13K, Visits: 104K
Claud_l - 1/25/2022
Dave - 1/25/2022
Claud_l - 1/25/2022
Hi,
I would like to add a response screen in before my fixation point appears on my trial that allows participants to press space 'when ready to inhale'.

Essentially before each trial participants would need to inhale. I have created a separate trial called Inhale:
<trial Inhale>
/ stimulustimes = [1= inhale]
/ validresponse = (anyresponse)
/ correctresponse = (57)
/ recorddata = false
</trial>

Below is an example of the main experimental trials (its very long sorry :/ ) I would want to add the screen in before fixation on stimulus times. I just don't know an easy way to do this e.g. can you branch to the Inhale trial at the beginning of the Target_present trial? or is there a way to add this screen in as a stimulus in the trial (it would need to appear for unlimited time/ until participant presses space)

I don't know if I am making any sense so sorry if I am unclear but hopefully you can understand?

thank you in advance!

<trial set6KTARGET_PRESENT>
/ ontrialbegin = [
    values.thoughtprobe="";
    values.spacebarpresscount = 0;
    values.latencies="";
    values.valid = 0;
    values.correct_high = 0;
    values.correct_low = 0;
    values.validcorrect = 0;
    values.trialcount += 1;
    values.present = "present";
    values.load ="high";]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler1K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler2K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler3K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler4K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6filler5K.nextvalue,1000);]
/ ontrialbegin = [
    trial.set6KTARGET_PRESENT.insertstimulustime(list.s6targetK.nextvalue,1000);]
/ ontrialbegin = [values.fillerhpos1 = list.s6filler1_hK.nextvalue]
/ ontrialbegin = [values.fillervpos1 = list.s6filler1_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos2 = list.s6filler2_hK.nextvalue]
/ ontrialbegin = [values.fillervpos2 = list.s6filler2_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos3 = list.s6filler3_hK.nextvalue]
/ ontrialbegin = [values.fillervpos3 = list.s6filler3_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos4 = list.s6filler4_hK.nextvalue]
/ ontrialbegin = [values.fillervpos4 = list.s6filler4_vK.nextvalue]
/ ontrialbegin = [values.fillerhpos5 = list.s6filler5_hK.nextvalue]
/ ontrialbegin = [values.fillervpos5 = list.s6filler5_vK.nextvalue]
/ ontrialbegin = [values.Ktargetpos_h = list.s6target_hK.nextvalue]
/ ontrialbegin = [values.Ktargetpos_v = list.s6target_vK.nextvalue]
/ ontrialend = [
    trial.set6KTARGET_PRESENT.resetstimulusframes();]
/ stimulustimes = [1=fixation; 1000= fixationcover, text.mmm_coffee; 1100=sequence (eraser1, eraser2, eraser3, eraser4, eraser5, eraser6, eraserleft, eraserright),text.mmm_coffee_off;
2100=text.xornscreen; 2200=textcover]
/ validresponse = (200, 203)
/ correctresponse = (200)
/ response = timeout(4000)
/ beginresponsetime = 2100
/ ontrialend = [
    if (trial.set6KTARGET_PRESENT.latency <= parameters.max_latency)
        values.valid = 1;
    if (values.valid == 1) {
        if (trial.set6KTARGET_PRESENT.response == 200) {
            values.validcorrect = 1;
            values.correct_high = 1;
            values.sumcorrect += 1;
            values.sumrt += trial.set6KTARGET_PRESENT.latency
            if (values.load == "high") {
                values.sumcorrect_highload += 1;
                values.sumrt_highload += trial.set6KTARGET_PRESENT.latency;
                list.latencies_highload.insertitem(trial.set6KTARGET_PRESENT.latency, 1);
                list.latencies.insertitem(trial.set6KTARGET_PRESENT.latency, 1);
            }
        }
    } ;
    list.accuracy.insertitem(values.validcorrect, 1);
    values.testeracc = list.accuracy.currentindex
    if (values.load == "high") {
        list.accuracy_highload.insertitem(values.validcorrect, 1);
    } else if (values.load == "low") {
        list.accuracy_lowload.insertitem(values.validcorrect, 1);
    };]
/ ontrialend = [values.TrialNum = values.TrialNum + 1]
/ branch = [trial.present]
</trial>

> I just don't know an easy way to do this e.g. can you branch to the Inhale trial at the beginning of the Target_present trial?

No. Since the inhale trial is supposed to precede the target_present trial, you need to do it the other way around. The program cannot go backwards in time.
From the inhale trial, /branch to the target_present trial.


Thanks Dave, Is there not an easier way to add a screen in though e.g. as a stimulus in my trial or for example in a block I have 48 trials so I write trials =1-48 list.set6trials, I want the inhale screen to appear before every trial would that mean I then have to write out out 1 =Inhale; 2=list.set6trials; 3 etc. This would take ages wouldn't it?

No, it does not mean that. You could simply do

<block set5block>
/ trials = [1-48 = inhale]
</block>

<block set6block>
/ trials = [1-48 = inhale]
</block>

with

<trial inhale>
...
/ branch = [if (script.currentblock == "set5block") {
    list.set5trials.nextvalue;
    } else if (script.currentblock == "set6block") {
    list.set6trials.nextvalue;
   };
]
</trial>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search