Objects Measurement¶
The stimuli delivery use a CSS backend, so the units system must be inherited from them, however, these units are not based on a real representation, so must be used u.scale to draw with the correct unit.
Degrees of visual angle (dva) are a common unit used in neuroscience experiments designs, are based on the perspective of size, this units needs the real DPI and the distance from monitor.
By default the dpi is calculated from the monitor running BCI-Framework, it must be recalculated if a different monitor is used for stimuli delivery.
Example: ``` from bci_framework.extensions.stimuli_delivery.utils import Units as u
real_unit = f”{u.scale(3)}px” real_unit = f”{u.scale(3, dpi=141)}px”
# Where d is distance from monitor and dpi is the real monitor DPI u(d=1.2, dpi=141) # Define d and dpi for all calls u.dva(3)
# Define d and dpi on each call u.dva(3, d=1.2, dpi=141) ```