Can Inquisite use equations to mathematically define the gray-scale values of visual stimuli?


Can Inquisite use equations to mathematically define the gray-scale...

Author
Message
matthewsn@denison.edu
matthewsn@denison.edu
Associate Member
Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)

Group: Forum Members
Posts: 4, Visits: 8
Can Inquisite use equations to mathematically define the gray-scale values of visual stimuli?
A related question is whether inquisite can use equations to define the motion (or other dynamic properties) of visual stimuli.
Dave
Dave
Supreme Being
Supreme Being (468K reputation)Supreme Being (468K reputation)Supreme Being (468K reputation)Supreme Being (468K reputation)Supreme Being (468K reputation)Supreme Being (468K reputation)Supreme Being (468K reputation)Supreme Being (468K reputation)Supreme Being (468K reputation)

Group: Administrators
Posts: 9K, Visits: 38K
matthewsn@denison.edu - Wednesday, May 30, 2018
Can Inquisite use equations to mathematically define the gray-scale values of visual stimuli?
A related question is whether inquisite can use equations to define the motion (or other dynamic properties) of visual stimuli.

Color of stimuli is determined by RGB values ranging from 0 to 255 in each color channel, and grey hues are what results when all three channels -- red, green, and blue -- are set to the same value. It is possible to set these values programmatically and dynamically. Here's an example that will change the color of a square from white to black across the entire range of grey values on a trial by trial basis:

<values>
/ channel = 256
</values>

<shape square>
/ shape = rectangle
/ size = (500px, 500px)
/ color = (values.channel, values.channel, values.channel)
/ erase = false
</shape>

<trial mytrial>
/ ontrialbegin = [
    values.channel -= 1;
]
/ stimulusframes = [1=square]
/ validresponse = (0)
/ trialduration = 20
</trial>

<block myblock>
/ trials = [1-256 = mytrial]
</block>

You can, of course, calculate the channel value via any kind of mathematical expression as long as the result is an integer in the range 0 to 255.

As for the movement of objects, that's trickier and depends on what exactly you want to do. Similar to the above example, you can of course manipulate an object's on-screen position mathematically on a trial by trial basis, resulting in a quasi-animation.

You can also use stimulus elements' /animation attribute https://www.millisecond.com/support/docs/v5/html/language/attributes/animation.htm to have an object move within a single trial, albeit your options are somewhat more limited here.

Hope this helps.

matthewsn@denison.edu
matthewsn@denison.edu
Associate Member
Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)

Group: Forum Members
Posts: 4, Visits: 8
Dave - Wednesday, May 30, 2018
matthewsn@denison.edu - Wednesday, May 30, 2018
Can Inquisite use equations to mathematically define the gray-scale values of visual stimuli?
A related question is whether inquisite can use equations to define the motion (or other dynamic properties) of visual stimuli.

Color of stimuli is determined by RGB values ranging from 0 to 255 in each color channel, and grey hues are what results when all three channels -- red, green, and blue -- are set to the same value. It is possible to set these values programmatically and dynamically. Here's an example that will change the color of a square from white to black across the entire range of grey values on a trial by trial basis:

<values>
/ channel = 256
</values>

<shape square>
/ shape = rectangle
/ size = (500px, 500px)
/ color = (values.channel, values.channel, values.channel)
/ erase = false
</shape>

<trial mytrial>
/ ontrialbegin = [
    values.channel -= 1;
]
/ stimulusframes = [1=square]
/ validresponse = (0)
/ trialduration = 20
</trial>

<block myblock>
/ trials = [1-256 = mytrial]
</block>

You can, of course, calculate the channel value via any kind of mathematical expression as long as the result is an integer in the range 0 to 255.

As for the movement of objects, that's trickier and depends on what exactly you want to do. Similar to the above example, you can of course manipulate an object's on-screen position mathematically on a trial by trial basis, resulting in a quasi-animation.

You can also use stimulus elements' /animation attribute https://www.millisecond.com/support/docs/v5/html/language/attributes/animation.htm to have an object move within a single trial, albeit your options are somewhat more limited here.

Hope this helps.

This is extremely helpful! Thank you!
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search