R Under development (unstable) (2023-11-06 r85483 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > #require(RUnit) > > #check for an unseen stimulus (below threshold) > > test.unseen_stims <- function() + { + require(OPI) + data("RtDbUnits") + checkTrue(chooseOpi("SimHensonRT"), 'RT Henson sim is chosen') + + xs <- c(3, 2, -20, 0, 10,5, -5, -50, -20, 0, 10,5, -5, -50) #, 3, 2, + x_mat <- matrix(xs, 2) + ys <- c(0, -70, -20, 0, 14,2, -23, -30, -20, 0, 10,5, -5, -50) #3, 2, + y_mat <- matrix(ys, 2) + pointsTested = length(y_mat[1,]) + + SPEED = 3; + LEVEL = dbTocd(50,10000) + + for (i in 1:pointsTested) { + stim <- list(path=list(x=x_mat[,i], y=y_mat[,i]),sizes=(0.43), colors=("white"), levels=(LEVEL), speeds=c(SPEED)) + class(stim) <- "opiKineticStimulus" + + e <- opiInitialize(type="C", A=NA, B=NA, cap=6, display=NULL, maxStim=10000/pi, rtData=RtDbUnits, rtFP=1:1600) + checkEquals(NULL, e) + + result <- opiPresent(stim, tt= list(c(0,0,0,0,0)), fpr=0, fnr=0) + + checkTrue(!result$seen) + + checkEquals(NULL, opiClose()) + } + + } > > proc.time() user system elapsed 0.09 0.06 0.14