![]() |
Opticka 2.18.1
Opticka is an experiment manager for behavioral research.
|
Public Member Functions | |
| function | timeLogger (in varargin) |
| Constructor. | |
| function | preAllocate (in me, in n, in m) |
| Preallocate timing and message storage. | |
| function | plot (in me) |
| Plot timing summaries and, when present, the message log. | |
| function | logStim (in me, in name, in tick) |
| Mark whether the stimulus was active for a frame tick. | |
| function | addMessage (in me, in tick, in startTime, in exitTime, in message, in timeType, in HED) |
| Append a timestamped message to the event log. | |
| function | printRunLog (in me) |
| Plot raw timing, frame deltas, timing offsets, and misses. | |
| function | plotMessages (in me) |
| Show the message log in a UI table. | |
| function | build_gui () |
| function | messageTable (in me) |
| Export the message log as a sorted table. | |
| function | toDateTime (in posixT) |
| function | calculateMisses (in me, in miss, in stimTime) |
| Count missed frames that occurred during stimulus display. | |
| function | removeEmptyValues (in me) |
| Trim unused preallocated values and normalise old log formats. | |
Public Member Functions inherited from optickaCore | |
| function | optickaCore (in varargin) |
| Class constructor. | |
| function get | fullName (in me) |
| function | getALF (in me, in subject, in lab, in create) |
| get the ALF path | |
| function | makeReport (in me, in rpt) |
| Generate a detailed report for the opticka object. | |
| 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) |
| Return the declared default value for a class property. | |
| 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 | initialiseSaveFile (in me, in varargin) |
| just get date fragment for backwards compatibility | |
| function | checkPaths (in me) |
| checks the paths are valid | |
Static Public Member Functions | |
| static function | loadobj (in s) |
| Rebuild a logger object after loading saved state. | |
Static Public Member Functions inherited from optickaCore | |
| static function | initialiseGlobals (in doReset, in doOpen) |
| static function | makeArgs (in args) |
| Converts cell args to structure array. | |
| static function | addDefaults (in args, in defs) |
| regularises and adds 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 | timer |
| Log frame timing and event annotations for a task run. | |
| Property | stimStateNames |
| Property | t |
| Property | preallocateTimes |
| Property | preallocateMessages |
| Property | screenLog |
| Property | startTime |
| Property | lastvbl |
| Property | missvbls |
| Property | tick |
| Property | tickInfo |
| Property | startRun |
| Property | verbose |
| Property | vbl |
| Property | show |
| Property | flip |
| Property | miss |
| Property | stimTime |
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 | optickaVersion |
| version number | |
| 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 | |
| function timeLogger::timeLogger | ( | in | varargin | ) |
Constructor.
| varargin |
| function timeLogger::addMessage | ( | in | me, |
| in | tick, | ||
| in | startTime, | ||
| in | exitTime, | ||
| in | message, | ||
| in | timeType, | ||
| in | HED | ||
| ) |
Append a timestamped message to the event log.
Empty timing inputs fall back to the most recent VBL time or the logger timer. HED payloads are normalised to a stored string path.
| tick | Frame index associated with the message. |
| startTime | Timestamp of message onset. |
| exitTime | Timestamp of message completion. |
| message | Text message to store. |
| timeType | Label describing how the timestamp was generated. |
| HED | Optional HED tag or HED tag object. |
| function timeLogger::build_gui | ( | ) |
| function timeLogger::calculateMisses | ( | in | me, |
| in | miss, | ||
| in | stimTime | ||
| ) |
Count missed frames that occurred during stimulus display.
| miss | Frame miss vector. |
| stimTime | Stimulus-on mask for each frame. |
|
static |
Rebuild a logger object after loading saved state.
| s | Saved struct or already-instantiated logger. |
| function timeLogger::logStim | ( | in | me, |
| in | name, | ||
| in | tick | ||
| ) |
Mark whether the stimulus was active for a frame tick.
| name | Stimulus state name for the current frame. |
| tick | Frame index to update. |
| function timeLogger::messageTable | ( | in | me | ) |
Export the message log as a sorted table.
The returned table contains onset, exit, relative time, duration, frame tick, stimulus state, free text message, time type, and HED tag.
| function timeLogger::plot | ( | in | me | ) |
Plot timing summaries and, when present, the message log.
| function timeLogger::plotMessages | ( | in | me | ) |
Show the message log in a UI table.
| function timeLogger::preAllocate | ( | in | me, |
| in | n, | ||
| in | m | ||
| ) |
Preallocate timing and message storage.
This avoids repeated array growth during a run and resets the message write index to the start of the buffers.
| n | Number of frame timing entries to reserve. |
| m | Number of message entries to reserve. |
| function timeLogger::printRunLog | ( | in | me | ) |
Plot raw timing, frame deltas, timing offsets, and misses.
| function timeLogger::removeEmptyValues | ( | in | me | ) |
Trim unused preallocated values and normalise old log formats.
This method collapses legacy message layouts into the current schema, removes missing entries, and ensures optional fields exist.
| function timeLogger::toDateTime | ( | in | posixT | ) |
| Property timeLogger::flip |
| Property timeLogger::lastvbl |
| Property timeLogger::miss |
| Property timeLogger::missvbls |
| Property timeLogger::preallocateMessages |
| Property timeLogger::preallocateTimes |
| Property timeLogger::screenLog |
| Property timeLogger::show |
| Property timeLogger::startRun |
| Property timeLogger::startTime |
| Property timeLogger::stimStateNames |
| Property timeLogger::stimTime |
| Property timeLogger::t |
| Property timeLogger::tick |
| Property timeLogger::tickInfo |
| Property timeLogger::timer |
Log frame timing and event annotations for a task run.
The class stores per-frame timing values such as VBL, draw, flip, miss, and stimulus state, together with timestamped messages that can include time type metadata and optional HED annotations. The logged data can be normalised, plotted, and exported as a table for later inspection. We use pre-allocated arrays as this is much faster...
| Property timeLogger::vbl |
| Property timeLogger::verbose |