[info, summary] = getSPTBinfo(display, window, device_token)


GETSPTBINFO gathers all sorts of information about the computing environment in which the current experiment is being run. This information will be fairly uninteresting to the average experimenter, but is useful to have on hand in case you ever need to figure out which computer and matlab/sptb/ptb/java version a particular participant completed the study on; if someone wants to replicate your setup; or if there might be effects arising from still other features of your runtime environment. The information is also useful for debugging purposes. But probably more importantly, it is used by easyLaunch to help configure e.g., your display and device settings.


info = getSPTBinfo() returns an info struct with most fields set to NaN, except those concerning the software and computer environment. Devices and displays are not polled. [info summary] = getSPTBinfo() with any set of inputs returns a summary structure containing strings with some of the most commonly needed information. info = getSPTBinfo(display) populates the display fields with information from the display supplied as a numeric integer (typically 0 on systems with a single monitor). Note that for headless environments where no display is available (e.g., a server), this function can be called using display = -1 to designate a "scoring" mode in which devices and displays are not polled but most fields are populated. info = getSPTBinfo(display, window) provides all the information described above, plus information about the window identified using the supplied window token (obtained e.g., from tokens.main_window). info = getSPTBinfo(display, window, device_token) provides all the information described above, plus information about the device identified using the supplied device. The device may be described by name, or a cell array of strings, or a numeric array of device ID's.