cansu
|
|
Group: Forum Members
Posts: 38,
Visits: 136
|
+x+x+x+x+x+x+x+xThank you four your help🙏🏻 I was able to trigger reward and loss cues differently with your guidance, thanks again. I defined feedback punishment feedback reward and feedback loss ports with the same method, <text feedback> / items = feedback / select = values.feedback / vjustify = center / fontstyle = ("Arial", 5%, false, false, false, false, 5, 1) </text> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00011111") </port> <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00111111") </port>But I couldn't understand how to place these newly defined ports in the trial feedback section in the script. <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback,feedbackeeg, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false ] </trial> This is the only part missing from the experiment, I would be happy if you could help. :( You need to remove feedbackeeg from /stimulusframes. Then you need to use conditional logic /ontrialbegin to insert the applicable port stimulus into the trial, based on the condition. This is the exact same thing I showed you for the incentive trial. If you understand how that works, you can do it for the feedback trials as well. <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00010001") </port> <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) { trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false </trial> I made the changes as you said to send feedback with separate triggers in reward and punishment blocks. I defined a port. However, consistent fixed triggers are not coming in reward and loss blocks. A wide variety of triggers came. What is the problem? What you are missing is a reset of the stimulus presentation sequence per resetstimulusframes() /ontrialend. See the incentive trial. Anything you add to the stimulus presentation sequence persists and is cumulative otherwise. / ontrialend = [ trial.feedback.resetstimulusframes(); ] See the Programmer's Manual, page 78 and onwards. I want to define a condition in this section. <trial feedback> / ontrialbegin = [
trial.feedback.insertstimulustime(text.debug_feedback, 0); if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) {
trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); };
if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ]
if nonincentive cue comes, feedbackeeg_control comes <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> when incentive cue comes, feedbackeeg_reward comes <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> what should I do for this? You should be sufficiently familair with your script by now. So: Do you have the incentive condition in a variable (a value) somewhere, like the exp_condition? Which variable is that? <trial feedback> / ontrialbegin = [ if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) { if (values.feedback == 1) { trial.feedback.insertstimulustime(port.feedbackeeg_reward1, 0); } else if (values.feedback == 3) { trial.feedback.insertstimulustime(port.feedbackeeg_reward3, 0); } else if (values.feedback == 2 || values.feedback == 4) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } } else if (values.exp_condition == 2) { if (values.feedback == 5) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment5, 0); } else if (values.feedback == 6) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment6, 0); } else if (values.feedback == 2 || values.feedback == 4) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } } if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; } ] values.exp condition == 2 feedback triggers do not come. values.exp condition == 1 also comes. Could this be because else cannot pass from if to another? What should I do for this? I got it done, no need, thanks
|
|
|
cansu
|
|
Group: Forum Members
Posts: 38,
Visits: 136
|
+x+x+x+x+x+x+xThank you four your help🙏🏻 I was able to trigger reward and loss cues differently with your guidance, thanks again. I defined feedback punishment feedback reward and feedback loss ports with the same method, <text feedback> / items = feedback / select = values.feedback / vjustify = center / fontstyle = ("Arial", 5%, false, false, false, false, 5, 1) </text> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00011111") </port> <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00111111") </port>But I couldn't understand how to place these newly defined ports in the trial feedback section in the script. <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback,feedbackeeg, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false ] </trial> This is the only part missing from the experiment, I would be happy if you could help. :( You need to remove feedbackeeg from /stimulusframes. Then you need to use conditional logic /ontrialbegin to insert the applicable port stimulus into the trial, based on the condition. This is the exact same thing I showed you for the incentive trial. If you understand how that works, you can do it for the feedback trials as well. <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00010001") </port> <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) { trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false </trial> I made the changes as you said to send feedback with separate triggers in reward and punishment blocks. I defined a port. However, consistent fixed triggers are not coming in reward and loss blocks. A wide variety of triggers came. What is the problem? What you are missing is a reset of the stimulus presentation sequence per resetstimulusframes() /ontrialend. See the incentive trial. Anything you add to the stimulus presentation sequence persists and is cumulative otherwise. / ontrialend = [ trial.feedback.resetstimulusframes(); ] See the Programmer's Manual, page 78 and onwards. I want to define a condition in this section. <trial feedback> / ontrialbegin = [
trial.feedback.insertstimulustime(text.debug_feedback, 0); if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) {
trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); };
if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ]
if nonincentive cue comes, feedbackeeg_control comes <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> when incentive cue comes, feedbackeeg_reward comes <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> what should I do for this? You should be sufficiently familair with your script by now. So: Do you have the incentive condition in a variable (a value) somewhere, like the exp_condition? Which variable is that? <trial feedback> / ontrialbegin = [ if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) { if (values.feedback == 1) { trial.feedback.insertstimulustime(port.feedbackeeg_reward1, 0); } else if (values.feedback == 3) { trial.feedback.insertstimulustime(port.feedbackeeg_reward3, 0); } else if (values.feedback == 2 || values.feedback == 4) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } } else if (values.exp_condition == 2) { if (values.feedback == 5) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment5, 0); } else if (values.feedback == 6) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment6, 0); } else if (values.feedback == 2 || values.feedback == 4) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } } if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; } ] values.exp condition == 2 feedback triggers do not come. values.exp condition == 1 also comes. Could this be because else cannot pass from if to another? What should I do for this?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 106K
|
+x+x+x+x+x+xThank you four your help🙏🏻 I was able to trigger reward and loss cues differently with your guidance, thanks again. I defined feedback punishment feedback reward and feedback loss ports with the same method, <text feedback> / items = feedback / select = values.feedback / vjustify = center / fontstyle = ("Arial", 5%, false, false, false, false, 5, 1) </text> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00011111") </port> <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00111111") </port>But I couldn't understand how to place these newly defined ports in the trial feedback section in the script. <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback,feedbackeeg, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false ] </trial> This is the only part missing from the experiment, I would be happy if you could help. :( You need to remove feedbackeeg from /stimulusframes. Then you need to use conditional logic /ontrialbegin to insert the applicable port stimulus into the trial, based on the condition. This is the exact same thing I showed you for the incentive trial. If you understand how that works, you can do it for the feedback trials as well. <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00010001") </port> <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) { trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false </trial> I made the changes as you said to send feedback with separate triggers in reward and punishment blocks. I defined a port. However, consistent fixed triggers are not coming in reward and loss blocks. A wide variety of triggers came. What is the problem? What you are missing is a reset of the stimulus presentation sequence per resetstimulusframes() /ontrialend. See the incentive trial. Anything you add to the stimulus presentation sequence persists and is cumulative otherwise. / ontrialend = [ trial.feedback.resetstimulusframes(); ] See the Programmer's Manual, page 78 and onwards. I want to define a condition in this section. <trial feedback> / ontrialbegin = [
trial.feedback.insertstimulustime(text.debug_feedback, 0); if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) {
trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); };
if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ]
if nonincentive cue comes, feedbackeeg_control comes <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> when incentive cue comes, feedbackeeg_reward comes <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> what should I do for this? You should be sufficiently familair with your script by now. So: Do you have the incentive condition in a variable (a value) somewhere, like the exp_condition? Which variable is that?
|
|
|
cansu
|
|
Group: Forum Members
Posts: 38,
Visits: 136
|
+x+x+x+x+xThank you four your help🙏🏻 I was able to trigger reward and loss cues differently with your guidance, thanks again. I defined feedback punishment feedback reward and feedback loss ports with the same method, <text feedback> / items = feedback / select = values.feedback / vjustify = center / fontstyle = ("Arial", 5%, false, false, false, false, 5, 1) </text> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00011111") </port> <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00111111") </port>But I couldn't understand how to place these newly defined ports in the trial feedback section in the script. <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback,feedbackeeg, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false ] </trial> This is the only part missing from the experiment, I would be happy if you could help. :( You need to remove feedbackeeg from /stimulusframes. Then you need to use conditional logic /ontrialbegin to insert the applicable port stimulus into the trial, based on the condition. This is the exact same thing I showed you for the incentive trial. If you understand how that works, you can do it for the feedback trials as well. <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00010001") </port> <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) { trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false </trial> I made the changes as you said to send feedback with separate triggers in reward and punishment blocks. I defined a port. However, consistent fixed triggers are not coming in reward and loss blocks. A wide variety of triggers came. What is the problem? What you are missing is a reset of the stimulus presentation sequence per resetstimulusframes() /ontrialend. See the incentive trial. Anything you add to the stimulus presentation sequence persists and is cumulative otherwise. / ontrialend = [ trial.feedback.resetstimulusframes(); ] See the Programmer's Manual, page 78 and onwards. I want to define a condition in this section. <trial feedback> / ontrialbegin = [
trial.feedback.insertstimulustime(text.debug_feedback, 0); if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) {
trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); };
if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ]
if nonincentive cue comes, feedbackeeg_control comes <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> when incentive cue comes, feedbackeeg_reward comes <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> what should I do for this?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 106K
|
+x+x+x+xThank you four your help🙏🏻 I was able to trigger reward and loss cues differently with your guidance, thanks again. I defined feedback punishment feedback reward and feedback loss ports with the same method, <text feedback> / items = feedback / select = values.feedback / vjustify = center / fontstyle = ("Arial", 5%, false, false, false, false, 5, 1) </text> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00011111") </port> <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00111111") </port>But I couldn't understand how to place these newly defined ports in the trial feedback section in the script. <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback,feedbackeeg, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false ] </trial> This is the only part missing from the experiment, I would be happy if you could help. :( You need to remove feedbackeeg from /stimulusframes. Then you need to use conditional logic /ontrialbegin to insert the applicable port stimulus into the trial, based on the condition. This is the exact same thing I showed you for the incentive trial. If you understand how that works, you can do it for the feedback trials as well. <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00010001") </port> <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) { trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false </trial> I made the changes as you said to send feedback with separate triggers in reward and punishment blocks. I defined a port. However, consistent fixed triggers are not coming in reward and loss blocks. A wide variety of triggers came. What is the problem? What you are missing is a reset of the stimulus presentation sequence per resetstimulusframes() /ontrialend. See the incentive trial. Anything you add to the stimulus presentation sequence persists and is cumulative otherwise. / ontrialend = [ trial.feedback.resetstimulusframes(); ] See the Programmer's Manual, page 78 and onwards.
|
|
|
cansu
|
|
Group: Forum Members
Posts: 38,
Visits: 136
|
+x+x+xThank you four your help🙏🏻 I was able to trigger reward and loss cues differently with your guidance, thanks again. I defined feedback punishment feedback reward and feedback loss ports with the same method, <text feedback> / items = feedback / select = values.feedback / vjustify = center / fontstyle = ("Arial", 5%, false, false, false, false, 5, 1) </text> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00011111") </port> <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00111111") </port>But I couldn't understand how to place these newly defined ports in the trial feedback section in the script. <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback,feedbackeeg, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false ] </trial> This is the only part missing from the experiment, I would be happy if you could help. :( You need to remove feedbackeeg from /stimulusframes. Then you need to use conditional logic /ontrialbegin to insert the applicable port stimulus into the trial, based on the condition. This is the exact same thing I showed you for the incentive trial. If you understand how that works, you can do it for the feedback trials as well. <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00010000") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00010001") </port> <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; if (values.exp_condition == 0) { trial.feedback.insertstimulustime(port.feedbackeeg_control, 0); } else if (values.exp_condition == 1) { trial.feedback.insertstimulustime(port.feedbackeeg_reward, 0); } else if (values.exp_condition == 2) { trial.feedback.insertstimulustime(port.feedbackeeg_punishment, 0); }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false </trial> I made the changes as you said to send feedback with separate triggers in reward and punishment blocks. I defined a port. However, consistent fixed triggers are not coming in reward and loss blocks. A wide variety of triggers came. What is the problem?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 106K
|
+x+xThank you four your help🙏🏻 I was able to trigger reward and loss cues differently with your guidance, thanks again. I defined feedback punishment feedback reward and feedback loss ports with the same method, <text feedback> / items = feedback / select = values.feedback / vjustify = center / fontstyle = ("Arial", 5%, false, false, false, false, 5, 1) </text> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00011111") </port> <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00111111") </port>But I couldn't understand how to place these newly defined ports in the trial feedback section in the script. <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback,feedbackeeg, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false ] </trial> This is the only part missing from the experiment, I would be happy if you could help. :( You need to remove feedbackeeg from /stimulusframes. Then you need to use conditional logic /ontrialbegin to insert the applicable port stimulus into the trial, based on the condition. This is the exact same thing I showed you for the incentive trial. If you understand how that works, you can do it for the feedback trials as well.
|
|
|
cansu
|
|
Group: Forum Members
Posts: 38,
Visits: 136
|
+xThank you four your help🙏🏻 I was able to trigger reward and loss cues differently with your guidance, thanks again. I defined feedback punishment feedback reward and feedback loss ports with the same method, <text feedback> / items = feedback / select = values.feedback / vjustify = center / fontstyle = ("Arial", 5%, false, false, false, false, 5, 1) </text> <port feedbackeeg_reward> / port = COM6 / subport = data / items = ("00001111") </port> <port feedbackeeg_punishment> / port = COM6 / subport = data / items = ("00011111") </port> <port feedbackeeg_control> / port = COM6 / subport = data / items = ("00111111") </port>But I couldn't understand how to place these newly defined ports in the trial feedback section in the script. <trial feedback> / ontrialbegin = [ if (values.feedback == 1 || values.feedback == 2 || values.feedback == 5) { text.feedback.textcolor = green; } else { text.feedback.textcolor = red; }; ] / posttrialpause = values.fixediti / stimulusframes = [1 = feedback,feedbackeeg, total] / timeout = values.cueduration + values.targetduration / posttrialpause = values.iti / recorddata = false ] </trial> This is the only part missing from the experiment, I would be happy if you could help. :(
|
|
|
cansu
|
|
Group: Forum Members
Posts: 38,
Visits: 136
|
Thank you four your help🙏🏻
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 106K
|
+xI will change this part of y script below with yours and add port definitions.After that, there will be a task script that sends different triggers for cues. As far as I understand, I don't think I need to make any other changes.trial incentive>/inputdevice = mousekey/validresponse = (lbuttondown, rbuttondown)/correctresponse = (lbuttondown, rbuttondown)/responsemessage = (lbuttondown,incentivecue, 100)/responsemessage = (rbuttondown,incentivecue, 100)/ ontrialbegin = [ values.incentive_condition = 1; values.iti=0; values.targetduration = expressions.determineDuration; values.delayduration = list.delay.nextvalue; if (values.exp_condition == 1) { trial.incentive.insertstimulustime(port.incentivecueeeg_reward, 0); } else if (values.exp_condition == 2) { trial.incentive.insertstimulustime(port.incentivecueeeg_punishment, 0); }; trial.incentive.insertstimulustime(shape.incentivecue, values.cueduration); trial.incentive.insertstimulustime(shape.eraser, values.cueduration); trial.incentive.insertstimulustime(port.erasereeg, values.cueduration); trial.incentive.insertstimulustime(shape.target, (values.cueduration + values.delayduration)); trial.incentive.insertstimulustime(port.targeteeg, (values.cueduration + values.delayduration)); ]/ posttrialpause = values.fixediti/ stimulustimes = [0 = incentivecue, total]/ beginresponsetime = values.cueduration + values.delayduration/ responseinterrupt = immediate/ timeout = values.cueduration + values.delayduration + values.targetduration/ monkeyresponse = (values.responsekey)/ ontrialend = [ trial.incentive.resetstimulusframes(); values.iti = values.trialduration - values.cueduration - values.delayduration - trial.incentive.latency - values.feedbackduration; if (values.exp_condition == 0) { values.count_IncentiveControl += 1; values.countcorrect_IncentiveControl += trial.incentive.correct; list.successIncentive_Control.insertitem(trial.incentive.correct, 1); } else if (values.exp_condition == 1) { values.count_IncentiveReward += 1; values.countcorrect_IncentiveReward += trial.incentive.correct; list.successIncentive_Reward.insertitem(trial.incentive.correct, 1); } else if (values.exp_condition == 2) { values.count_IncentivePunishment += 1; values.countcorrect_IncentivePunishment += trial.incentive.correct; list.successIncentive_Punishment.insertitem(trial.incentive.correct, 1); } ;] / branch = [trial.feedback] In addition to changing <trial incentive> this way, you also need to add the two port elements I included in my response -- <port incentivecueeeg_reward> and <port incentivecueeeg_punishment> -- to your script. <port incentivecueeeg_reward> / port = COM6 / subport = data / items = ("00000001") </port>
<port incentivecueeeg_punishment> / port = COM6 / subport = data / items = ("00000010") </port> After that forget about triggers and the MID task for a while. Instead work through the Programmer's Manual from front to back and focus on understanding the basic building blocks that every Inquisit script is made up of. I.e., what are stimulus elements and what do they do? What do trial elements do? What do blocks do? And so forth. Once you have acquired these basics, you should be able to actually "read" the MID task code and have a general sense of what each thing in it does and why.
|
|
|