opiPresent_for_Compass {OPI}R Documentation

Implementation of opiPresent for the Compass machine.

Description

This is for internal use only. Use opiSetup() with these Arguments and you will get the Value back.

Arguments

stim

A list of stimulus parameters (see Details).

nextStim

Unused - included for compliance with OPI standard.

Details

If the chosen OPI implementation is Compass, then nextStim is ignored. Note that the dB level is rounded to the nearest integer.

If tracking is on, then this will block until the tracking is obtained, and the stimulus presented.

stim is a list containing some or all of the following elements:

Stimulus duration is assumed to be 200ms, and size is assumed to be Goldmann III (0.43 degrees diameter), color is assumed to be white. These cannot be changed.

Value

A list containing:

Examples

## Not run: 
  # Set up the Compass
  chooseOpi("Compass")
  result <- opiInitialize(ip = "192.168.1.7", port = 44965)
  if (!is.null(result$err))
    stop("Initialisation failed")

   #' @param x X location of stim in degrees
   #' @param y Y location of stim in degrees
   #' @param size If 3, Goldmann III, else V
   #' @param db Value in dB
   #' @return stim object ready for opiPresent
   makeStim <- function(x, y, size, db) {
       s <- list(x = x, y = y, level = dbTocd(db, 10000 / pi),
           size = ifelse(size == 3, 0.43, 1.77),
           duration = 200, responseWindow = 1500)
       class(s) <- "opiStaticStimulus"
       return(s)
   }

   result <- opiPresent(makeStim(9, 9, 3, 10))

## End(Not run)


[Package OPI version 3.0.2 Index]