EEG trigger issues


Author
Message
JM776
JM776
New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)
Group: Forum Members
Posts: 2, Visits: 7
Hi there!

I was wondering if anyone could please help me out with a couple of EEG triggers I need for my dot-probe task. I can get all the triggers to work except two of them- congrugentmarker and incongrugentmarker. I cannot get these markers to work in the lab (which uses Inquisit 5), but I am able to have the script successfully validate on my personal laptop using inquisit 6, although I do not have access to EEG equipment for my personal laptop to fully test if the script is successful with inquisit 6.

I also tried using code from this forum post as an example https://www.millisecond.com/forums/Topic21863.aspx but using my parameter /targetduration instead of a 0 to no effect.

Any help would be greatly appreciated!

Thank you.


<parameters>
/ fixationduration = 500
/ targetduration = 500
/ tp_isi = 0
/ probeduration = 1000
/ iti = 0
/ probe = ". ."
/ responsekey_left = 18
/ responsekey_right = 23
/ responsekey_left_label = "E"
/ responsekey_right_label = "I"

/ minimum_latency = 100

/ target_left_x = 35%
/ target_right_x = 65%
/ target_y = 50%
/ probe_y = 50%

/ fixationcross_height = 5%
/ probe_height = 5%
/ wordheight = 5%
</parameters>

<item threatpictures>
/ 1 = "01F_AN_O.bmp"
/ 2 = "02F_AN_O.bmp"
/ 3 = "05F_AN_C.bmp"
/ 4 = "07F_AN_C.bmp"
/ 5 = "09F_AN_C.bmp"
/ 6 = "13F_AN_O.bmp"
/ 7 = "14F_AN_O.bmp"
/ 8 = "19F_AN_O.bmp"
/ 9 = "20M_AN_O.bmp"
/ 10 = "21M_AN_O.bmp"
/ 11 = "22M_AN_C.bmp"
/ 12 = "26M_AN_C.bmp"
/ 13 = "27M_AN_O.bmp"
/ 14 = "36M_AN_O.bmp"
/ 15 = "37M_AN_C.bmp"
/ 16 = "40M_AN_O.bmp"
</item>

<item neutralpictures1>
/ 1 = "01F_NE_C.tiff"
/ 2 = "02F_NE_C.bmp"
/ 3 = "05F_NE_O.bmp"
/ 4 = "07F_NE_C.bmp"
/ 5 = "09F_NE_O.bmp"
/ 6 = "13F_NE_O.bmp"
/ 7 = "14F_NE_C.bmp"
/ 8 = "19F_NE_C.bmp"
/ 9 = "20M_NE_C.bmp"
/ 10 = "21M_NE_C.bmp"
/ 11 = "22M_NE_O.bmp"
/ 12 = "26M_NE_O.bmp"
/ 13 = "27M_NE_C.bmp"
/ 14 = "36M_NE_O.bmp"
/ 15 = "37M_NE_O.bmp"
/ 16 = "40M_NE_C.bmp"
</item>

<item neutralpictures2>
/ 1 = "22M_NE_O.bmp"
/ 2 = "21M_NE_C.bmp"
/ 3 = "20M_NE_C.bmp"
/ 4 = "26M_NE_O.bmp"
/ 5 = "01F_NE_C.tiff"
/ 6 = "05F_NE_O.bmp"
/ 7 = "02F_NE_C.bmp"
/ 8 = "07F_NE_C.bmp"
/ 9 = "36M_NE_O.bmp"
/ 10 = "40M_NE_C.bmp"
/ 11 = "37M_NE_O.bmp"
/ 12 = "27M_NE_C.bmp"
/ 13 = "14F_NE_C.bmp"
/ 14 = "09F_NE_O.bmp"
/ 15 = "19F_NE_C.bmp"
/ 16 = "13F_NE_O.bmp"
</item>

<item PracticeTargets>
/ 1 = "ONE"
/ 2 = "TWO"
/ 3 = "THREE"
/ 4 = "FOUR"
/ 5 = "FIVE"
/ 6 = "SIX"
/ 7 = "SEVEN"
/ 8 = "EIGHT"
/ 9 = "NINE"
/ 10 = "TEN"
</item>

<item PracticeComps>
/ 1 = "TWO"
/ 2 = "TEN"
/ 3 = "SEVEN"
/ 4 = "NINE"
/ 5 = "FOUR"
/ 6 = "ONE"
/ 7 = "EIGHT"
/ 8 = "THREE"
/ 9 = "FIVE"
/ 10 = "SIX"
</item>

<port congruentmarker>
/ port = COM4
/ subport = data
/ items = (1)
</port>
** S1**

<port incongruentmarker>
/ port = COM4
/ subport = data
/ items = (2)
</port>
** S2**

<port neutralmarker>
/ port = COM4
/ subport = data
/ items = (3)
</port>
** S3**

<port practicemarker>
/ port = COM4
/ subport = data
/ items = (4)
</port>
** S4**

<port markpress1>
/ port = COM4
/ subport = data
/ items = (16)
</port>
** R1**

<port markpress2>
/ port = COM4
/ subport = data
/ items = (32)
</port>
** R2**

<port markpress3>
/ port = COM4
/ subport = data
/ items = (48)
</port>
** R3**

<port markpress4>
/ port = COM4
/ subport = data
/ items = (64)
</port>
** R4**


<port correctmarker>
/ port = COM4
/ subport = data
/ items = (80)
</port>
** R5**

<port errormarker>
/ port = COM4
/ subport = data
/ items = (96)
</port>
** R6**
<list PracticeTarget_positions>
/ items = (1, 2)
/ replace = true
</list>

<trial threatening>
/ ontrialbegin = [
    values.valid = 0;
    values.validcorrect = 0;
    values.trialcount += 1;
    values.itemnumber = list.threateningTarget_itemnumbers.nextvalue;
    values.target_position = list.threateningTarget_positions.nextvalue;
    values.congruence = list.threateningTargetprobe_congruence.nextvalue;
    if (values.target_position == 1) {
        values.threat_x = parameters.target_left_x;
        values.neutral1_x = parameters.target_right_x;
    } else {
        values.threat_x = parameters.target_right_x;
        values.neutral1_x = parameters.target_left_x;
    };
    if (values.congruence == 1) {
        values.probe_x = values.threat_x;
        values.category = "threatening_CONGRUENT";
        trial.threatening.insertstimulustime(congruentmarker, 0);
    } else {
        values.probe_x = values.neutral1_x;
        values.category = "threatening_INCONGRUENT";
        trial.threatening.insertstimulustime(incongruentmarker, 0);
    };
    trial.threatening.insertstimulustime(text.fixation,(parameters.fixationduration + parameters.targetduration));
    trial.threatening.insertstimulustime(picture.threatpictures, parameters.fixationduration);
    trial.threatening.insertstimulustime(picture.neutralpictures1, parameters.fixationduration);
    trial.threatening.insertstimulustime(shape.eraser, (parameters.fixationduration + parameters.targetduration));
    trial.threatening.insertstimulustime(text.probe, (parameters.fixationduration + parameters.targetduration + parameters.tp_isi));
]
/ beginresponsetime = parameters.fixationduration + parameters.targetduration + parameters.tp_isi
/ responseinterrupt = immediate
/ validresponse = (parameters.responsekey_left, parameters.responsekey_right)
/ iscorrectresponse = [
(values.probe_x == parameters.target_right_x && trial.threatening.response == parameters.responsekey_right) ||
            (values.probe_x == parameters.target_left_x && trial.threatening.response == parameters.responsekey_left)
]
/ correctmessage = true(correctmarker,0)
/ errormessage = true(errormarker,0)
/ ontrialend = [
    trial.threatening.resetstimulusframes();
    values.threatpictures = picture.threatpictures.currentitem;
    values.neutralpictures1 = picture.neutralpictures1.currentitem;
    
    if (trial.threatening.latency >= parameters.minimum_latency){
        values.valid = 1;
        if (trial.threatening.correct) {
            values.validcorrect = 1;
            if (values.congruence == 1) {
                list.latencies_C.appenditem(trial.threatening.latency);
                list.latencies.appenditem(trial.threatening.latency);
                list.latencies_threat_neutral.appenditem(trial.threatening.latency);
            } else {
                list.latencies_IC.appenditem(trial.threatening.latency);
                list.latencies.appenditem(trial.threatening.latency);
                list.latencies_threat_neutral.appenditem(trial.threatening.latency)
            };
        };
    };
    
    list.accuracy.appenditem(trial.threatening.correct);
    list.accuracy_threat_neutral.appenditem(trial.threatening.correct);
    if (values.congruence == 1) {
        list.accuracy_C.appenditem(trial.threatening.correct);
    } else {
        list.accuracy_IC.appenditem(trial.threatening.correct);
    };
    ]
    
    
/ timeout = (parameters.fixationduration + parameters.targetduration + parameters.tp_isi + parameters.probeduration)
/ posttrialpause = parameters.iti
</trial>


<trial neutral>
/ ontrialbegin = [
    values.valid = 0;
    values.validcorrect = 0;
    values.trialcount += 1;
    values.category="neutral";
    values.itemnumber = list.neutralTarget_itemnumbers.nextvalue;
    values.target_position = list.neutralTarget_positions.nextvalue;
    values.congruence = list.neutralTargetprobe_congruence.nextvalue;
    if (values.target_position == 1) {
        values.neutral1_x = parameters.target_right_x;
        values.neutral2_x = parameters.target_left_x;
    } else {
        values.neutral2_x = parameters.target_right_x;
        values.neutral1_x = parameters.target_left_x;
    };
    if (values.congruence == 1) {
        values.probe_x = values.neutral1_x;
    } else {
        values.probe_x = values.neutral2_x;
    };
    trial.neutral.insertstimulustime(text.fixation,(parameters.fixationduration + parameters.targetduration));
    trial.neutral.insertstimulustime(picture.neutralpictures1, parameters.fixationduration);
    trial.neutral.insertstimulustime(picture.neutralpictures2, parameters.fixationduration);
    trial.neutral.insertstimulustime(shape.eraser, (parameters.fixationduration + parameters.targetduration));
    trial.neutral.insertstimulustime(text.probe, (parameters.fixationduration + parameters.targetduration + parameters.tp_isi));
]
/ stimulustimes = [0 = fixation, neutralmarker]
/ beginresponsetime = parameters.fixationduration + parameters.targetduration + parameters.tp_isi
/ responseinterrupt = immediate
/ validresponse = (parameters.responsekey_left, parameters.responsekey_right)
/ iscorrectresponse = [
(values.probe_x == parameters.target_left_x && trial.neutral.response == parameters.responsekey_left) ||
        (values.probe_x == parameters.target_right_x && trial.neutral.response == parameters.responsekey_right)
]
/ correctmessage = true(correctmarker,0)
/ errormessage = true(errormarker,0)                                            
/ ontrialend = [
    trial.neutral.resetstimulusframes();
    values.neutralpictures1 = picture.neutralpictures1.currentitem;
    values.neutralpictures2 = picture.neutralpictures2.currentitem;
    
        if (trial.neutral.latency >= parameters.minimum_latency){
        values.valid = 1;
        if (trial.neutral.correct) {
            values.validcorrect = 1;
            if (values.congruence == 1) {
                list.latencies.appenditem(trial.neutral.latency);
                list.latencies_neutral.appenditem(trial.neutral.latency);
            } else {
                list.latencies.appenditem(trial.neutral.latency);
                list.latencies_threat_neutral.appenditem(trial.neutral.latency)
            };
        };
    };
    
    list.accuracy.appenditem(trial.neutral.correct);
    list.accuracy_neutral.appenditem(trial.neutral.correct);
    if (values.congruence == 1) {
        list.accuracy_neutral.appenditem(trial.neutral.correct);
    } else {
        list.accuracy_neutral.appenditem(trial.neutral.correct);
    };
    ]
/ timeout = (parameters.fixationduration + parameters.targetduration + parameters.tp_isi + parameters.probeduration)
/ posttrialpause = parameters.iti
</trial>


Note: selects randomly without replacement the probe position (1=left, 2 = right) for 10 practice trials
<list PracticeTargetprobe_congruence>
/ items = (1, 2, 1, 2, 1, 2, 1, 2, 1, 2)
/ replace = false
</list>

<trial Practice>
/ ontrialbegin = [
    values.category = "Practice";
    values.target_position = list.PracticeTarget_positions.nextvalue;
    values.congruence = list.PracticeTargetprobe_congruence.nextvalue;
    if (values.target_position == 1) {
        values.practice_x = parameters.target_right_x;
        values.practicecomp_x = parameters.target_left_x;
    } else {
        values.practice_x = parameters.target_left_x;
        values.practicecomp_x = parameters.target_right_x;
    };
    if (values.congruence == 1) {
        values.probe_x = values.practice_x;
    } else {
        values.probe_x = values.practicecomp_x;
    };
    trial.Practice.insertstimulustime(text.fixation,(parameters.fixationduration + parameters.targetduration));
    trial.Practice.insertstimulustime(text.PracticeTarget, parameters.fixationduration);
    trial.Practice.insertstimulustime(text.PracticeComp, parameters.fixationduration);
    trial.Practice.insertstimulustime(shape.eraser, (parameters.fixationduration + parameters.targetduration));
    trial.Practice.insertstimulustime(text.probe, (parameters.fixationduration + parameters.targetduration + parameters.TP_ISI));
]
/ stimulustimes = [0 = fixation, practicemarker]
/ beginresponsetime = parameters.fixationduration + parameters.targetduration + parameters.TP_ISI
/ responseinterrupt = immediate
/ validresponse = (parameters.responsekey_left, parameters.responsekey_right)
/ iscorrectresponse = [
    (values.probe_x == parameters.target_right_x && trial.Practice.response == parameters.responsekey_right) ||
            (values.probe_x == parameters.target_left_x && trial.Practice.response == parameters.responsekey_left)
]
/ correctmessage = true(correctmarker,0)
/ errormessage = true(errormarker,0)
/ ontrialend = [
    values.practice_word = text.PracticeTarget.currentitem;
    values.practice_comp_word = text.PracticeComp.currentitem;
    trial.Practice.resetstimulusframes();
]
/ timeout = (parameters.fixationduration + parameters.targetduration + parameters.tp_isi + parameters.probeduration)
/ posttrialpause = parameters.iti
</trial>





Dave
Dave
Supreme Being (855K reputation)Supreme Being (855K reputation)Supreme Being (855K reputation)Supreme Being (855K reputation)Supreme Being (855K reputation)Supreme Being (855K reputation)Supreme Being (855K reputation)Supreme Being (855K reputation)Supreme Being (855K reputation)
Group: Administrators
Posts: 10K, Visits: 59K
JM776 - 7/2/2020
Hi there!

I was wondering if anyone could please help me out with a couple of EEG triggers I need for my dot-probe task. I can get all the triggers to work except two of them- congrugentmarker and incongrugentmarker. I cannot get these markers to work in the lab (which uses Inquisit 5), but I am able to have the script successfully validate on my personal laptop using inquisit 6, although I do not have access to EEG equipment for my personal laptop to fully test if the script is successful with inquisit 6.

I also tried using code from this forum post as an example https://www.millisecond.com/forums/Topic21863.aspx but using my parameter /targetduration instead of a 0 to no effect.

Any help would be greatly appreciated!

Thank you.


<parameters>
/ fixationduration = 500
/ targetduration = 500
/ tp_isi = 0
/ probeduration = 1000
/ iti = 0
/ probe = ". ."
/ responsekey_left = 18
/ responsekey_right = 23
/ responsekey_left_label = "E"
/ responsekey_right_label = "I"

/ minimum_latency = 100

/ target_left_x = 35%
/ target_right_x = 65%
/ target_y = 50%
/ probe_y = 50%

/ fixationcross_height = 5%
/ probe_height = 5%
/ wordheight = 5%
</parameters>

<item threatpictures>
/ 1 = "01F_AN_O.bmp"
/ 2 = "02F_AN_O.bmp"
/ 3 = "05F_AN_C.bmp"
/ 4 = "07F_AN_C.bmp"
/ 5 = "09F_AN_C.bmp"
/ 6 = "13F_AN_O.bmp"
/ 7 = "14F_AN_O.bmp"
/ 8 = "19F_AN_O.bmp"
/ 9 = "20M_AN_O.bmp"
/ 10 = "21M_AN_O.bmp"
/ 11 = "22M_AN_C.bmp"
/ 12 = "26M_AN_C.bmp"
/ 13 = "27M_AN_O.bmp"
/ 14 = "36M_AN_O.bmp"
/ 15 = "37M_AN_C.bmp"
/ 16 = "40M_AN_O.bmp"
</item>

<item neutralpictures1>
/ 1 = "01F_NE_C.tiff"
/ 2 = "02F_NE_C.bmp"
/ 3 = "05F_NE_O.bmp"
/ 4 = "07F_NE_C.bmp"
/ 5 = "09F_NE_O.bmp"
/ 6 = "13F_NE_O.bmp"
/ 7 = "14F_NE_C.bmp"
/ 8 = "19F_NE_C.bmp"
/ 9 = "20M_NE_C.bmp"
/ 10 = "21M_NE_C.bmp"
/ 11 = "22M_NE_O.bmp"
/ 12 = "26M_NE_O.bmp"
/ 13 = "27M_NE_C.bmp"
/ 14 = "36M_NE_O.bmp"
/ 15 = "37M_NE_O.bmp"
/ 16 = "40M_NE_C.bmp"
</item>

<item neutralpictures2>
/ 1 = "22M_NE_O.bmp"
/ 2 = "21M_NE_C.bmp"
/ 3 = "20M_NE_C.bmp"
/ 4 = "26M_NE_O.bmp"
/ 5 = "01F_NE_C.tiff"
/ 6 = "05F_NE_O.bmp"
/ 7 = "02F_NE_C.bmp"
/ 8 = "07F_NE_C.bmp"
/ 9 = "36M_NE_O.bmp"
/ 10 = "40M_NE_C.bmp"
/ 11 = "37M_NE_O.bmp"
/ 12 = "27M_NE_C.bmp"
/ 13 = "14F_NE_C.bmp"
/ 14 = "09F_NE_O.bmp"
/ 15 = "19F_NE_C.bmp"
/ 16 = "13F_NE_O.bmp"
</item>

<item PracticeTargets>
/ 1 = "ONE"
/ 2 = "TWO"
/ 3 = "THREE"
/ 4 = "FOUR"
/ 5 = "FIVE"
/ 6 = "SIX"
/ 7 = "SEVEN"
/ 8 = "EIGHT"
/ 9 = "NINE"
/ 10 = "TEN"
</item>

<item PracticeComps>
/ 1 = "TWO"
/ 2 = "TEN"
/ 3 = "SEVEN"
/ 4 = "NINE"
/ 5 = "FOUR"
/ 6 = "ONE"
/ 7 = "EIGHT"
/ 8 = "THREE"
/ 9 = "FIVE"
/ 10 = "SIX"
</item>

<port congruentmarker>
/ port = COM4
/ subport = data
/ items = (1)
</port>
** S1**

<port incongruentmarker>
/ port = COM4
/ subport = data
/ items = (2)
</port>
** S2**

<port neutralmarker>
/ port = COM4
/ subport = data
/ items = (3)
</port>
** S3**

<port practicemarker>
/ port = COM4
/ subport = data
/ items = (4)
</port>
** S4**

<port markpress1>
/ port = COM4
/ subport = data
/ items = (16)
</port>
** R1**

<port markpress2>
/ port = COM4
/ subport = data
/ items = (32)
</port>
** R2**

<port markpress3>
/ port = COM4
/ subport = data
/ items = (48)
</port>
** R3**

<port markpress4>
/ port = COM4
/ subport = data
/ items = (64)
</port>
** R4**


<port correctmarker>
/ port = COM4
/ subport = data
/ items = (80)
</port>
** R5**

<port errormarker>
/ port = COM4
/ subport = data
/ items = (96)
</port>
** R6**
<list PracticeTarget_positions>
/ items = (1, 2)
/ replace = true
</list>

<trial threatening>
/ ontrialbegin = [
    values.valid = 0;
    values.validcorrect = 0;
    values.trialcount += 1;
    values.itemnumber = list.threateningTarget_itemnumbers.nextvalue;
    values.target_position = list.threateningTarget_positions.nextvalue;
    values.congruence = list.threateningTargetprobe_congruence.nextvalue;
    if (values.target_position == 1) {
        values.threat_x = parameters.target_left_x;
        values.neutral1_x = parameters.target_right_x;
    } else {
        values.threat_x = parameters.target_right_x;
        values.neutral1_x = parameters.target_left_x;
    };
    if (values.congruence == 1) {
        values.probe_x = values.threat_x;
        values.category = "threatening_CONGRUENT";
        trial.threatening.insertstimulustime(congruentmarker, 0);
    } else {
        values.probe_x = values.neutral1_x;
        values.category = "threatening_INCONGRUENT";
        trial.threatening.insertstimulustime(incongruentmarker, 0);
    };
    trial.threatening.insertstimulustime(text.fixation,(parameters.fixationduration + parameters.targetduration));
    trial.threatening.insertstimulustime(picture.threatpictures, parameters.fixationduration);
    trial.threatening.insertstimulustime(picture.neutralpictures1, parameters.fixationduration);
    trial.threatening.insertstimulustime(shape.eraser, (parameters.fixationduration + parameters.targetduration));
    trial.threatening.insertstimulustime(text.probe, (parameters.fixationduration + parameters.targetduration + parameters.tp_isi));
]
/ beginresponsetime = parameters.fixationduration + parameters.targetduration + parameters.tp_isi
/ responseinterrupt = immediate
/ validresponse = (parameters.responsekey_left, parameters.responsekey_right)
/ iscorrectresponse = [
(values.probe_x == parameters.target_right_x && trial.threatening.response == parameters.responsekey_right) ||
            (values.probe_x == parameters.target_left_x && trial.threatening.response == parameters.responsekey_left)
]
/ correctmessage = true(correctmarker,0)
/ errormessage = true(errormarker,0)
/ ontrialend = [
    trial.threatening.resetstimulusframes();
    values.threatpictures = picture.threatpictures.currentitem;
    values.neutralpictures1 = picture.neutralpictures1.currentitem;
    
    if (trial.threatening.latency >= parameters.minimum_latency){
        values.valid = 1;
        if (trial.threatening.correct) {
            values.validcorrect = 1;
            if (values.congruence == 1) {
                list.latencies_C.appenditem(trial.threatening.latency);
                list.latencies.appenditem(trial.threatening.latency);
                list.latencies_threat_neutral.appenditem(trial.threatening.latency);
            } else {
                list.latencies_IC.appenditem(trial.threatening.latency);
                list.latencies.appenditem(trial.threatening.latency);
                list.latencies_threat_neutral.appenditem(trial.threatening.latency)
            };
        };
    };
    
    list.accuracy.appenditem(trial.threatening.correct);
    list.accuracy_threat_neutral.appenditem(trial.threatening.correct);
    if (values.congruence == 1) {
        list.accuracy_C.appenditem(trial.threatening.correct);
    } else {
        list.accuracy_IC.appenditem(trial.threatening.correct);
    };
    ]
    
    
/ timeout = (parameters.fixationduration + parameters.targetduration + parameters.tp_isi + parameters.probeduration)
/ posttrialpause = parameters.iti
</trial>


<trial neutral>
/ ontrialbegin = [
    values.valid = 0;
    values.validcorrect = 0;
    values.trialcount += 1;
    values.category="neutral";
    values.itemnumber = list.neutralTarget_itemnumbers.nextvalue;
    values.target_position = list.neutralTarget_positions.nextvalue;
    values.congruence = list.neutralTargetprobe_congruence.nextvalue;
    if (values.target_position == 1) {
        values.neutral1_x = parameters.target_right_x;
        values.neutral2_x = parameters.target_left_x;
    } else {
        values.neutral2_x = parameters.target_right_x;
        values.neutral1_x = parameters.target_left_x;
    };
    if (values.congruence == 1) {
        values.probe_x = values.neutral1_x;
    } else {
        values.probe_x = values.neutral2_x;
    };
    trial.neutral.insertstimulustime(text.fixation,(parameters.fixationduration + parameters.targetduration));
    trial.neutral.insertstimulustime(picture.neutralpictures1, parameters.fixationduration);
    trial.neutral.insertstimulustime(picture.neutralpictures2, parameters.fixationduration);
    trial.neutral.insertstimulustime(shape.eraser, (parameters.fixationduration + parameters.targetduration));
    trial.neutral.insertstimulustime(text.probe, (parameters.fixationduration + parameters.targetduration + parameters.tp_isi));
]
/ stimulustimes = [0 = fixation, neutralmarker]
/ beginresponsetime = parameters.fixationduration + parameters.targetduration + parameters.tp_isi
/ responseinterrupt = immediate
/ validresponse = (parameters.responsekey_left, parameters.responsekey_right)
/ iscorrectresponse = [
(values.probe_x == parameters.target_left_x && trial.neutral.response == parameters.responsekey_left) ||
        (values.probe_x == parameters.target_right_x && trial.neutral.response == parameters.responsekey_right)
]
/ correctmessage = true(correctmarker,0)
/ errormessage = true(errormarker,0)                                            
/ ontrialend = [
    trial.neutral.resetstimulusframes();
    values.neutralpictures1 = picture.neutralpictures1.currentitem;
    values.neutralpictures2 = picture.neutralpictures2.currentitem;
    
        if (trial.neutral.latency >= parameters.minimum_latency){
        values.valid = 1;
        if (trial.neutral.correct) {
            values.validcorrect = 1;
            if (values.congruence == 1) {
                list.latencies.appenditem(trial.neutral.latency);
                list.latencies_neutral.appenditem(trial.neutral.latency);
            } else {
                list.latencies.appenditem(trial.neutral.latency);
                list.latencies_threat_neutral.appenditem(trial.neutral.latency)
            };
        };
    };
    
    list.accuracy.appenditem(trial.neutral.correct);
    list.accuracy_neutral.appenditem(trial.neutral.correct);
    if (values.congruence == 1) {
        list.accuracy_neutral.appenditem(trial.neutral.correct);
    } else {
        list.accuracy_neutral.appenditem(trial.neutral.correct);
    };
    ]
/ timeout = (parameters.fixationduration + parameters.targetduration + parameters.tp_isi + parameters.probeduration)
/ posttrialpause = parameters.iti
</trial>


Note: selects randomly without replacement the probe position (1=left, 2 = right) for 10 practice trials
<list PracticeTargetprobe_congruence>
/ items = (1, 2, 1, 2, 1, 2, 1, 2, 1, 2)
/ replace = false
</list>

<trial Practice>
/ ontrialbegin = [
    values.category = "Practice";
    values.target_position = list.PracticeTarget_positions.nextvalue;
    values.congruence = list.PracticeTargetprobe_congruence.nextvalue;
    if (values.target_position == 1) {
        values.practice_x = parameters.target_right_x;
        values.practicecomp_x = parameters.target_left_x;
    } else {
        values.practice_x = parameters.target_left_x;
        values.practicecomp_x = parameters.target_right_x;
    };
    if (values.congruence == 1) {
        values.probe_x = values.practice_x;
    } else {
        values.probe_x = values.practicecomp_x;
    };
    trial.Practice.insertstimulustime(text.fixation,(parameters.fixationduration + parameters.targetduration));
    trial.Practice.insertstimulustime(text.PracticeTarget, parameters.fixationduration);
    trial.Practice.insertstimulustime(text.PracticeComp, parameters.fixationduration);
    trial.Practice.insertstimulustime(shape.eraser, (parameters.fixationduration + parameters.targetduration));
    trial.Practice.insertstimulustime(text.probe, (parameters.fixationduration + parameters.targetduration + parameters.TP_ISI));
]
/ stimulustimes = [0 = fixation, practicemarker]
/ beginresponsetime = parameters.fixationduration + parameters.targetduration + parameters.TP_ISI
/ responseinterrupt = immediate
/ validresponse = (parameters.responsekey_left, parameters.responsekey_right)
/ iscorrectresponse = [
    (values.probe_x == parameters.target_right_x && trial.Practice.response == parameters.responsekey_right) ||
            (values.probe_x == parameters.target_left_x && trial.Practice.response == parameters.responsekey_left)
]
/ correctmessage = true(correctmarker,0)
/ errormessage = true(errormarker,0)
/ ontrialend = [
    values.practice_word = text.PracticeTarget.currentitem;
    values.practice_comp_word = text.PracticeComp.currentitem;
    trial.Practice.resetstimulusframes();
]
/ timeout = (parameters.fixationduration + parameters.targetduration + parameters.tp_isi + parameters.probeduration)
/ posttrialpause = parameters.iti
</trial>






if (values.congruence == 1) {
   values.probe_x = values.threat_x;
   values.category = "threatening_CONGRUENT";
   trial.threatening.insertstimulustime(congruentmarker, 0);
  } else {
   values.probe_x = values.neutral1_x;
   values.category = "threatening_INCONGRUENT";
   trial.threatening.insertstimulustime(incongruentmarker, 0);
  };

is wrong syntax-wise, and ought to read

if (values.congruence == 1) {
 values.probe_x = values.threat_x;
 values.category = "threatening_CONGRUENT";
 trial.threatening.insertstimulustime(port.congruentmarker, 0);
} else {
 values.probe_x = values.neutral1_x;
 values.category = "threatening_INCONGRUENT";
 trial.threatening.insertstimulustime(port.incongruentmarker, 0);
};
JM776
JM776
New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)
Group: Forum Members
Posts: 2, Visits: 7
Thanks Dave, can't believe I missed something so simple!

Cheers :)

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search