Millisecond Forums

Monetary Incentive Delay Task on EEG with Inquisit 4

https://forums.millisecond.com/Topic25499.aspx

By Ozge - 9/11/2018

Hello Dave and all,

I have a problem that I hope you can help me with. I want to use MID task on EEG however, I do not know how to write it in the script and how to connect with the paralell ports. I studied from the links on the millisecond, still unfortunately I am stuck. Can you please help me? It is my PhD thesis and I do not know how to deal with it.

The script is attached.

Thank you very much in advance. 
By Dave - 9/11/2018

Ozge - Wednesday, September 12, 2018
Hello Dave and all,

I have a problem that I hope you can help me with. I want to use MID task on EEG however, I do not know how to write it in the script and how to connect with the paralell ports. I studied from the links on the millisecond, still unfortunately I am stuck. Can you please help me? It is my PhD thesis and I do not know how to deal with it.

The script is attached.

Thank you very much in advance. 

First you need to decide when you want to signal what. Then you define <port> elements as needed, one per type of signal. Then you just "display" those <port> stimuli just like any other kind of stimulus (<text>, <shape>, <picture>, etc.) in the script, i.e. you put them in the <trial>s' /stimulustimes or -frames and/or insert them dynamically via the insertstimulustime() function, again just like is done with all the other stimulus elements in the script.
By Ozge - 9/13/2018

Dave - Wednesday, September 12, 2018
Ozge - Wednesday, September 12, 2018
Hello Dave and all,

I have a problem that I hope you can help me with. I want to use MID task on EEG however, I do not know how to write it in the script and how to connect with the paralell ports. I studied from the links on the millisecond, still unfortunately I am stuck. Can you please help me? It is my PhD thesis and I do not know how to deal with it.

The script is attached.

Thank you very much in advance. 

First you need to decide when you want to signal what. Then you define <port> elements as needed, one per type of signal. Then you just "display" those <port> stimuli just like any other kind of stimulus (<text>, <shape>, <picture>, etc.) in the script, i.e. you put them in the <trial>s' /stimulustimes or -frames and/or insert them dynamically via the insertstimulustime() function, again just like is done with all the other stimulus elements in the script.

Hi Dave,

Thank you I think I displayed those <port> stimuli in the script (if I am not wrong). However, I couldn't put them  in the <trial>s' /stimulustimes . It just doesn't recognize port under <trials>.  Can you please have a look at my script?

I really appreciate it.

Özge

By Dave - 9/14/2018

Ozge - Friday, September 14, 2018
Dave - Wednesday, September 12, 2018
Ozge - Wednesday, September 12, 2018
Hello Dave and all,

I have a problem that I hope you can help me with. I want to use MID task on EEG however, I do not know how to write it in the script and how to connect with the paralell ports. I studied from the links on the millisecond, still unfortunately I am stuck. Can you please help me? It is my PhD thesis and I do not know how to deal with it.

The script is attached.

Thank you very much in advance. 

First you need to decide when you want to signal what. Then you define <port> elements as needed, one per type of signal. Then you just "display" those <port> stimuli just like any other kind of stimulus (<text>, <shape>, <picture>, etc.) in the script, i.e. you put them in the <trial>s' /stimulustimes or -frames and/or insert them dynamically via the insertstimulustime() function, again just like is done with all the other stimulus elements in the script.

Hi Dave,

Thank you I think I displayed those <port> stimuli in the script (if I am not wrong). However, I couldn't put them  in the <trial>s' /stimulustimes . It just doesn't recognize port under <trials>.  Can you please have a look at my script?

I really appreciate it.

Özge


> However, I couldn't put them  in the <trial>s' /stimulustimes . It just doesn't recognize port under <trials>.

I have no idea what you mean here. Please elaborate.

Again, to reiterate, <port> stimuli work exactly like any other stimuli. First, give your <port> elements useful names that DO NOT collide with any other stimulus names. E.g.

Do NOT define

<shape nonincentivecue>
/ shape = rectangle
/ size = (parameters.stimsize * 0.75, parameters.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>

and a port element of the same name, call it e.g.

<port nonincentivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>


Then, if you want to "display" or send the port signal at the same time as the cue <shape>, and a <port> signal along with the target, you do

<trial nonincentive>
/ ontrialbegin = [
    values.incentive_condition = 2;
    values.iti=0;
    values.targetduration = expressions.determineDuration;
    values.delayduration = list.delay.nextvalue;
    trial.nonincentive.insertstimulustime(shape.eraser, parameters.cueduration);
    trial.nonincentive.insertstimulustime(port.erasereeg, parameters.cueduration);
    trial.nonincentive.insertstimulustime(shape.target, (parameters.cueduration + values.delayduration));
    trial.nonincentive.insertstimulustime(port.targeteeg, (parameters.cueduration + values.delayduration));
]

/ stimulustimes = [0 = nonincentivecue, nonincentivecueeeg, total]
/ beginresponsetime = parameters.cueduration + values.delayduration
/ responseinterrupt = immediate
/ response = timeout(values.targetduration)
/ validresponse = (parameters.responsekey)
/ correctresponse = (parameters.responsekey)
/ monkeyresponse = (parameters.responsekey)
...
</trial>

and so forth for the rest.
By Ozge - 9/16/2018

Dave - Friday, September 14, 2018
Ozge - Friday, September 14, 2018
Dave - Wednesday, September 12, 2018
Ozge - Wednesday, September 12, 2018
Hello Dave and all,

I have a problem that I hope you can help me with. I want to use MID task on EEG however, I do not know how to write it in the script and how to connect with the paralell ports. I studied from the links on the millisecond, still unfortunately I am stuck. Can you please help me? It is my PhD thesis and I do not know how to deal with it.

The script is attached.

Thank you very much in advance. 

First you need to decide when you want to signal what. Then you define <port> elements as needed, one per type of signal. Then you just "display" those <port> stimuli just like any other kind of stimulus (<text>, <shape>, <picture>, etc.) in the script, i.e. you put them in the <trial>s' /stimulustimes or -frames and/or insert them dynamically via the insertstimulustime() function, again just like is done with all the other stimulus elements in the script.

Hi Dave,

Thank you I think I displayed those <port> stimuli in the script (if I am not wrong). However, I couldn't put them  in the <trial>s' /stimulustimes . It just doesn't recognize port under <trials>.  Can you please have a look at my script?

I really appreciate it.

Özge


> However, I couldn't put them  in the <trial>s' /stimulustimes . It just doesn't recognize port under <trials>.

I have no idea what you mean here. Please elaborate.

Again, to reiterate, <port> stimuli work exactly like any other stimuli. First, give your <port> elements useful names that DO NOT collide with any other stimulus names. E.g.

Do NOT define

<shape nonincentivecue>
/ shape = rectangle
/ size = (parameters.stimsize * 0.75, parameters.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>

and a port element of the same name, call it e.g.

<port nonincentivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>


Then, if you want to "display" or send the port signal at the same time as the cue <shape>, and a <port> signal along with the target, you do

<trial nonincentive>
/ ontrialbegin = [
    values.incentive_condition = 2;
    values.iti=0;
    values.targetduration = expressions.determineDuration;
    values.delayduration = list.delay.nextvalue;
    trial.nonincentive.insertstimulustime(shape.eraser, parameters.cueduration);
    trial.nonincentive.insertstimulustime(port.erasereeg, parameters.cueduration);
    trial.nonincentive.insertstimulustime(shape.target, (parameters.cueduration + values.delayduration));
    trial.nonincentive.insertstimulustime(port.targeteeg, (parameters.cueduration + values.delayduration));
]

/ stimulustimes = [0 = nonincentivecue, nonincentivecueeeg, total]
/ beginresponsetime = parameters.cueduration + values.delayduration
/ responseinterrupt = immediate
/ response = timeout(values.targetduration)
/ validresponse = (parameters.responsekey)
/ correctresponse = (parameters.responsekey)
/ monkeyresponse = (parameters.responsekey)
...
</trial>

and so forth for the rest.

Hello Dave,

Thank you very much for your help. I think it is ok now (hope so..if you please have a look at the script). I am having trouble with addressing paralell port 1. Under the tools section there are windows related to paralell port however I just don't get it although I studied from your site and tried so hard. Andin my department  no one knows how to connect task to the paralell port. And I don't want to give up! Can you please help me? 

Özge
By Dave - 9/16/2018

Ozge - Monday, September 17, 2018
Dave - Friday, September 14, 2018
Ozge - Friday, September 14, 2018
Dave - Wednesday, September 12, 2018
Ozge - Wednesday, September 12, 2018
Hello Dave and all,

I have a problem that I hope you can help me with. I want to use MID task on EEG however, I do not know how to write it in the script and how to connect with the paralell ports. I studied from the links on the millisecond, still unfortunately I am stuck. Can you please help me? It is my PhD thesis and I do not know how to deal with it.

The script is attached.

Thank you very much in advance. 

First you need to decide when you want to signal what. Then you define <port> elements as needed, one per type of signal. Then you just "display" those <port> stimuli just like any other kind of stimulus (<text>, <shape>, <picture>, etc.) in the script, i.e. you put them in the <trial>s' /stimulustimes or -frames and/or insert them dynamically via the insertstimulustime() function, again just like is done with all the other stimulus elements in the script.

Hi Dave,

Thank you I think I displayed those <port> stimuli in the script (if I am not wrong). However, I couldn't put them  in the <trial>s' /stimulustimes . It just doesn't recognize port under <trials>.  Can you please have a look at my script?

I really appreciate it.

Özge


> However, I couldn't put them  in the <trial>s' /stimulustimes . It just doesn't recognize port under <trials>.

I have no idea what you mean here. Please elaborate.

Again, to reiterate, <port> stimuli work exactly like any other stimuli. First, give your <port> elements useful names that DO NOT collide with any other stimulus names. E.g.

Do NOT define

<shape nonincentivecue>
/ shape = rectangle
/ size = (parameters.stimsize * 0.75, parameters.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>

and a port element of the same name, call it e.g.

<port nonincentivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>


Then, if you want to "display" or send the port signal at the same time as the cue <shape>, and a <port> signal along with the target, you do

<trial nonincentive>
/ ontrialbegin = [
    values.incentive_condition = 2;
    values.iti=0;
    values.targetduration = expressions.determineDuration;
    values.delayduration = list.delay.nextvalue;
    trial.nonincentive.insertstimulustime(shape.eraser, parameters.cueduration);
    trial.nonincentive.insertstimulustime(port.erasereeg, parameters.cueduration);
    trial.nonincentive.insertstimulustime(shape.target, (parameters.cueduration + values.delayduration));
    trial.nonincentive.insertstimulustime(port.targeteeg, (parameters.cueduration + values.delayduration));
]

/ stimulustimes = [0 = nonincentivecue, nonincentivecueeeg, total]
/ beginresponsetime = parameters.cueduration + values.delayduration
/ responseinterrupt = immediate
/ response = timeout(values.targetduration)
/ validresponse = (parameters.responsekey)
/ correctresponse = (parameters.responsekey)
/ monkeyresponse = (parameters.responsekey)
...
</trial>

and so forth for the rest.

Hello Dave,

Thank you very much for your help. I think it is ok now (hope so..if you please have a look at the script). I am having trouble with addressing paralell port 1. Under the tools section there are windows related to paralell port however I just don't get it although I studied from your site and tried so hard. Andin my department  no one knows how to connect task to the paralell port. And I don't want to give up! Can you please help me? 

Özge

You can use Tools -> Parallel Port Monitor to *test* the connection to your EEG and figure out the correct settings (e.g. the parallel port number on your system -- it's not necessarily LPT1). Then you can send signals to the EEG / EEG recording software via the Tool to ensure the EEG sees the signals and they are what the EEG expects (check the EEG's manual for information on how to communicate with it). Then, once you've figured that out, make sure the settings in *your script* match those you tested, i.e. adjust the LPT number, etc. accordingly. I cannot really help with that, because I don't know what hardware you use and what the port numbers are on the device you plan to use.
By Ozge - 9/17/2018

Thank you Dave.
Actually I managed to see the markers on the EEG recording computer (brain products software). However I only see two markers. For example: when the white square comes, s15 comes as a marker. And when other squares shows up, s7 is seen as a marker. My response doesn’t come as a marker but I think it can be solved during analysis part which I really hope to see!
The problem here is that I don’t know how to specify those cues. I want to classify them as incentive and nonincentive cues. How can I do that?
By Dave - 9/17/2018

Ozge - Monday, September 17, 2018
Thank you Dave. Actually I managed to see the markers on the EEG recording computer (brain products software). However I only see two markers. For example: when the white square comes, s15 comes as a marker. And when other squares shows up, s7 is seen as a marker. My response doesn’t come as a marker but I think it can be solved during analysis part which I really hope to see! The problem here is that I don’t know how to specify those cues. I want to classify them as incentive and nonincentive cues. How can I do that?

You have not specified any markers to be sent upon response. You can do so by specifying /responsemessage attributes in your <trial> elements.
You're not distinguishing between incentive and nonincentive trials because you're not sending the markers.

for incentive trials:
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>

for nonincentive trials:
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

I don't know why you don't send them, I have explained how to do this here:

https://www.millisecond.com/forums/FindPost25523.aspx

Finally, it seems your "eraser" <port> is misspecified

<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000111")
</port>

You'll want to send all zeros to lower, i.e. "erase" a previous signal during the trial:
<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000000")
</port>


By Ozge - 9/17/2018

Dave - Monday, September 17, 2018
Ozge - Monday, September 17, 2018
Thank you Dave. Actually I managed to see the markers on the EEG recording computer (brain products software). However I only see two markers. For example: when the white square comes, s15 comes as a marker. And when other squares shows up, s7 is seen as a marker. My response doesn’t come as a marker but I think it can be solved during analysis part which I really hope to see! The problem here is that I don’t know how to specify those cues. I want to classify them as incentive and nonincentive cues. How can I do that?

You have not specified any markers to be sent upon response. You can do so by specifying /responsemessage attributes in your <trial> elements.
You're not distinguishing between incentive and nonincentive trials because you're not sending the markers.

for incentive trials:
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>

for nonincentive trials:
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

I don't know why you don't send them, I have explained how to do this here:

https://www.millisecond.com/forums/FindPost25523.aspx

Finally, it seems your "eraser" <port> is misspecified

<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000111")
</port>

You'll want to send all zeros to lower, i.e. "erase" a previous signal during the trial:
<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000000")
</port>



Thank you Dave,

Actually I updated the script after you the attached one was not the uptaed one. Now, the final version is attached. The thing is that I did what you said. I sent the markers I think. And I added responsemessage attributes. But, now all I can see the target as a marker (s7). Other incentive cues and nonincentive cues are not seen as markers let alone distinguishing incentive and nonincentive cues as markers. I don't know where I am doing wrong again. I am so close to succeed in this with your help and sorry to bother you this much but can you please have a look at the script and help me in marking problem? I just have to see the markers of incentive cues, nonincentive cues, responses, feedback etc while recording EEG..

Thank you very much in advance.

Özge
By Ozge - 9/17/2018

Ozge - Tuesday, September 18, 2018
Dave - Monday, September 17, 2018
Ozge - Monday, September 17, 2018
Thank you Dave. Actually I managed to see the markers on the EEG recording computer (brain products software). However I only see two markers. For example: when the white square comes, s15 comes as a marker. And when other squares shows up, s7 is seen as a marker. My response doesn’t come as a marker but I think it can be solved during analysis part which I really hope to see! The problem here is that I don’t know how to specify those cues. I want to classify them as incentive and nonincentive cues. How can I do that?

You have not specified any markers to be sent upon response. You can do so by specifying /responsemessage attributes in your <trial> elements.
You're not distinguishing between incentive and nonincentive trials because you're not sending the markers.

for incentive trials:
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>

for nonincentive trials:
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

I don't know why you don't send them, I have explained how to do this here:

https://www.millisecond.com/forums/FindPost25523.aspx

Finally, it seems your "eraser" <port> is misspecified

<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000111")
</port>

You'll want to send all zeros to lower, i.e. "erase" a previous signal during the trial:
<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000000")
</port>



Thank you Dave,

Actually I updated the script after you the attached one was not the uptaed one. Now, the final version is attached. The thing is that I did what you said. I sent the markers I think. And I added responsemessage attributes. But, now all I can see the target as a marker (s7). Other incentive cues and nonincentive cues are not seen as markers let alone distinguishing incentive and nonincentive cues as markers. I don't know where I am doing wrong again. I am so close to succeed in this with your help and sorry to bother you this much but can you please have a look at the script and help me in marking problem? I just have to see the markers of incentive cues, nonincentive cues, responses, feedback etc while recording EEG..

Thank you very much in advance.

Özge


By Dave - 9/17/2018

Ozge - Tuesday, September 18, 2018
Ozge - Tuesday, September 18, 2018
Dave - Monday, September 17, 2018
Ozge - Monday, September 17, 2018
Thank you Dave. Actually I managed to see the markers on the EEG recording computer (brain products software). However I only see two markers. For example: when the white square comes, s15 comes as a marker. And when other squares shows up, s7 is seen as a marker. My response doesn’t come as a marker but I think it can be solved during analysis part which I really hope to see! The problem here is that I don’t know how to specify those cues. I want to classify them as incentive and nonincentive cues. How can I do that?

You have not specified any markers to be sent upon response. You can do so by specifying /responsemessage attributes in your <trial> elements.
You're not distinguishing between incentive and nonincentive trials because you're not sending the markers.

for incentive trials:
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>

for nonincentive trials:
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

I don't know why you don't send them, I have explained how to do this here:

https://www.millisecond.com/forums/FindPost25523.aspx

Finally, it seems your "eraser" <port> is misspecified

<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000111")
</port>

You'll want to send all zeros to lower, i.e. "erase" a previous signal during the trial:
<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000000")
</port>



Thank you Dave,

Actually I updated the script after you the attached one was not the uptaed one. Now, the final version is attached. The thing is that I did what you said. I sent the markers I think. And I added responsemessage attributes. But, now all I can see the target as a marker (s7). Other incentive cues and nonincentive cues are not seen as markers let alone distinguishing incentive and nonincentive cues as markers. I don't know where I am doing wrong again. I am so close to succeed in this with your help and sorry to bother you this much but can you please have a look at the script and help me in marking problem? I just have to see the markers of incentive cues, nonincentive cues, responses, feedback etc while recording EEG..

Thank you very much in advance.

Özge



This is the nonincentive trial from the script you attached:

<trial nonincentive>
/inputdevice = mousekey
/validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown, rbuttondown)
/ responsemessage = (lbuttondown,incentivecue, 0)
/ responsemessage = (rbuttondown,incentivecue, 0)
/ ontrialbegin = [
    values.incentive_condition = 2;
    values.iti=0;
    values.targetduration = expressions.determineDuration;
    values.delayduration = list.delay.nextvalue;
    trial.nonincentive.insertstimulustime(shape.eraser, values.cueduration);
    trial.nonincentive.insertstimulustime(port.erasereeg, values.cueduration);
    trial.nonincentive.insertstimulustime(shape.target, (values.cueduration + values.delayduration));
    trial.nonincentive.insertstimulustime(port.targeteeg, (values.cueduration + values.delayduration));
]
/ stimulustimes = [0 = nonincentivecue, total]
/ beginresponsetime = values.cueduration + values.delayduration
/ responseinterrupt = immediate
/ timeout = values.cueduration + values.delayduration + values.targetduration
/ monkeyresponse = (values.responsekey)
/ ontrialend = [
    trial.nonincentive.resetstimulusframes();
    values.iti = values.trialduration - values.cueduration - values.delayduration - trial.nonincentive.latency - values.feedbackduration;
    if (values.exp_condition == 0) {
        values.count_NonIncentiveControl += 1;
        values.countcorrect_NonIncentiveControl += trial.nonincentive.correct;
        list.successNonIncentive_Control.insertitem(trial.nonincentive.correct, 1);
    } else if (values.exp_condition == 1) {
        values.count_NonIncentiveReward += 1;
        values.countcorrect_NonIncentiveReward += trial.nonincentive.correct;
        list.successIncentive_Reward.insertitem(trial.incentive.correct, 1);
    } else if (values.exp_condition == 2) {
        values.count_NonIncentivePunishment += 1;
        values.countcorrect_NonIncentivePunishment += trial.nonincentive.correct;
        list.successNonIncentive_Punishment.insertitem(trial.nonincentive.correct, 1);
    } ;
]       
/ branch = [trial.feedback]
</trial>

Where do you send the nonincentivecue EEG marker? It appears you don't. Why? All you send is the target EEG marker. Add the nonincentive marker as I have explained previously, please.

Then, you'll probably want to define _different_ markers to indicate response. Here,

<trial nonincentive>
/inputdevice = mousekey
/validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown, rbuttondown)
/ responsemessage = (lbuttondown,incentivecue, 0)
/ responsemessage = (rbuttondown,incentivecue, 0)
...

#1: What does "incentivecue" do in <trial nonincentive>?
#2: "incentivecue" is not a port marker, and neither is nonincentivecue. Those are <shape> elements. Your port elements are called incentivecueeeg and nonincentivecueeeg respectively.

<shape incentivecue>
/ shape = rectangle
/ size = (values.stimsize * 0.75, values.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>
<shape nonincentivecue>
/ shape = rectangle
/ size = (values.stimsize * 0.75, values.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

#3: You almost certainly will want to send those markes for longer than just 0 ms, since it's not guaranteed that there will be a substantive post trial pause. Set it to a minimum of, say, 50 ms.
By Ozge - 9/27/2018

Dave - Tuesday, September 18, 2018
Ozge - Tuesday, September 18, 2018
Ozge - Tuesday, September 18, 2018
Dave - Monday, September 17, 2018
Ozge - Monday, September 17, 2018
Thank you Dave. Actually I managed to see the markers on the EEG recording computer (brain products software). However I only see two markers. For example: when the white square comes, s15 comes as a marker. And when other squares shows up, s7 is seen as a marker. My response doesn’t come as a marker but I think it can be solved during analysis part which I really hope to see! The problem here is that I don’t know how to specify those cues. I want to classify them as incentive and nonincentive cues. How can I do that?

You have not specified any markers to be sent upon response. You can do so by specifying /responsemessage attributes in your <trial> elements.
You're not distinguishing between incentive and nonincentive trials because you're not sending the markers.

for incentive trials:
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>

for nonincentive trials:
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

I don't know why you don't send them, I have explained how to do this here:

https://www.millisecond.com/forums/FindPost25523.aspx

Finally, it seems your "eraser" <port> is misspecified

<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000111")
</port>

You'll want to send all zeros to lower, i.e. "erase" a previous signal during the trial:
<port erasereeg>
/ port = LPT1
/ subport = data
/ items = ("00000000")
</port>



Thank you Dave,

Actually I updated the script after you the attached one was not the uptaed one. Now, the final version is attached. The thing is that I did what you said. I sent the markers I think. And I added responsemessage attributes. But, now all I can see the target as a marker (s7). Other incentive cues and nonincentive cues are not seen as markers let alone distinguishing incentive and nonincentive cues as markers. I don't know where I am doing wrong again. I am so close to succeed in this with your help and sorry to bother you this much but can you please have a look at the script and help me in marking problem? I just have to see the markers of incentive cues, nonincentive cues, responses, feedback etc while recording EEG..

Thank you very much in advance.

Özge



This is the nonincentive trial from the script you attached:

<trial nonincentive>
/inputdevice = mousekey
/validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown, rbuttondown)
/ responsemessage = (lbuttondown,incentivecue, 0)
/ responsemessage = (rbuttondown,incentivecue, 0)
/ ontrialbegin = [
    values.incentive_condition = 2;
    values.iti=0;
    values.targetduration = expressions.determineDuration;
    values.delayduration = list.delay.nextvalue;
    trial.nonincentive.insertstimulustime(shape.eraser, values.cueduration);
    trial.nonincentive.insertstimulustime(port.erasereeg, values.cueduration);
    trial.nonincentive.insertstimulustime(shape.target, (values.cueduration + values.delayduration));
    trial.nonincentive.insertstimulustime(port.targeteeg, (values.cueduration + values.delayduration));
]
/ stimulustimes = [0 = nonincentivecue, total]
/ beginresponsetime = values.cueduration + values.delayduration
/ responseinterrupt = immediate
/ timeout = values.cueduration + values.delayduration + values.targetduration
/ monkeyresponse = (values.responsekey)
/ ontrialend = [
    trial.nonincentive.resetstimulusframes();
    values.iti = values.trialduration - values.cueduration - values.delayduration - trial.nonincentive.latency - values.feedbackduration;
    if (values.exp_condition == 0) {
        values.count_NonIncentiveControl += 1;
        values.countcorrect_NonIncentiveControl += trial.nonincentive.correct;
        list.successNonIncentive_Control.insertitem(trial.nonincentive.correct, 1);
    } else if (values.exp_condition == 1) {
        values.count_NonIncentiveReward += 1;
        values.countcorrect_NonIncentiveReward += trial.nonincentive.correct;
        list.successIncentive_Reward.insertitem(trial.incentive.correct, 1);
    } else if (values.exp_condition == 2) {
        values.count_NonIncentivePunishment += 1;
        values.countcorrect_NonIncentivePunishment += trial.nonincentive.correct;
        list.successNonIncentive_Punishment.insertitem(trial.nonincentive.correct, 1);
    } ;
]       
/ branch = [trial.feedback]
</trial>

Where do you send the nonincentivecue EEG marker? It appears you don't. Why? All you send is the target EEG marker. Add the nonincentive marker as I have explained previously, please.

Then, you'll probably want to define _different_ markers to indicate response. Here,

<trial nonincentive>
/inputdevice = mousekey
/validresponse = (lbuttondown, rbuttondown)
/correctresponse = (lbuttondown, rbuttondown)
/ responsemessage = (lbuttondown,incentivecue, 0)
/ responsemessage = (rbuttondown,incentivecue, 0)
...

#1: What does "incentivecue" do in <trial nonincentive>?
#2: "incentivecue" is not a port marker, and neither is nonincentivecue. Those are <shape> elements. Your port elements are called incentivecueeeg and nonincentivecueeeg respectively.

<shape incentivecue>
/ shape = rectangle
/ size = (values.stimsize * 0.75, values.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>
<port incetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000001")
</port>
<shape nonincentivecue>
/ shape = rectangle
/ size = (values.stimsize * 0.75, values.stimsize)
/ position = (50%, 50%)
/ color = red
</shape>
<port nonincetivecueeeg>
/ port = LPT1
/ subport = data
/ items = ("00000011")
</port>

#3: You almost certainly will want to send those markes for longer than just 0 ms, since it's not guaranteed that there will be a substantive post trial pause. Set it to a minimum of, say, 50 ms.

Hi Dave again,

I want to change number of incentive and non-incentive cues on trials like 30 incentive and 70 non incentive cues instead of original 20-80.. I think it is possible but I could not do it. I modified 1-80 like 1-70 but it did not solve the problem. How can I do it? I searched on the forum but could not see what I can do.

Can you please have a look at?

/ trials = [1-70 = noreplace(incentive, nonincentive, nonincentive, nonincentive)]

Thank you so much

Özge

By Dave - 9/27/2018

Ozge - Friday, September 28, 2018

Hi Dave again,

I want to change number of incentive and non-incentive cues on trials like 30 incentive and 70 non incentive cues instead of original 20-80.. I think it is possible but I could not do it. I modified 1-80 like 1-70 but it did not solve the problem. How can I do it? I searched on the forum but could not see what I can do.

Can you please have a look at?

/ trials = [1-70 = noreplace(incentive, nonincentive, nonincentive, nonincentive)]

Thank you so much

Özge


If you want 70 trials total, with 30 incentive and 40 nonincentive, then you need to specify the proporions accordingly in your noreplace() pool.

/ trials = [1-70 = noreplace(incentive, incentive, incentive, nonincentive, nonincentive, nonincentive, nonincentive)]

i.e. 3 to 4.