Opticka 2.16.1
Opticka is an experiment manager for behavioral research.
|
GUI Manager for runExperiment() class. More...
GUI Manager for runExperiment() class.
Opticka is an object-oriented experiment manager wrapping the Psychophysics toolbox; see http://iandol.github.com/opticka/ for more details. This class builds and controls the GUI that manages interaction with runExperiment and other classes (screenManager, metaStimulus, taskSequence, stateMachine etc.)
expose maskStimulus settings in the optickaGUI
more flexible tweaking of arduino settings
Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md
Public Member Functions | |
function | opticka (in varargin) |
Class constructor. | |
function | amIRemote (in me) |
Check if we are remote by checking existance of UI. | |
function | connectToOmniplex (in me) |
function | sendOmniplexStimulus (in me, in sendLog) |
function | initialiseUI (in me) |
Start the UI. | |
function | getScreenVals (in me) |
function | getTaskVals (in me, in randomise) |
function | getStateInfo (in met, in kind) |
function | clearStimulusList (in me) |
function | clearVariableList (in me) |
function | addStimulus (in me) |
function | deleteStimulus (in me) |
function | readPanel (in me, in src, in varargin) |
function | editStimulus (in me) |
function | modifyStimulus (in me) |
function | addVariable (in me) |
addVariable Gets the settings from th UI and updates our runExperiment object | |
function | updateVariable (in me) |
updateVariable Gets the values from the UI and updates that var | |
function | editVariable (in me) |
editVariable Gets the settings from the UI and updates our runExperiment object | |
function | deleteVariable (in me) |
deleteVariable Gets the settings from the UI and updates our runExperiment object | |
function | copyVariable (in me) |
copyVariable Gets the settings from the UI and updates our runExperiment object | |
function | loadCalibration (in me) |
Load calibration file, better that this is manual... | |
function | saveCalibration (in me) |
function | loadPrefs (in me) |
loadPrefs Load prefs better left local to the machine | |
function | savePrefs (in me) |
savePrefs Save prefs better left local to the machine | |
function | router (in me, in in, in vars) |
Route to private methods. | |
function | deleteProtocol (in me) |
Delete Protocol Delete Protocol. | |
function | saveProtocol (in me, in copyIt) |
Save Protocol Save Protocol. | |
function | saveData (in me) |
Save Data Save data, by cloning a copy of the opticka object and saving this. | |
function | loadProtocol (in me, in useList) |
Load Protocol Load Protocol. | |
function | refreshProtocolsList (in me, in ppath) |
Refresh the UI list of Protocols Refresh the UI list of Protocols. | |
Public Member Functions inherited from optickaCore | |
function | optickaCore (in varargin) |
Class constructor. | |
function get | fullName (in me) |
function | getALF (in me, in subject, in sessionPrefix, in lab, in create) |
function | findAttributes (in me, in attrName, in attrValue) |
function | findAttributesandType (in me, in attrName, in attrValue, in type) |
find properties of object with specific attributes, for example all properties whose GetAcccess attribute is public and type is logical. | |
function | findPropertyDefault (in me, in propName) |
function | clone (in me) |
Use this syntax to make a deep copy of the object, i.e. OBJ_OUT has the same field values, but will not behave as a handle-copy of me anymore. | |
function | checkSuperclasses (in List) |
function | editProperties (in me, in properties) |
method to modify a set of properties | |
function | setProp (in me, in property, in value) |
method to fast change a particular value. This is useful for use in anonymous functions, like in the state machine. | |
function | initialiseGlobals (in me, in doReset, in doOpen) |
function | initialiseSaveFile (in me) |
Initialise Save prefix. | |
function | checkPaths (in me) |
checks the paths are valid | |
Static Public Member Functions | |
static function | loadobj (in in) |
loadobj To be backwards compatible to older saved protocols, we have to parse structures / objects specifically during object load | |
static function | ping (in rAddress) |
ping – ping a network address We send a single packet and wait only 10ms to ensure we have a fast connection | |
static function | gs (in inhandle, in value) |
gs (getstring) | |
static function | gi (in inhandle) |
gi (getitems) items of a dropdown menu | |
static function | gp (in inhandle) |
gi (getposition) 1st position of selection in dropdown menu | |
static function | gd (in inhandle) |
gd (getdouble) | |
static function | gn (in inhandle) |
gn (getnumber) | |
static function | ge (in inhandle) |
get string but eval to variable | |
static function | gv (in inhandle) |
gv (getvalue) | |
static function | gl (in inhandle) |
gl (getlogical) | |
static function | centerGUI (in uihandle) |
move GUI to center of screen | |
static function | cellAsString (in c, in addBrackets) |
convert a cell into a string to display in UI that we can eval back to a cell array. It collapses nested cells. | |
static function | resizeFigure (in position, in size, in mult) |
position and size figure | |
Static Public Member Functions inherited from optickaCore | |
static function | makeArgs (in args) |
Converts cell args to structure array. | |
static function | addDefaults (in args, in defs) |
add default options to arg input | |
static function | hasKey (in in, in key) |
check if a struct / object has a propery / field | |
static function | getKeys (in device) |
PTB Get key presses, stops key bouncing. | |
Public Attributes | |
Property | optickaVersion |
version number | |
Property | remote |
is this a remote instance? | |
Property | r |
this is the main runExperiment object | |
Property | verbose |
run in verbose mode? | |
Property | store |
general store for misc properties | |
Property | initUI |
initialise UI? | |
Property | ui |
all of the handles to the opticka_ui GUI | |
Property | oc |
omniplex connection, via TCP | |
Property | me |
Property | if |
Property | else |
Public Attributes inherited from optickaCore | |
Property | name |
object name | |
Property | comment |
comment | |
Property | verbose |
verbose logging, subclasses must assign this. This is normally logical true/false | |
Property | dateStamp |
clock() dateStamp set on construction | |
Property | uuid |
universal ID | |
Property | paths |
storage of various paths | |
Property | fullName |
The fullName is the object name combined with its uuid and class name. | |
Additional Inherited Members | |
Protected Member Functions inherited from optickaCore | |
function | parseArgs (in me, in args, in allowedProperties) |
Sets properties from a structure or normal arguments pairs, ignores invalid or non-allowed properties. | |
function | addArgs (in me, in args) |
function | setPaths (in me) |
Sets properties from a structure or normal arguments pairs, ignores invalid or non-allowed properties. | |
function | getFonts (in me) |
set paths for object | |
function | toStructure (in me) |
Converts properties to a structure. | |
function | getType (in me, in in) |
function | logOutput (in me, in in, in message, in override) |
Give a metaproperty return the likely property class. | |
function | salutation (in me, in varargin) |
Prints messages dependent on verbosity. | |
Protected Attributes inherited from optickaCore | |
Property | cloning |
are we cloning this from another object | |
Property | mversion |
Matlab version number, this is transient so it is not saved. | |
Property | sansFont |
sans font | |
Property | monoFont |
monoFont | |
Property | className |
class name | |
Property | savePrefix |
save prefix generated from clock time | |
Property | fullName_ |
cached full name | |
opticka::opticka | ( | in | varargin | ) |
Class constructor.
varargin | are passed as a structure of properties which is parsed. |
opticka::addStimulus | ( | in | me | ) |
Run when we've added a new stimulus
<br> |
function opticka::addVariable | ( | in | me | ) |
addVariable Gets the settings from th UI and updates our runExperiment object
<br> |
opticka::amIRemote | ( | in | me | ) |
Check if we are remote by checking existance of UI.
|
static |
convert a cell into a string to display in UI that we can eval back to a cell array. It collapses nested cells.
c | cell array of strings |
addBrackets; | add { } around string or not? |
|
static |
move GUI to center of screen
inhandle | handle to UI element |
opticka::clearStimulusList | ( | in | me | ) |
Erase any stimuli in the list.
<br> |
function opticka::clearVariableList | ( | in | me | ) |
opticka::connectToOmniplex | ( | in | me | ) |
Gets the settings from the UI and connects to omniplex
function opticka::copyVariable | ( | in | me | ) |
copyVariable Gets the settings from the UI and updates our runExperiment object
<br> |
function opticka::deleteProtocol | ( | in | me | ) |
Delete Protocol Delete Protocol.
<br> |
opticka::deleteStimulus | ( | in | me | ) |
<br> |
function opticka::deleteVariable | ( | in | me | ) |
deleteVariable Gets the settings from the UI and updates our runExperiment object
<br> |
opticka::editStimulus | ( | in | me | ) |
Gets the settings from the UI and updates our runExperiment object.
function opticka::editVariable | ( | in | me | ) |
editVariable Gets the settings from the UI and updates our runExperiment object
<br> |
|
static |
gd (getdouble)
inhandle | handle to UI element |
|
static |
get string but eval to variable
inhandle | handle to UI element |
opticka::getScreenVals | ( | in | me | ) |
Gets the settings from the UI and updates our runExperiment object.
Gets the settings from th UI and updates our runExperiment object
<br> |
function opticka::getStateInfo | ( | in | met, |
in | kind | ||
) |
opticka::getTaskVals | ( | in | me, |
in | randomise | ||
) |
Gets the settings from the UI and updates our task object.
randomise | do we run randomiseTask()? [default=FALSE] |
|
static |
gi (getitems) items of a dropdown menu
inhandle | handle to UI element |
|
static |
gl (getlogical)
inhandle | handle to UI element |
|
static |
gn (getnumber)
inhandle | handle to UI element |
|
static |
gi (getposition) 1st position of selection in dropdown menu
inhandle | handle to UI element |
|
static |
gs (getstring)
inhandle | handle to UI element |
value |
|
static |
gv (getvalue)
inhandle | handle to UI element |
opticka::initialiseUI | ( | in | me | ) |
Start the UI.
function opticka::loadCalibration | ( | in | me | ) |
Load calibration file, better that this is manual...
|
static |
loadobj To be backwards compatible to older saved protocols, we have to parse structures / objects specifically during object load
in | input object/structure |
function opticka::loadPrefs | ( | in | me | ) |
loadPrefs Load prefs better left local to the machine
opticka::loadProtocol | ( | in | me, |
in | useList | ||
) |
Load Protocol Load Protocol.
ui | – do we show a uiload dialog? |
opticka::modifyStimulus | ( | in | me | ) |
Gets the settings from the UI and updates our runExperiment object
<br> |
|
static |
ping – ping a network address We send a single packet and wait only 10ms to ensure we have a fast connection
rAddress | remote address |
opticka::readPanel | ( | in | me, |
in | src, | ||
in | varargin | ||
) |
src | source object |
varargin |
function opticka::refreshProtocolsList | ( | in | me, |
in | ppath | ||
) |
Refresh the UI list of Protocols Refresh the UI list of Protocols.
|
static |
position and size figure
opticka::router | ( | in | me, |
in | in, | ||
in | vars | ||
) |
Route to private methods.
in | switch to route to correct method. |
vars | additional vars to pass. |
function opticka::saveCalibration | ( | in | me | ) |
function opticka::saveData | ( | in | me | ) |
Save Data Save data, by cloning a copy of the opticka object and saving this.
function opticka::savePrefs | ( | in | me | ) |
savePrefs Save prefs better left local to the machine
function opticka::saveProtocol | ( | in | me, |
in | copyIt | ||
) |
Save Protocol Save Protocol.
<br> |
opticka::sendOmniplexStimulus | ( | in | me, |
in | sendLog | ||
) |
Gets the settings from the UI and connects to omniplex.
sendLog | send the run log [default = false] |
function opticka::updateVariable | ( | in | me | ) |
updateVariable Gets the values from the UI and updates that var
<br> |
Property opticka::else |
Property opticka::if |
Property opticka::initUI |
initialise UI?
Property opticka::me |
Property opticka::oc |
omniplex connection, via TCP
Property opticka::optickaVersion |
version number
Property opticka::r |
this is the main runExperiment object
Property opticka::remote |
is this a remote instance?
Property opticka::store |
general store for misc properties
Property opticka::ui |
all of the handles to the opticka_ui GUI
Property opticka::verbose |
run in verbose mode?