Nakayama Yao
|
|
Group: Forum Members
Posts: 39,
Visits: 230
|
Hi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xHi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama No, that is not possible. A trial will always record a response unless its /recorddata attribute is set to false. This attribute, however, cannot be set dynamically. What specifically is the use case here, i.e. _why_ do you want the trial to not record responses in some cases / for what purpose?
|
|
|
Nakayama Yao
|
|
Group: Forum Members
Posts: 39,
Visits: 230
|
+x+xHi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama No, that is not possible. A trial will always record a response unless its /recorddata attribute is set to false. This attribute, however, cannot be set dynamically. What specifically is the use case here, i.e. _why_ do you want the trial to not record responses in some cases / for what purpose? Thank you Dave for your reply. I wish to calculate the average points calculated over the trials. if on one some trials the gained points are too large or small, it will affect the mean largely. so I want to skip the nth trial or to maintain the avgpoints calculated from the n-1 trial, if an outliner point is on the nth trial. <trial tap> / ontrialbegin = [values.avgpoints=values.points/trial.tap.count] Best,
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+xHi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama No, that is not possible. A trial will always record a response unless its /recorddata attribute is set to false. This attribute, however, cannot be set dynamically. What specifically is the use case here, i.e. _why_ do you want the trial to not record responses in some cases / for what purpose? Thank you Dave for your reply. I wish to calculate the average points calculated over the trials. if on one some trials the gained points are too large or small, it will affect the mean largely. so I want to skip the nth trial or to maintain the avgpoints calculated from the n-1 trial, if an outliner point is on the nth trial. <trial tap> / ontrialbegin = [values.avgpoints=values.points/trial.tap.count] Best, Then you should not try to suppress the trial from recording the response, but instead modify the calculation of the average such as to exclude those outliers. I.e. do something like <trial tap> / ontrialend = [if (values.a>0.1) {values.taptrialcount += 1; values.pointssum += values.pointsinthistrial}] / ontrialend = [values.avgpoints = values.pointssum / values.taptrialcount] ... </trial> In other words, the above will only change the average if values.a is greater than 0.1. Hope this helps.
|
|
|
Nakayama Yao
|
|
Group: Forum Members
Posts: 39,
Visits: 230
|
+x+x+x+xHi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama No, that is not possible. A trial will always record a response unless its /recorddata attribute is set to false. This attribute, however, cannot be set dynamically. What specifically is the use case here, i.e. _why_ do you want the trial to not record responses in some cases / for what purpose? Thank you Dave for your reply. I wish to calculate the average points calculated over the trials. if on one some trials the gained points are too large or small, it will affect the mean largely. so I want to skip the nth trial or to maintain the avgpoints calculated from the n-1 trial, if an outliner point is on the nth trial. <trial tap> / ontrialbegin = [values.avgpoints=values.points/trial.tap.count] Best, Then you should not try to suppress the trial from recording the response, but instead modify the calculation of the average such as to exclude those outliers. I.e. do something like <trial tap> / ontrialend = [if (values.a>0.1) {values.taptrialcount += 1; values.pointssum += values.pointsinthistrial}] / ontrialend = [values.avgpoints = values.pointssum / values.taptrialcount] ... </trial> In other words, the above will only change the average if values.a is greater than 0.1. Hope this helps. Thank you Dave, it works!
|
|
|
Nakayama Yao
|
|
Group: Forum Members
Posts: 39,
Visits: 230
|
+x+x+x+xHi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama No, that is not possible. A trial will always record a response unless its /recorddata attribute is set to false. This attribute, however, cannot be set dynamically. What specifically is the use case here, i.e. _why_ do you want the trial to not record responses in some cases / for what purpose? Thank you Dave for your reply. I wish to calculate the average points calculated over the trials. if on one some trials the gained points are too large or small, it will affect the mean largely. so I want to skip the nth trial or to maintain the avgpoints calculated from the n-1 trial, if an outliner point is on the nth trial. <trial tap> / ontrialbegin = [values.avgpoints=values.points/trial.tap.count] Best, Then you should not try to suppress the trial from recording the response, but instead modify the calculation of the average such as to exclude those outliers. I.e. do something like <trial tap> / ontrialend = [if (values.a>0.1) {values.taptrialcount += 1; values.pointssum += values.pointsinthistrial}] / ontrialend = [values.avgpoints = values.pointssum / values.taptrialcount] ... </trial> In other words, the above will only change the average if values.a is greater than 0.1. Hope this helps. Hi Dave, May I ask another question down here? I wish to calculate the coefficient of variance every 10 trials. I tended to use list to store the previous latency and clear out the previous 10 latency. . It seems not working using: and says "expression contains the wrong number of arguments in a function call" / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems(trial.tap2.latency)] / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] Best Wishes,
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+xHi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama No, that is not possible. A trial will always record a response unless its /recorddata attribute is set to false. This attribute, however, cannot be set dynamically. What specifically is the use case here, i.e. _why_ do you want the trial to not record responses in some cases / for what purpose? Thank you Dave for your reply. I wish to calculate the average points calculated over the trials. if on one some trials the gained points are too large or small, it will affect the mean largely. so I want to skip the nth trial or to maintain the avgpoints calculated from the n-1 trial, if an outliner point is on the nth trial. <trial tap> / ontrialbegin = [values.avgpoints=values.points/trial.tap.count] Best, Then you should not try to suppress the trial from recording the response, but instead modify the calculation of the average such as to exclude those outliers. I.e. do something like <trial tap> / ontrialend = [if (values.a>0.1) {values.taptrialcount += 1; values.pointssum += values.pointsinthistrial}] / ontrialend = [values.avgpoints = values.pointssum / values.taptrialcount] ... </trial> In other words, the above will only change the average if values.a is greater than 0.1. Hope this helps. Hi Dave, May I ask another question down here? I wish to calculate the coefficient of variance every 10 trials. I tended to use list to store the previous latency and clear out the previous 10 latency. . It seems not working using: and says "expression contains the wrong number of arguments in a function call" / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems(trial.tap2.latency)] / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] Best Wishes, Several things: #1: You're missing a bunch of braces, I think: / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] and / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] should read / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) {values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1;};] and / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) {values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1;};] if you want the three statements executed _conditionally_. #2: The error message is due to the argument you supplied here: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems( trial.tap2.latency)] You need not and should not provide an argument at all, i.e. this ought to simply read: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems();] without any argument.
|
|
|
Nakayama Yao
|
|
Group: Forum Members
Posts: 39,
Visits: 230
|
+x+x+x+x+x+xHi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama No, that is not possible. A trial will always record a response unless its /recorddata attribute is set to false. This attribute, however, cannot be set dynamically. What specifically is the use case here, i.e. _why_ do you want the trial to not record responses in some cases / for what purpose? Thank you Dave for your reply. I wish to calculate the average points calculated over the trials. if on one some trials the gained points are too large or small, it will affect the mean largely. so I want to skip the nth trial or to maintain the avgpoints calculated from the n-1 trial, if an outliner point is on the nth trial. <trial tap> / ontrialbegin = [values.avgpoints=values.points/trial.tap.count] Best, Then you should not try to suppress the trial from recording the response, but instead modify the calculation of the average such as to exclude those outliers. I.e. do something like <trial tap> / ontrialend = [if (values.a>0.1) {values.taptrialcount += 1; values.pointssum += values.pointsinthistrial}] / ontrialend = [values.avgpoints = values.pointssum / values.taptrialcount] ... </trial> In other words, the above will only change the average if values.a is greater than 0.1. Hope this helps. Hi Dave, May I ask another question down here? I wish to calculate the coefficient of variance every 10 trials. I tended to use list to store the previous latency and clear out the previous 10 latency. . It seems not working using: and says "expression contains the wrong number of arguments in a function call" / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems(trial.tap2.latency)] / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] Best Wishes, Several things: #1: You're missing a bunch of braces, I think: / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] and / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] should read / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) {values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1;};] and / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) {values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1;};] if you want the three statements executed _conditionally_. #2: The error message is due to the argument you supplied here: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems( trial.tap2.latency)] You need not and should not provide an argument at all, i.e. this ought to simply read: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems();] without any argument. Hi Dave. The error are gone but it stopped recording (always show 0) values.ag and values.sd from trial 11th to trial 20th. I tried to use another values/list to record but it doesn't work. Basically what I wanted is 1. calculate values.cof from trial 1th to trial 10th, based on values.ag and values.sd from trial 1th to trial 10th. 2. reset values.sd, ag, cof to 0 at trial 10th. 3. calculate values.cof from trial 11th to trial 20th, based on values.ag and values.sd from trial 11th to trial 20th. And I attached my file below.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+x+x+x+x+x+xHi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama No, that is not possible. A trial will always record a response unless its /recorddata attribute is set to false. This attribute, however, cannot be set dynamically. What specifically is the use case here, i.e. _why_ do you want the trial to not record responses in some cases / for what purpose? Thank you Dave for your reply. I wish to calculate the average points calculated over the trials. if on one some trials the gained points are too large or small, it will affect the mean largely. so I want to skip the nth trial or to maintain the avgpoints calculated from the n-1 trial, if an outliner point is on the nth trial. <trial tap> / ontrialbegin = [values.avgpoints=values.points/trial.tap.count] Best, Then you should not try to suppress the trial from recording the response, but instead modify the calculation of the average such as to exclude those outliers. I.e. do something like <trial tap> / ontrialend = [if (values.a>0.1) {values.taptrialcount += 1; values.pointssum += values.pointsinthistrial}] / ontrialend = [values.avgpoints = values.pointssum / values.taptrialcount] ... </trial> In other words, the above will only change the average if values.a is greater than 0.1. Hope this helps. Hi Dave, May I ask another question down here? I wish to calculate the coefficient of variance every 10 trials. I tended to use list to store the previous latency and clear out the previous 10 latency. . It seems not working using: and says "expression contains the wrong number of arguments in a function call" / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems(trial.tap2.latency)] / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] Best Wishes, Several things: #1: You're missing a bunch of braces, I think: / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] and / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] should read / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) {values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1;};] and / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) {values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1;};] if you want the three statements executed _conditionally_. #2: The error message is due to the argument you supplied here: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems( trial.tap2.latency)] You need not and should not provide an argument at all, i.e. this ought to simply read: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems();] without any argument. Hi Dave. The error are gone but it stopped recording (always show 0) values.ag and values.sd from trial 11th to trial 20th. I tried to use another values/list to record but it doesn't work. Basically what I wanted is 1. calculate values.cof from trial 1th to trial 10th, based on values.ag and values.sd from trial 1th to trial 10th. 2. reset values.sd, ag, cof to 0 at trial 10th. 3. calculate values.cof from trial 11th to trial 20th, based on values.ag and values.sd from trial 11th to trial 20th. And I attached my file below. #1: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems()] is wrong and needs to read / ontrialbegin = [if (values.trialcount==10) list.latency.clearitems()] #2: / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) {values. ag2=list. latency2.mean; values. sd2=list. latency2.standarddeviation;values.cof2=values. sd1/values. ag1;};] You are using an entirely different <list> called "latency2" here and your values.cof2 is calculated based on the wrong values. If anything, it should be alues.cof2=values. sd2/values. ag2
|
|
|
Nakayama Yao
|
|
Group: Forum Members
Posts: 39,
Visits: 230
|
+x+x+x+x+x+x+x+xHi Inquisit Community, I wish to find a syntax in the <trial> that states: recordresponse == true if values.a>0.1 so basically, whether record the current response depends on some values. Or if there is an another way to do so? Thank you in advance. Best, Nakayama No, that is not possible. A trial will always record a response unless its /recorddata attribute is set to false. This attribute, however, cannot be set dynamically. What specifically is the use case here, i.e. _why_ do you want the trial to not record responses in some cases / for what purpose? Thank you Dave for your reply. I wish to calculate the average points calculated over the trials. if on one some trials the gained points are too large or small, it will affect the mean largely. so I want to skip the nth trial or to maintain the avgpoints calculated from the n-1 trial, if an outliner point is on the nth trial. <trial tap> / ontrialbegin = [values.avgpoints=values.points/trial.tap.count] Best, Then you should not try to suppress the trial from recording the response, but instead modify the calculation of the average such as to exclude those outliers. I.e. do something like <trial tap> / ontrialend = [if (values.a>0.1) {values.taptrialcount += 1; values.pointssum += values.pointsinthistrial}] / ontrialend = [values.avgpoints = values.pointssum / values.taptrialcount] ... </trial> In other words, the above will only change the average if values.a is greater than 0.1. Hope this helps. Hi Dave, May I ask another question down here? I wish to calculate the coefficient of variance every 10 trials. I tended to use list to store the previous latency and clear out the previous 10 latency. . It seems not working using: and says "expression contains the wrong number of arguments in a function call" / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems(trial.tap2.latency)] / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] Best Wishes, Several things: #1: You're missing a bunch of braces, I think: / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] and / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1] should read / ontrialbegin = [if (values.trialcount>=1 && values.trialcount<10) {values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1;};] and / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) {values.ag1=list.latency.mean; values.sd1=list.latency.standarddeviation;values.cof1=values.sd1/values.ag1;};] if you want the three statements executed _conditionally_. #2: The error message is due to the argument you supplied here: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems( trial.tap2.latency)] You need not and should not provide an argument at all, i.e. this ought to simply read: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems();] without any argument. Hi Dave. The error are gone but it stopped recording (always show 0) values.ag and values.sd from trial 11th to trial 20th. I tried to use another values/list to record but it doesn't work. Basically what I wanted is 1. calculate values.cof from trial 1th to trial 10th, based on values.ag and values.sd from trial 1th to trial 10th. 2. reset values.sd, ag, cof to 0 at trial 10th. 3. calculate values.cof from trial 11th to trial 20th, based on values.ag and values.sd from trial 11th to trial 20th. And I attached my file below. #1: / ontrialbegin = [if (values.trialcount=10) list.latency.clearitems()] is wrong and needs to read / ontrialbegin = [if (values.trialcount==10) list.latency.clearitems()] #2: / ontrialbegin = [if (values.trialcount>10 && values.trialcount<20) {values. ag2=list. latency2.mean; values. sd2=list. latency2.standarddeviation;values.cof2=values. sd1/values. ag1;};] You are using an entirely different <list> called "latency2" here and your values.cof2 is calculated based on the wrong values. If anything, it should be alues.cof2=values. sd2/values. ag2 Thank you. Now everything is great.
|
|
|