140228

Data from slider to window!

2/28/14

cfgUISecure('apReturn'):
- Warning: checkbox control requires a scalar Value
Control will not be rendered until all of its
parameter values are valid
- Due to no apForceOff/apForceOn prior to call (when debugging usually)
- No user data, sets ‘Value’ to null.
- Handled this exception

cfgIlabJavaInterface.m:
- Updates cfgConfirmJFrame text values from RangeSlider
- Passes RangeSlider updateLabelTxt function and frame
- Converts with acquisition interval
- Update on Slider ‘MouseReleasedCallback’
(cfgSliderInterface.m/trickPlotSaccade)
- Added ‘calc’
- Performs most calculations found in
ilabVelocityPlotCB.m/drawVelocityTraces
- Must shift slider index to absolute index in PP.index
- Added tableTag to persistent variable
- Added ‘setsacc’
- Uses persistent slider.tableTag, slider.selRow, and
slider.pseudoAP.saccade.list
- Reference 2/14/14 notes
- Current data table:
- Start Code
- Target Code
- Trial type
- Start (ms)
- End (ms)
- Peak vel (deg/s)
- Mean vel (deg/s)
- SRT (ms) -- Saccade reaction time (onset latency from target)
- Different target between initial/final saccade
- Separate calculation
- Need to update target codes embedded in iLAB parameters
- Time-to-peak (ms) -- Peak velocity latency from target
- Latency (ms) -- Saccade reaction time from target
- Deprecated (see SRT)
- Distance (from target)
- Requires import
- Separate calculation
- Distance traveled
- Necessary addition
- ** Adjust in header, table, and data structure
- Mean vel * [(t2 - t1) / 1000]
- Units: Deg/s *[(ms)/1000] = Deg
- Add unit
- Saccade window defined by vCutoff
- Tentative addition used to determine saccade limits
- max(vabs) in saccade window * pctPeak (determined by auto-saccade
parameters)
- Added ‘cleanup’
- Clears all persistent variables except slider handles
- Reset AP parameters
- Added check for field, slider.origAP (lost of original AP before trick
plotting), and warning if no field
- Current no AP back-up if persistent original AP is removed

cfgConfirmJFrame.m:
- Executes Initial update with default values

cfgConfirmJFrame.m/onConfirm:
- Passes current values to velocity calculations
- cfgIlabJavaInterface(‘calc’)
- Request saccade data setting
- cfgIlabJavaInterface(‘setsacc’)
- Added clean up functions, but needs to be re-located. See: Proper
re-enabling after “Add”/”Modify”

- Proper re-enabling after “Add”/”Modify”
-   cfgUISecure('enableSLSelect'); % Re-enable saccade listbox
- Re-enable saccade table selection, opposite of
cfgUISecure(‘forceSLSelect1’);
- Callback will re-enable ‘SaccadeListbox’ handle
- cfgUISecure('apReturn'); % Assuming apForceOff prior to this function
call
- Auto-plot on saccade listbox is re-enabled and original value returned
- cfgUISecure('clearsaccaction'); % Free UI from state restrictions
- Frees data tool state
-  cfgUISecure('mainUIOn'); % Re-enable main UI functions
- Re-enables TrialSlider, TrialList, and ShowVelPlotBox
-  cfgIlabJavaInterface('cleanup'); % Clean up persistent variable
- Cleans up persistent variables used by cfgIlabJavaInterface.m

ToDo:

Necessary features:

- Add method to cfgParams for loading experimental data. Write up
specifications.  Add file string to data structure.  Add ui text to
“General Info”.  Edit CFG.CFG_TAGS.  Maybe modify menu item (Import
trial data)
- Modify data table headers
- Sort initial/final target codes
- Algorithm for SRT and Distance from target
- Remove “Latency” (same as SRT)
- cfgConfirmJFrame.m:
- Pop-up occurrence
- Modify for other functions
- Cancel
- Revert state handling
- Finalize saccade action restrictions
- Include “Are you sure?” text if selected saccade already has saccade
data inputted for that initial/final trial.  Do same for Modify, Add,
Select, and Clear
- Checking for “NaN”, or never modified/cleared saccades.
- This will allow “Modify” to function, and also prevent overwrite.
- Export data as is
- Drop/error:
- Error on initial, but no  errors for final.
- Remove sync (initial/final) and separate data structure

UI safe handling:

- Add clear saccade data function
- Add saccade function mode to window title, when active.
- cfgSaccCB.m:
- Add better state-in-use warning
- Disable cfg_datatool close function
- Event specific?
- cfgConfirmJFrame.m:
- Callback to bring into focus when slider is dragged
- Don’t interrupt slider function

Debug overview:

- Remove cfgShow/uiTblCB if it has no use.
- Fix double-click bug
- QA mid-state function usage
- Closing cfg_datatool
- Closing Saccade Results window
cfgConfirmJFrame.m/updateFrameLocation:
- Handle if no frame (SaccadeResults closed)?
- Re-direct clean-up to separate function