Opticka  2.15.5
Opticka is an experiment manager for behavioral research.
eyelinkAnalysis Class Reference

eyelinkAnalysis offers a set of methods to load, parse & plot raw EDF files. It understands opticka trials (where EDF messages TRIALID start a trial and TRIAL_RESULT ends a trial by default) so can parse eye data and plot it for trial groups. You can also manually find microsaccades, and perform ROI/TOI filtering on the eye movements. More...

Detailed Description

eyelinkAnalysis offers a set of methods to load, parse & plot raw EDF files. It understands opticka trials (where EDF messages TRIALID start a trial and TRIAL_RESULT ends a trial by default) so can parse eye data and plot it for trial groups. You can also manually find microsaccades, and perform ROI/TOI filtering on the eye movements.

Copyright ©2014-2022 Ian Max Andolina — released: LGPL3, see LICENCE.md

Inheritance diagram for eyelinkAnalysis:

Public Member Functions

function eyelinkAnalysis (in varargin)
 
function load (in me, in force)
 
function parseSimple (in me)
 
function parse (in me)
 
function parseSaccades (in me)
 parse saccade related data More...
 
function pruneNonRTTrials (in me)
 remove trials from correct list that did not use a rt start or end message More...
 
function updateCorrectIndex (in me, in idx)
 update correct index list More...
 
function pruneTrials (in me, in num)
 prunetrials – very rarely (n=1) we lose a trial strobe in the plexon data and thus when we try to align the plexon trial index and EDF trial index they are off-by-one, this function is used once the index of the trial is know to prune it out of the EDF data set and recalculate the indexes. More...
 
function plot (in me, in select, in type, in seperateVars, in name)
 give a list of trials and it will plot both the raw eye position and the events More...
 
function clickMe (in src, in ignoredArg)
 
function spawnMe (in src, in ignoredArg)
 
function parseROI (in me)
 
function parseTOI (in me)
 
function plotROI (in me)
 
function clickMe (in src, in ignoredArg)
 
function plotTOI (in me)
 
function clickMe (in src, in ignoredArg)
 
function get ppd (in me)
 
function fixVarNames (in me)
 
function removeRawData (in me)
 
function reparseVars (in me)
 
- Public Member Functions inherited from analysisCore
function analysisCore (in varargin)
 Class constructor. More...
 
function checkPaths (in me, in varargin)
 checkPaths: if we've saved an object then load it on a new machine paths to source files may be wrong. If so then allows us to find a new directory for the source files. More...
 
function showEyePlots (in me, in varargin)
 showEyePlots if we have a linked eyelink file show the raw data plots More...
 
function showInfo (in me, in varargin)
 showInfo shows the info box for the plexon parsed data More...
 
function setStats (in me, in varargin)
 setStats set up the stats structure used in many Fieldtrip analyses More...
 
function set baselineWindow (in me, in in)
 
function optimiseSize (in me)
 optimiseSize remove the raw matrices etc. to reduce memory More...
 
function GUI (in me, in varargin)
 show a GUI if available for analysis object More...
 
function initialise (in me, in varargin)
 
function setTimeFreqOptions (in me, in varargin)
 setTimeFreqOptions for Fieldtrip time freq analysis of LFP data More...
 
- Public Member Functions inherited from optickaCore
function optickaCore (in varargin)
 Class constructor. More...
 
function get fullName (in me)
 
function initialiseSaveFile (in me, in path)
 Initialise Save Dir. More...
 
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. More...
 
function findPropertyDefault (in me, in propName)
 
function clone (in me)
 
function checkSuperclasses (in List)
 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. More...
 
function editProperties (in me, in properties)
 method to modify a set of properties More...
 
function setProp (in me, in property, in value)
 
function checkPaths (in me)
 checks the paths are valid More...
 

Static Public Member Functions

static function plotSecondaryEyeLogs (in tS)
 we also collect eye position within the main PTB loop (sampled at every screen refresh) and this is a lower resolution backup of the eye position data if we need. More...
 
- Static Public Member Functions inherited from analysisCore
static function doFFT (in p, in fs, in ff, in normalise, in useHanning)
 phaseDifference basic phase diff measurement More...
 
static function phaseDifference (in x, in y)
 phaseDifference basic phase diff measurement More...
 
static function phase (in x)
 phase basic phase measurement More...
 
static function subselectFieldTripTrials (in ft, in idx)
 subselectFieldTripTrials sub-select trials where the ft function fails to use cfg.trials More...
 
static function findNearest (in in, in value)
 find nearest value in a vector, if more than 1 index return the first More...
 
static function linearFit (in x, in y)
 
static function var2SE (in var, in dof)
 convert variance to standard error More...
 
static function rad2ang (in alphain, in rect, in rot)
 
static function ang2rad (in alpha)
 
static function stderr (in data, in type, in onlyerror, in alpha, in dim, in avgfn)
 
static function areabar (in xv, in yv, in ev, in c1, in alpha, in varargin)
 
static function cellArray2Num (in data)
 
static function optimalLayout (in len)
 calculates preferred row col layout for multiple plots More...
 
static function optimalColours (in n_colors, in bg, in func)
 make optimally different colours for plots Copyright 2010-2011 by Timothy E. Holy More...
 
static function parsecolor (in s)
 
static function colorstr2rgb (in c)
 
- Static Public Member Functions inherited from optickaCore
static function makeArgs (in args)
 
static function addDefaults (in args, in defs)
 Converts cell args to structure array. More...
 
static function hasKey (in in, in key)
 add default options to arg input More...
 

Public Attributes

Property file
 file name More...
 
Property dir
 directory More...
 
Property trialStartMessageName
 which EDF message contains the trial start tag More...
 
Property variableMessageName
 which EDF message contains the variable name or value More...
 
Property rtStartMessage
 
Property rtEndMessage
 EDF message name to end the stimulus presentation or subject repsonse. More...
 
Property trialEndMessage
 
Property rtOverrideMessage
 override the rtStart time with a custom message? More...
 
Property minSaccadeDistance
 minimum saccade distance in degrees More...
 
Property VFAC
 relative velocity threshold More...
 
Property MINDUR
 minimum saccade duration More...
 
Property tS
 the temporary experiement structure which contains the eyePos recorded from opticka More...
 
Property excludeIncorrect
 exclude incorrect trials when indexing (trials contain an idx and correctedIdx value and you can use either) More...
 
Property ROI
 region of interest? More...
 
Property TOI
 time of interest? More...
 
Property verbose
 verbose output? More...
 
Property pixelsPerCm
 screen resolution More...
 
Property distance
 screen distance More...
 
Property correctValue
 
Property incorrectValue
 
Property breakFixValue
 
Property trialsToPrune
 
Property rtLimits
 these are used for spikes spike saccade time correlations More...
 
Property rtDivision
 
Property trialOverride
 trial list from the saved behavioural data, used to fix trial name bug in old files More...
 
Property xCenter
 screen X center in pixels More...
 
Property yCenter
 screen Y center in pixels More...
 
Property override573
 57.3 bug override More...
 
Property downSample
 downsample the data for plotting More...
 
Property excludeTrials
 
Constant Property EVENT_TYPES = struct
 
Constant Property RECORDING_STATES = struct
 
Constant Property EYES = struct
 
Constant Property PUPIL = struct
 
Constant Property MISSING_DATA_VALUE =
 
- Public Attributes inherited from analysisCore
Property doPlots
 generate plots? More...
 
Property baselineWindow
 +- time window (s) for baseline estimation/removal More...
 
Property measureRange
 default range (s) to measure values from More...
 
Property plotRange
 default range to plot data More...
 
Property rootDirectory
 root directory to check for data if files can't be found More...
 
Property gd
 getDensity stats object, used for group comparisons More...
 
Property options
 various stats values in a structure for different analyses More...
 
Property openUI
 is the UI opened? More...
 
- Public Attributes inherited from optickaCore
Property name
 object name More...
 
Property comment
 comment More...
 
Property verbose
 verbose logging, subclasses must assign this. This is normally logical true/false More...
 
Property dateStamp
 clock() dateStamp set on construction More...
 
Property uuid
 universal ID More...
 
Property paths
 storage of various paths More...
 
Property fullName
 The fullName is the object name combined with its uuid and class name. More...
 

Protected Member Functions

function closeUI (in me, in varargin)
 
function makeUI (in me, in varargin)
 
function updateUI (in me, in varargin)
 
function notifyUI (in me, in varargin)
 
function parseEvents (in me)
 main parse loop for EDF events, has to be one big serial loop More...
 
function parseAsVars (in me)
 
function parseSecondaryEyePos (in me)
 
function parseFixationPositions (in me)
 
function toDegrees (in me, in in)
 
function toPixels (in me, in in)
 
function computeMicrosaccades (in me)
 
function vecvel (in xx, in SAMPLING, in TYPE)
 
function microsacc (in x, in vel, in VFAC, in MINDUR)
 
function binsacc (in sacl, in sacr)
 
function saccpar (in bsac)
 
- Protected Member Functions inherited from analysisCore
virtual function makeUI (in me)
 make the UI for the analysis object More...
 
virtual function closeUI (in me)
 close the UI for the analysis object More...
 
virtual function updateUI (in me)
 update the UI for the analysis object More...
 
function initialiseOptions (in me)
 initialise settings for fieldtrip time frequency analysis More...
 
function inheritPlxReader (in me, in p)
 Allows two analysis objects to share a single plxReader object. This is important in cases where for e.g. an LFPAnalysis object uses the same plexon file as its spikeAnalysis child used for spike-LFP anaysis. More...
 
function setSelection (in me, in in)
 set trials / var parsing from outside, override dialog, used when yoked to another analysis object, for example when spikeAnalysis is a child of LFPAnalysis More...
 
function initialiseStats (in me)
 initialise the statistics options, see setStats() More...
 
function formatByClass (in me, in dp, in dn)
 format data for ROC More...
 
function roc (in me, in data)
 ROC see http://www.subcortex.net/research/code/area_under_roc_curve. More...
 
function auc (in me, in data, in alpha, in flag, in nboot, in varargin)
 Area under ROC. More...
 
function aucBootstrap (in me, in data, in nboot, in flag, in H0)
 AUC bootstrap. More...
 
- Protected Member Functions inherited from optickaCore
function parseArgs (in me, in args, in allowedProperties)
 
function addArgs (in me, in args)
 Sets properties from a structure or normal arguments pairs, ignores invalid or non-allowed properties. More...
 
function setPaths (in me)
 Sets properties from a structure or normal arguments pairs, ignores invalid or non-allowed properties. More...
 
function toStructure (in me)
 set paths for object More...
 
function getType (in me, in in)
 Converts properties to a structure. More...
 
function salutation (in me, in in, in message, in override)
 Give a metaproperty return the likely property class. More...
 
function LogOutput (in me, in in, in message, in override)
 Prints messages dependent on verbosity. More...
 

Additional Inherited Members

- Protected Attributes inherited from analysisCore
Property panels
 UI panels. More...
 
Property yokedSelection
 do we yoke the selection to the parent object (e.g. LFPAnalysis > spikeAnalysis) More...
 
Property handles
 handles for the GUI More...
 
- Protected Attributes inherited from optickaCore
Property cloning
 are we cloning this from another object More...
 
Property mversion
 Matlab version number, this is transient so it is not saved. More...
 
Property className
 class name More...
 
Property savePrefix
 save prefix generated from clock time More...
 

Constructor & Destructor Documentation

◆ eyelinkAnalysis()

function eyelinkAnalysis::eyelinkAnalysis ( in  varargin)

Member Function Documentation

◆ binsacc()

function eyelinkAnalysis::binsacc ( in  sacl,
in  sacr 
)
protected

◆ clickMe() [1/3]

function eyelinkAnalysis::clickMe ( in  src,
in  ignoredArg 
)

◆ clickMe() [2/3]

function eyelinkAnalysis::clickMe ( in  src,
in  ignoredArg 
)

◆ clickMe() [3/3]

function eyelinkAnalysis::clickMe ( in  src,
in  ignoredArg 
)

◆ closeUI()

function eyelinkAnalysis::closeUI ( in  me,
in  varargin 
)
protected
Parameters

◆ computeMicrosaccades()

function eyelinkAnalysis::computeMicrosaccades ( in  me)
protected

◆ fixVarNames()

function eyelinkAnalysis::fixVarNames ( in  me)
Parameters

◆ load()

function eyelinkAnalysis::load ( in  me,
in  force 
)
Parameters

◆ makeUI()

function eyelinkAnalysis::makeUI ( in  me,
in  varargin 
)
protected
Parameters

◆ microsacc()

function eyelinkAnalysis::microsacc ( in  x,
in  vel,
in  VFAC,
in  MINDUR 
)
protected

◆ notifyUI()

function eyelinkAnalysis::notifyUI ( in  me,
in  varargin 
)
protectedvirtual
Parameters

Reimplemented from analysisCore.

◆ parse()

function eyelinkAnalysis::parse ( in  me)
Parameters

◆ parseAsVars()

function eyelinkAnalysis::parseAsVars ( in  me)
protected
Parameters

◆ parseEvents()

function eyelinkAnalysis::parseEvents ( in  me)
protected

main parse loop for EDF events, has to be one big serial loop

Parameters

◆ parseFixationPositions()

function eyelinkAnalysis::parseFixationPositions ( in  me)
protected
Parameters

◆ parseROI()

function eyelinkAnalysis::parseROI ( in  me)
Parameters

◆ parseSaccades()

function eyelinkAnalysis::parseSaccades ( in  me)

parse saccade related data

Parameters

◆ parseSecondaryEyePos()

function eyelinkAnalysis::parseSecondaryEyePos ( in  me)
protected
Parameters

◆ parseSimple()

function eyelinkAnalysis::parseSimple ( in  me)
Parameters

◆ parseTOI()

function eyelinkAnalysis::parseTOI ( in  me)
Parameters

◆ plot()

function eyelinkAnalysis::plot ( in  me,
in  select,
in  type,
in  seperateVars,
in  name 
)

give a list of trials and it will plot both the raw eye position and the events

Parameters

◆ plotROI()

function eyelinkAnalysis::plotROI ( in  me)
Parameters

◆ plotSecondaryEyeLogs()

static function eyelinkAnalysis::plotSecondaryEyeLogs ( in  tS)
static

we also collect eye position within the main PTB loop (sampled at every screen refresh) and this is a lower resolution backup of the eye position data if we need.

Parameters

◆ plotTOI()

function eyelinkAnalysis::plotTOI ( in  me)
Parameters

◆ ppd()

function get eyelinkAnalysis::ppd ( in  me)
Parameters

◆ pruneNonRTTrials()

function eyelinkAnalysis::pruneNonRTTrials ( in  me)

remove trials from correct list that did not use a rt start or end message

Parameters

◆ pruneTrials()

function eyelinkAnalysis::pruneTrials ( in  me,
in  num 
)

prunetrials – very rarely (n=1) we lose a trial strobe in the plexon data and thus when we try to align the plexon trial index and EDF trial index they are off-by-one, this function is used once the index of the trial is know to prune it out of the EDF data set and recalculate the indexes.

Parameters

◆ removeRawData()

function eyelinkAnalysis::removeRawData ( in  me)

◆ reparseVars()

function eyelinkAnalysis::reparseVars ( in  me)

◆ saccpar()

function eyelinkAnalysis::saccpar ( in  bsac)
protected

◆ spawnMe()

function eyelinkAnalysis::spawnMe ( in  src,
in  ignoredArg 
)

◆ toDegrees()

function eyelinkAnalysis::toDegrees ( in  me,
in  in 
)
protected

◆ toPixels()

function eyelinkAnalysis::toPixels ( in  me,
in  in 
)
protected

◆ updateCorrectIndex()

function eyelinkAnalysis::updateCorrectIndex ( in  me,
in  idx 
)

update correct index list

Parameters

◆ updateUI()

function eyelinkAnalysis::updateUI ( in  me,
in  varargin 
)
protected
Parameters

◆ vecvel()

function eyelinkAnalysis::vecvel ( in  xx,
in  SAMPLING,
in  TYPE 
)
protected

Member Data Documentation

◆ breakFixValue

Property eyelinkAnalysis::breakFixValue

◆ correctValue

Property eyelinkAnalysis::correctValue

◆ dir

Property eyelinkAnalysis::dir

directory

◆ distance

Property eyelinkAnalysis::distance

screen distance

◆ downSample

Property eyelinkAnalysis::downSample

downsample the data for plotting

◆ EVENT_TYPES

Constant Property eyelinkAnalysis::EVENT_TYPES = struct

◆ excludeIncorrect

Property eyelinkAnalysis::excludeIncorrect

exclude incorrect trials when indexing (trials contain an idx and correctedIdx value and you can use either)

◆ excludeTrials

Property eyelinkAnalysis::excludeTrials

◆ EYES

Constant Property eyelinkAnalysis::EYES = struct

◆ file

Property eyelinkAnalysis::file

file name

◆ incorrectValue

Property eyelinkAnalysis::incorrectValue

◆ MINDUR

Property eyelinkAnalysis::MINDUR

minimum saccade duration

◆ minSaccadeDistance

Property eyelinkAnalysis::minSaccadeDistance

minimum saccade distance in degrees

◆ MISSING_DATA_VALUE

Constant Property eyelinkAnalysis::MISSING_DATA_VALUE =

◆ override573

Property eyelinkAnalysis::override573

57.3 bug override

◆ pixelsPerCm

Property eyelinkAnalysis::pixelsPerCm

screen resolution

◆ PUPIL

Constant Property eyelinkAnalysis::PUPIL = struct

◆ RECORDING_STATES

Constant Property eyelinkAnalysis::RECORDING_STATES = struct

◆ ROI

Property eyelinkAnalysis::ROI

region of interest?

◆ rtDivision

Property eyelinkAnalysis::rtDivision

◆ rtEndMessage

Property eyelinkAnalysis::rtEndMessage

EDF message name to end the stimulus presentation or subject repsonse.

◆ rtLimits

Property eyelinkAnalysis::rtLimits

these are used for spikes spike saccade time correlations

◆ rtOverrideMessage

Property eyelinkAnalysis::rtOverrideMessage

override the rtStart time with a custom message?

◆ rtStartMessage

Property eyelinkAnalysis::rtStartMessage

the EDF message name to start measuring stimulus presentation, and this is the 0 time in the analysis by default, can be overridden by send SYNCTIME or rtOverrideMessage

◆ TOI

Property eyelinkAnalysis::TOI

time of interest?

◆ trialEndMessage

Property eyelinkAnalysis::trialEndMessage

EDF message name to signal end of the trial, also parses a passed number, so e.g. "TRIAL_RESULT -1" sets the trial.result to -1, these are used to label trials as correct, incorrect, breakfix etc.

◆ trialOverride

Property eyelinkAnalysis::trialOverride

trial list from the saved behavioural data, used to fix trial name bug in old files

◆ trialStartMessageName

Property eyelinkAnalysis::trialStartMessageName

which EDF message contains the trial start tag

◆ trialsToPrune

Property eyelinkAnalysis::trialsToPrune

◆ tS

Property eyelinkAnalysis::tS

the temporary experiement structure which contains the eyePos recorded from opticka

◆ variableMessageName

Property eyelinkAnalysis::variableMessageName

which EDF message contains the variable name or value

◆ verbose

Property eyelinkAnalysis::verbose

verbose output?

◆ VFAC

Property eyelinkAnalysis::VFAC

relative velocity threshold

◆ xCenter

Property eyelinkAnalysis::xCenter

screen X center in pixels

◆ yCenter

Property eyelinkAnalysis::yCenter

screen Y center in pixels


The documentation for this class was generated from the following file: