DylAFC module

class DylAFC.AFC(posDir: str, negDir: str, ansDir: str, ip: str, port: str, n0: int, n1: int, logFile: str)[source]

Bases: object

A Class for doing AFC studies. This one only does 2AFC. It is used for integrating with a tkinter interface as seen in DylAFC.

clicked(event: tkinter.Event)[source]

Call this when the user has clicked the mouse.

connect()[source]

Connects to the comparator. Waits until connection is established, therefore this method is blocking.

pressed(event: tkinter.Event)[source]

Call this when the user has pressed a keyboard button.

run()[source]

Finite state machine based on the mode, the connection status, and whether the reader has decided an image or not.

This will call itself on its own, so just make sure to call this method once with <root>.after()

showPics(pic1, pic2: int = None)[source]

show the pictures identified by the image number arguments.

If pic2 is not provided, pic1 is a boolean value for displaying either correct or incorrect.

switchModes()[source]

Call this when switching modes to make sure the class is ready to start a mode.