add spatial gaussian noise


Author
Message
nakayama
nakayama
Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)Distinguished Member (3.4K reputation)
Group: Forum Members
Posts: 71, Visits: 407
Hi, Dave
I wish to ask whether it is possible to add a gaussian distributed noise to the values. errordis which is defined as the distance between the clicked position and the start position.
For example, If the values.errordis is 500 pixel. I wish to add a gaussian noise centered on 500 pixel  with a standard deviation of 10 pixel.
So the final recorded value is, say, 505, due to the added noise.
My file is attached below.
Thank you for your attention.
Attachments
experiment.iqx (24 views, 1.00 KB)
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
nakayama - 7/21/2020
Hi, Dave
I wish to ask whether it is possible to add a gaussian distributed noise to the values. errordis which is defined as the distance between the clicked position and the start position.
For example, If the values.errordis is 500 pixel. I wish to add a gaussian noise centered on 500 pixel  with a standard deviation of 10 pixel.
So the final recorded value is, say, 505, due to the added noise.
My file is attached below.
Thank you for your attention.

https://www.millisecond.com/support/docs/v5/html/language/functions/randgaussian.htm

I.e. something like this:

<data>
/ columns=[values.errordis values.errordis_plus_noise]
/ separatefiles = true
</data>

<values>
/ax=0
/ay=0
/errordis=0
/errordis_plus_noise=0
/ initialx=960
/ initialy=600
</values>



<trial click>
/ ontrialend = [trial.click.resetstimulusframes()]
/ validresponse = (screen)
/ stimulustimes = [0=screen,posx,posy,pose]
/ ontrialend = [values.errordis = sqrt(pow(trial.click.responsex-values.initialx,2)+pow(trial.click.responsey-values.initialy,2))]
/ ontrialend = [
    values.errordis_plus_noise = randgaussian(values.errordis, 10);
]

/ ontrialend = [values.ax=trial.click.responsex; values.ay=trial.click.responsey]
/ responseinterrupt = frames
/ inputdevice = mouse
/ screencapture = true
</trial>

Edited 2 Months Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search