Visual angle (dva) to pixel conversion in EventIDE

0 votes
asked Jul 19, 2016 by Marion
We're trying to use EventIDE in parallel with a software we wrote in-house. We just wanted to know the exact formula used to convert the dva eccentricity to pixel coordinates in order to have the same pixel values in both programs (EventIDE uses the monitor diagonal length in cm and the distance to screen).

1 Answer

0 votes
answered Jul 19, 2016 by Ilia Korjoukov (7,460 points)
Best answer
First, EventIDE estimates how many DVA is in 1 cm of the screen surface given the monitor distance:

double DVAInOneCM = 2 * Atan(1.0 / (2.0 * MonitorDistance)) * 180.0 / PI

Second, it estimates the diagonal length of the monitor area in pixels, given the selected screen resolution in pixels:

double MonitorDiagonalInPixels = Math.Sqrt(Math.Pow(ScreenPixelWidth, 2) + Math.Pow(ScreenPixelHeight, 2))

Finally, the conversion ratio, as a number of pixels in 1 DVA,  is derived from the above values and the monitor diagonal:

Ratio = (MonitorDiagonalInPixels / MonitorDiagonalInCM) / DVAInOneCM;

The ratio is then used in all pixel<->DVA conversions for X and Y, for instance in conversion from  the centered dva coordinates to the centered pixels coordinates:

Ypix = Ydva * Ratio + ScreenPixelHeight / 2.0;

Welcome to EventIDE Q&A forum where you can ask questions about EventIDE software and receive answers from other members of the community

FAQ questions

Installation and License



EEG Analysis

Visual Stimuli

Runtime and Data Collection