Padaco  1.6
Toolbox for interpreting Actigraph accelerometer data collected from children in order to better understand their physical activity and sleep patterns with the intent of reducing obesity and improving their overall health.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
PAController Class Reference

PAController serves as the UI component of event marking in the Padaco. More...

Inheritance diagram for PAController:

Public Member Functions

function PAController (in Padaco_fig_h, in)
 
function close (in obj)
 Destructor. More...
 
function saveParameters (in obj)
 
function initCallbacks (in obj)
 Configure callbacks for the figure, menubar, and widets. Called internally during class construction. More...
 
function figureCloseCallback (in obj, in hObject, in eventdata, in handles)
 Executes when user attempts to close figure_padaco. More...
 
function keyPressCallback (in obj, in hObject, in eventdata)
 Executes on key press with focus on figure and no controls selected. More...
 
function keyReleaseCallback (in obj, in hObject, in eventdata)
 Executes on key press with focus on figure and no controls selected. More...
 
function windowButtonUpCallback (in obj, in hObject, in eventData)
 Executes when user releases mouse click If the currentObject selected is the secondary axes, then the current window is set to the closest window corresponding to the mouse's x-position. More...
 
function windowButtonDownCallback (in obj, in hObject, in eventData)
 Executes when user first clicks the mouse. More...
 
function deactivateLineHandle (in obj)
 
function initMenubarCallbacks (in obj)
 Assign figure's menubar callbacks. Called internally during class construction. More...
 
function menuHelpFAQCallback (in this, in hObject, in eventdata)
 Callback to display help FAQ from the menubar help->faq menu. More...
 
function menuFileAboutCallback (in obj, in hObject, in eventdata)
 Assign figure's file->about menubar callback. More...
 
function menuFileSettingsCallback (in obj, in hObject, in eventdata, in optionalSettingsName)
 Assign figure's menubar callbacks. Called internally during class construction. More...
 
function menuFileUsageRulesCallback (in obj, in hObject, in eventdata)
 Assign values for usage state classifier rules. Called internally during class construction. More...
 
function initTimeSeriesWidgets (in obj)
 
function initWidgetCallbacks (in obj)
 Assign callbacks to various user interface widgets. Called internally during class construction. More...
 
function displayChangeCallback (in obj, in hObject, in eventData)
 Callback for radio button change of the panel_displayButtonGroup handle. The user can select either, 'time series', 'aggregate bins', or 'features'. If 'Features' is selected, then the Feature dropdown menu is enabled, and is disabled otherwise. The view is redrawn. More...
 
function setDisplayType (in obj, in displayType)
 Sets display type instance variable for the view. More...
 
function setRadioButton (in obj, in displayType)
 Executes a radio button group callback (i.e. displayChangeCallback). More...
 
function button_goCallback (in obj, in hObject, in eventdata)
 Callback for pressing the Go push button. Method determines parameters from current view settings (i.e. menu selections for prefilter and aggregate methods). More...
 
function updateSecondaryAxesLabels (in obj, in axisToUpdate, in labels)
 
function updateSecondaryFeaturesDisplay (in obj, in numFeatures)
 Updates the secondary axes with the current features selected in the GUI. More...
 
function updateSecondaryFeaturesDisplayCallback (in obj, in hObject, in eventdata)
 Callback from signal selection widget that triggers the update to the secondary axes with the GUI selected feature and signal. More...
 
function getPrefilterMethod (in obj)
 Retrieves current prefilter method from the GUI. More...
 
function getExtractorMethod (in obj)
 Retrieves current extractor method (i.e. function name) associated with the GUI displayed description. More...
 
function setExtractorMethod (in obj, in featureFcn)
 Sets the extractor method (i.e. function name) associated with the GUI displayed description. More...
 
function getSignalSelection (in obj)
 Retrieves current signal selection from the GUI's signalSelection dropdown menu. More...
 
function setSignalSelection (in obj, in signalTagLine)
 Sets the Signal Selection's drop down menu's value based on the input parameter. More...
 
function initSignalSelectionMenu (in obj)
 Initializes the signal selection drop down menu using PAData's default taglines and associated labels. signalSelection dropdown menu. More...
 
function menu_windowDurSecCallback (in obj, in hObject, in eventdata)
 Callback for menu with window duration selections (values are in seconds) More...
 
function edit_curWindowCallback (in obj, in hObject, in eventdata)
 Callback for current window's edit textbox. More...
 
function edit_aggregateCallback (in obj, in hObject, in eventdata)
 Callback for aggregate size edit textbox. More...
 
function edit_frameSizeMinutesCallback (in obj, in hObject, in eventdata)
 Callback for frame size in minutes edit textbox. More...
 
function edit_frameSizeHoursCallback (in obj, in hObject, in eventdata)
 Callback for frame size in hours edit textbox. More...
 
function setAggregateDurationMinutes (in obj, in new_aggregateDuration)
 Set the aggregate duration in minutes. More...
 
function setFrameDurationMinutes (in obj, in new_frameDurationMinutes)
 Set the frame size minute's units. More...
 
function setFrameDurationHours (in obj, in new_frameDurationHours)
 Set the frame size hour's units. More...
 
function setCurWindow (in obj, in new_window)
 Set the current window for the instance variable accelObj (PAData) More...
 
function getCurWindow (in obj)
 Returns the current window of the instance variable accelObj (PAData) More...
 
function menuFileOpenCallback (in obj, in hObject, in eventdata)
 Menubar callback for opening a file. More...
 
function menuFileOpenFitBitCallback (in obj, in hObject, in eventdata)
 Menubar callback for opening a fitbit file. More...
 
function menuFileOpenResultsPathCallback (in obj, in hObject, in eventdata)
 Menubar callback for opening a results path for use with the results view mode. More...
 
function menuFileScreenshotCallback (in obj, in hObject, in eventdata, in screenshotDescription)
 Menubar file->screenshot callback. More...
 
function menuFileQuitCallback (in obj, in hObject, in eventdata, in handles)
 Menubar callback for quitting the program. Executes when user attempts to close padaco fig. More...
 
function menu_file_exportMenu_callback (in this, in hObject, in eventdata)
 Call back for export menu option under menubar 'file' option. More...
 
function menu_file_export_dataObj_callback (in obj, in hObject, in ignoredArg)
 Menubar callback for exporting PAController's data object to the workspace. This is useful for debugging and developing methods ad hoc. More...
 
function menu_file_export_centroidObj_callback (in obj, in hObject, in ignoredArg)
 Menubar callback for exporting PAController's data object to the workspace. This is useful for debugging and developing methods ad hoc. More...
 
function getViewMode (in obj)
 
function setViewModeCallback (in this, in hObject, in eventData, in viewMode)
 
function setViewMode (in obj, in viewMode)
 Sets padaco's view mode to either time series or results viewing. More...
 
function menuViewmodeBatchCallback (in obj, in hObject, in eventdata)
 Menubar callback for running the batch tool. More...
 
function setResultsViewModeCallback (in obj, in hObject, in eventData)
 
function updateBatchToolSettingsCallback (in obj, in batchToolObj, in eventData)
 
function save2image (in obj, in curData, in featureFcn, in img_filename)
 Creates a temporary figure and axes, draws an overlay image on it using curData, saves the image to disk, and then removes the figure from view. More...
 
function getFrameDurationAsMinutes (in obj)
 Returns the total frame duration (i.e. hours and minutes) in aggregated minutes. More...
 
function getAggregateDurationAsMinutes (in obj)
 Returns the total frame duration (i.e. hours and minutes) in aggregated minutes. More...
 
function getStudyDurationSec (in obj)
 Returns the current study's duration as seconds. More...
 
function getFrameCount (in obj)
 Returns the number of frames the study can be broken into based on the frame duration set in the GUI. More...
 
function getMeanLumenPatches (in obj, in numSections, in paDataObj)
 Calculates the mean lux value for a given number of sections. More...
 
function getDaylight (in obj, in numSections, in paDataObj)
 Estimates daylight intensity across the study. More...
 
function getFeatureVec (in obj, in featureFcn, in fieldName, in numSections, in paDataObj)
 Calculates a desired feature for a particular acceleration object's field value. More...
 
function getFeatureStartStopDatenums (in obj, in featureFcn, in fieldName, in numSections, in paDataObj)
 
function getUsageState (in obj)
 Calculates a desired feature for a particular acceleration object's field value. More...
 
function getDisplayType (in obj)
 Returns the display type instance variable. More...
 
function getSaveParameters (in obj)
 Returns a structure of PAControllers saveable parameters as a struct. More...
 
function getDisplayableLineHandles (in obj)
 Returns a structure of PAView's primary axes currently displayable line handles. More...
 

Static Public Member Functions

static function contextmenu_line2clipboard_callback (in hObject, in eventdata)
 Copy the selected (feature) linehandle's ydata to the system clipboard. More...
 
static function cropFigure2Axes (in fig_h, in axes_h)
 
static function getDefaultParameters ()
 Returns a structure of PAControllers default, saveable parameters as a struct. More...
 

Public Attributes

Constant Property versionNum = 1.6
 
Property accelObj
 acceleration activity object - instance of PAData More...
 
Property SETTINGS
 Instance of PASettings - this is brought in to eliminate the need for several globals. More...
 
Property VIEW
 Instance of PAView - Padaco's view component. More...
 
Property MODEL
 Instance of PAModel - Padaco's model component. See accelObj. More...
 
Property StatTool
 
Property figureH
 Figure handle to the main figure window. More...
 
Property current_linehandle
 Linehandle in Padaco that is currently selected by the user. More...
 
Property state_choices_cell
 cell of string choices for the marking state (off, 'marking','general') More...
 
Property contextmenuhandle
 
Property window_resolution
 struct of different time resolutions, field names correspond to the units of time represented in the field More...
 
Property num_windows
 
Property display_samples
 
Property shift_display_samples_delta
 
Property startDateTime
 
Property batch
 Struct of batch settings with fields as described by. More...
 
Property screenshotPathname
 Foldername of most recent screenshot. More...
 
Property resultsPathname
 Foldername of most recent results output pathname used. More...
 
Property Padaco_loading_file_flag
 struct to keep track of various Padaco states More...
 
Property Padaco_mainaxes_ylim
 
Property Padaco_mainaxes_xlim
 

Detailed Description

PAController serves as the UI component of event marking in the Padaco.

In the model, view, controller paradigm, this is the controller.

Constructor & Destructor Documentation

function PAController::PAController ( in  Padaco_fig_h,
in   
)

Member Function Documentation

function PAController::button_goCallback ( in  obj,
in  hObject,
in  eventdata 
)

Callback for pressing the Go push button. Method determines parameters from current view settings (i.e. menu selections for prefilter and aggregate methods).

Parameters
objInstance of PAController
hObjectHandle to the edit text widget
eventdataRequired by MATLAB, but not used
function PAController::close ( in  obj)

Destructor.

static function PAController::contextmenu_line2clipboard_callback ( in  hObject,
in  eventdata 
)
static

Copy the selected (feature) linehandle's ydata to the system clipboard.

Parameters
objInstance of PAController
hObjectHandle of callback object (unused).
eventdataUnused.
static function PAController::cropFigure2Axes ( in  fig_h,
in  axes_h 
)
static
function PAController::deactivateLineHandle ( in  obj)
function PAController::displayChangeCallback ( in  obj,
in  hObject,
in  eventData 
)

Callback for radio button change of the panel_displayButtonGroup handle. The user can select either, 'time series', 'aggregate bins', or 'features'. If 'Features' is selected, then the Feature dropdown menu is enabled, and is disabled otherwise. The view is redrawn.

Parameters
objInstance of PAController
hObjectHandle to button group panel.
eventDataStructure of event data to include:
  • EventName 'SelectionChanged'
  • OldValue Handle to the previous callback
  • NewValue Handle to the current callback
function PAController::edit_aggregateCallback ( in  obj,
in  hObject,
in  eventdata 
)

Callback for aggregate size edit textbox.

Parameters
objInstance of PAController
hObjectHandle to the edit text widget
eventdataRequired by MATLAB, but not used
Note
Entered values are interepreted as minutes.
function PAController::edit_curWindowCallback ( in  obj,
in  hObject,
in  eventdata 
)

Callback for current window's edit textbox.

Parameters
objInstance of PAController
hObjectHandle to the edit text widget
eventdataRequired by MATLAB, but not used
function PAController::edit_frameSizeHoursCallback ( in  obj,
in  hObject,
in  eventdata 
)

Callback for frame size in hours edit textbox.

Parameters
objInstance of PAController
hObjectHandle to the edit text widget
eventdataRequired by MATLAB, but not used
Note
Entered values are interepreted as hours.
function PAController::edit_frameSizeMinutesCallback ( in  obj,
in  hObject,
in  eventdata 
)

Callback for frame size in minutes edit textbox.

Parameters
objInstance of PAController
hObjectHandle to the edit text widget
eventdataRequired by MATLAB, but not used
Note
Entered values are interepreted as minutes.
function PAController::figureCloseCallback ( in  obj,
in  hObject,
in  eventdata,
in  handles 
)

Executes when user attempts to close figure_padaco.

Parameters
objInstance of PAController
hObjecthandle to menu_file_quit (see GCBO)
eventdatareserved - to be defined in a future version of MATLAB
handlesstructure with handles and user data (see GUIDATA)
function PAController::getAggregateDurationAsMinutes ( in  obj)

Returns the total frame duration (i.e. hours and minutes) in aggregated minutes.

Parameters
objInstance of PAData
Return values
curFrameDurationMinThe current frame duration as total minutes.
function PAController::getCurWindow ( in  obj)

Returns the current window of the instance variable accelObj (PAData)

Parameters
objInstance of PAController
Return values
windowThe current window, or null if it has not been initialized.
function PAController::getDaylight ( in  obj,
in  numSections,
in  paDataObj 
)

Estimates daylight intensity across the study.

Parameters
objInstance of PAController
numSections(optional) Number of chunks to estimate daylight at across the study. Default is 100.
paDataObjOptional instance of PAData. Date time will be calculated from this when included, otherwise date time from the instance variable accelObj is used.
Return values
daylightVectorVector of estimated daylight from the time of day at startStopDatenums.
startStopDatenumsNx2 matrix of datenum values whose rows correspond to the start/stop range that the meanLumens value (at the same row position) was derived from.
static function PAController::getDefaultParameters ( )
static

Returns a structure of PAControllers default, saveable parameters as a struct.

Return values
pStructA structure of parameters which include the following fields
  • featureFcn
  • signalTagLine
function PAController::getDisplayableLineHandles ( in  obj)

Returns a structure of PAView's primary axes currently displayable line handles.

Parameters
objInstance of PAView.
Return values
lineHandlesA structure of line handles of the current display type are showable in the primary axes (i.e. they are only not seen if the
function PAController::getDisplayType ( in  obj)

Returns the display type instance variable.

Parameters
objInstance of PAView.
Return values
structNameName of the field that matches the description of the current display type used.
  • timeSeries
  • bins
  • features
Note
See PAData.getStructTypes()
function PAController::getExtractorMethod ( in  obj)

Retrieves current extractor method (i.e. function name) associated with the GUI displayed description.

Parameters
objInstance of PAController
Return values
extractorMethodString value of the function call represented by the current feature extraction method displayed in the VIEW's displayFeature drop down menu.
Note
Results of applying the extractor method to the current signal (selected from its dropdown menu) are displayed in the secondary axes of PAView.
function PAController::getFeatureStartStopDatenums ( in  obj,
in  featureFcn,
in  fieldName,
in  numSections,
in  paDataObj 
)
function PAController::getFeatureVec ( in  obj,
in  featureFcn,
in  fieldName,
in  numSections,
in  paDataObj 
)

Calculates a desired feature for a particular acceleration object's field value.

Note
This is the general form of getMeanLuxPatches
Parameters
objInstance of PAController
featureFcnFunction name or handle to use to obtain features.
fieldNameString name of the accelObj field to obtain data from.
Note
Data is obtained using dynamic indexing of accelObj instance variable (ie.. data = obj.accelObj.(fildName))
Parameters
numSections(optional) Number of patches to break the accelObj time series data into and calculate the features from.
paDataObjOptional instance of PAData. Date time will be calculated from this when included, otherwise date time from the instance variable accelObj is used.
Return values
featureVecVector of specified feature values calculated from the specified (fieldName) field of the accelObj PAData object instance variable. Vector values are in consecutive order of the section they are calculated from.
startStopDatenumsNx2 matrix of datenum values whose rows correspond to the start/stop range that the feature vector value (at the same row position) was derived from.
Note
Sections will not be calculated on equally lenghted sections when numSections does not evenly divide the total number of samples. In this case, the last section may be shorter or longer than the others.
function PAController::getFrameCount ( in  obj)

Returns the number of frames the study can be broken into based on the frame duration set in the GUI.

Parameters
objInstance of PAController.
Note
The accelObj property must be set (i.e. a file must be loaded for this function to work).
function PAController::getFrameDurationAsMinutes ( in  obj)

Returns the total frame duration (i.e. hours and minutes) in aggregated minutes.

Parameters
objInstance of PAData
Return values
curFrameDurationMinThe current frame duration as total minutes.
function PAController::getMeanLumenPatches ( in  obj,
in  numSections,
in  paDataObj 
)

Calculates the mean lux value for a given number of sections.

Parameters
objInstance of PAController
numSections(optional) Number of patches to break the accelObj lux time series data into and calculate the mean lumens over.
paDataObjOptional instance of PAData. Mean lumens will be calculated from this when included, otherwise the instance variable accelObj is used.
Return values
meanLumensVector of mean lumen values calculated from the lux field of the accelObj PAData object instance variable. Vector values are in consecutive order of the section they are calculated from.
startStopDatenumsNx2 matrix of datenum values whose rows correspond to the start/stop range that the meanLumens value (at the same row position) was derived from.
Note
Sections will not be calculated on equally lenghted sections when numSections does not evenly divide the total number of samples. In this case, the last section may be shorter or longer than the others.
function PAController::getPrefilterMethod ( in  obj)

Retrieves current prefilter method from the GUI.

Parameters
objInstance of PAController
Return values
prefilterMethodvalue of the current prefilter method.
function PAController::getSaveParameters ( in  obj)

Returns a structure of PAControllers saveable parameters as a struct.

Parameters
objInstance of PAView.
Return values
pStructA structure of save parameters which include the following fields
  • featureFcn
  • signalTagLine
function PAController::getSignalSelection ( in  obj)

Retrieves current signal selection from the GUI's signalSelection dropdown menu.

Parameters
objInstance of PAController
Return values
signalSelectionThe tag line of the selected signal.
function PAController::getStudyDurationSec ( in  obj)

Returns the current study's duration as seconds.

Parameters
objInstance of PAData
Return values
curStudyDurationSecThe duration of the current study in seconds.
function PAController::getUsageState ( in  obj)

Calculates a desired feature for a particular acceleration object's field value.

Note
This is the general form of getMeanLuxPatches
Parameters
objInstance of PAController
featureFcnFunction name or handle to use to obtain features.
fieldNameString name of the accelObj field to obtain data from.
Note
Data is obtained using dynamic indexing of accelObj instance variable (ie.. data = obj.accelObj.(fildName))
Parameters
numSections(optional) Number of patches to break the accelObj time series data into and calculate the features from.
paDataObjOptional instance of PAData. Date time will be calculated from this when included, otherwise date time from the instance variable accelObj is used.
Return values
featureVecVector of specified feature values calculated from the specified (fieldName) field of the accelObj PAData object instance variable. Vector values are in consecutive order of the section they are calculated from.
startStopDatenumsNx2 matrix of datenum values whose rows correspond to the start/stop range that the feature vector value (at the same row position) was derived from.
Note
Sections will not be calculated on equally lenghted sections when numSections does not evenly divide the total number of samples. In this case, the last section may be shorter or longer than the others.
function PAController::getViewMode ( in  obj)
function PAController::initCallbacks ( in  obj)

Configure callbacks for the figure, menubar, and widets. Called internally during class construction.

Parameters
objInstance of PAController
function PAController::initMenubarCallbacks ( in  obj)

Assign figure's menubar callbacks. Called internally during class construction.

Parameters
objInstance of PAController
function PAController::initSignalSelectionMenu ( in  obj)

Initializes the signal selection drop down menu using PAData's default taglines and associated labels. signalSelection dropdown menu.

Parameters
objInstance of PAController
Note
Tag lines are stored as user data at indices corresponding to the menu label descriptions. For example, label{1} = 'X' and userdata{1} = 'accelRaw.x'
function PAController::initTimeSeriesWidgets ( in  obj)
function PAController::initWidgetCallbacks ( in  obj)

Assign callbacks to various user interface widgets. Called internally during class construction.

Parameters
objInstance of PAController
function PAController::keyPressCallback ( in  obj,
in  hObject,
in  eventdata 
)

Executes on key press with focus on figure and no controls selected.

Parameters
objInstance of PAController
hObjecthandle to figure (gcf)
eventdataStructure of key press information.
function PAController::keyReleaseCallback ( in  obj,
in  hObject,
in  eventdata 
)

Executes on key press with focus on figure and no controls selected.

Parameters
objInstance of PAController
hObjecthandle to figure (gcf), unused
eventdataStructure of key press information.
function PAController::menu_file_export_centroidObj_callback ( in  obj,
in  hObject,
in  ignoredArg 
)

Menubar callback for exporting PAController's data object to the workspace. This is useful for debugging and developing methods ad hoc.

Parameters
objInstance of PAController
hObjecthandle to menu_viewmode_batch (see GCBO)
eventdatareserved - to be defined in a future version of MATLAB
handlesstructure with handles and user data (see GUIDATA)
function PAController::menu_file_export_dataObj_callback ( in  obj,
in  hObject,
in  ignoredArg 
)

Menubar callback for exporting PAController's data object to the workspace. This is useful for debugging and developing methods ad hoc.

Parameters
objInstance of PAController
hObjecthandle to menu_viewmode_batch (see GCBO)
eventdatareserved - to be defined in a future version of MATLAB
handlesstructure with handles and user data (see GUIDATA)
function PAController::menu_file_exportMenu_callback ( in  this,
in  hObject,
in  eventdata 
)

Call back for export menu option under menubar 'file' option.

function PAController::menu_windowDurSecCallback ( in  obj,
in  hObject,
in  eventdata 
)

Callback for menu with window duration selections (values are in seconds)

Parameters
objInstance of PAController
hObjectHandle to the edit text widget
eventdataRequired by MATLAB, but not used
function PAController::menuFileAboutCallback ( in  obj,
in  hObject,
in  eventdata 
)

Assign figure's file->about menubar callback.

Parameters
objInstance of PAController
hObject
eventdata
function PAController::menuFileOpenCallback ( in  obj,
in  hObject,
in  eventdata 
)

Menubar callback for opening a file.

Parameters
objInstance of PAController
hObjecthandle to menu_file_open (see GCBO)
eventdataRequired by MATLAB, but not used.
function PAController::menuFileOpenFitBitCallback ( in  obj,
in  hObject,
in  eventdata 
)

Menubar callback for opening a fitbit file.

Parameters
objInstance of PAController
hObjecthandle to menu_file_open (see GCBO)
eventdataRequired by MATLAB, but not used.
function PAController::menuFileOpenResultsPathCallback ( in  obj,
in  hObject,
in  eventdata 
)

Menubar callback for opening a results path for use with the results view mode.

Parameters
objInstance of PAController
hObjecthandle to menu_file_open (see GCBO)
eventdataRequired by MATLAB, but not used.
function PAController::menuFileQuitCallback ( in  obj,
in  hObject,
in  eventdata,
in  handles 
)

Menubar callback for quitting the program. Executes when user attempts to close padaco fig.

Parameters
objInstance of PAController
hObjecthandle to menu_file_quit (see GCBO)
eventdatareserved - to be defined in a future version of MATLAB
Note
See startBatchProcessCallback for actual batch processing steps.
function PAController::menuFileScreenshotCallback ( in  obj,
in  hObject,
in  eventdata,
in  screenshotDescription 
)

Menubar file->screenshot callback.

Parameters
objInstance of PAController
hObjecthandle to menu_file_open (see GCBO)
eventdataRequired by MATLAB, but not used.
screenshotDescriptionString label for which part of the GUI is to be captured. Valid labels include:
  • figure
  • primaryAxes
  • secondaryAxes
function PAController::menuFileSettingsCallback ( in  obj,
in  hObject,
in  eventdata,
in  optionalSettingsName 
)

Assign figure's menubar callbacks. Called internally during class construction.

Parameters
objInstance of PAController
hObject
eventdata
optionalSettingsNameString specifying the settings to update (optional)
function PAController::menuFileUsageRulesCallback ( in  obj,
in  hObject,
in  eventdata 
)

Assign values for usage state classifier rules. Called internally during class construction.

Parameters
objInstance of PAController
hObject
eventdata
optionalSettingsNameString specifying the settings to update (optional)
function PAController::menuHelpFAQCallback ( in  this,
in  hObject,
in  eventdata 
)

Callback to display help FAQ from the menubar help->faq menu.

Parameters
objInstance of PAController
hObject
eventdata
function PAController::menuViewmodeBatchCallback ( in  obj,
in  hObject,
in  eventdata 
)

Menubar callback for running the batch tool.

Parameters
objInstance of PAController
hObjecthandle to menu_viewmode_batch (see GCBO)
eventdatareserved - to be defined in a future version of MATLAB
handlesstructure with handles and user data (see GUIDATA)
function PAController::save2image ( in  obj,
in  curData,
in  featureFcn,
in  img_filename 
)

Creates a temporary figure and axes, draws an overlay image on it using curData, saves the image to disk, and then removes the figure from view.

Parameters
objInstance of PAController
curDataInstance of PAData
featureFcnExtractor method for obtaining features from curData.
img_filenameFilename to save image to.
Note
The image format is determined from the extension of img_filename (e.g. if img_filename = 'picture.jpg', then a jpeg is used.
function PAController::saveParameters ( in  obj)
function PAController::setAggregateDurationMinutes ( in  obj,
in  new_aggregateDuration 
)

Set the aggregate duration in minutes.

Parameters
objInstance of PAController
new_aggregateDurationAggregate duration in minutes.
Return values
successTrue if the aggregate duration is changed, and false otherwise.
function PAController::setCurWindow ( in  obj,
in  new_window 
)

Set the current window for the instance variable accelObj (PAData)

Parameters
objInstance of PAController
new_windowValue of the new window to set.
Return values
successTrue if the window is set successfully, and false otherwise.
Note
Reason for failure include window values that are outside the range allowed by accelObj (e.g. negative values or those longer than the duration given.
function PAController::setDisplayType ( in  obj,
in  displayType 
)

Sets display type instance variable for the view.

Parameters
objInstance of PAView.
displayTypeA string representing the display type structure. Can be
  • timeSeries
  • bins
  • features
function PAController::setExtractorMethod ( in  obj,
in  featureFcn 
)

Sets the extractor method (i.e. function name) associated with the GUI displayed description.

Parameters
objInstance of PAController
featureFcnString value of the function call represented by the current feature extraction method displayed in the VIEW's displayFeature drop down menu.
Note
No change is made if featureFcn is not found listed in menu handle's userdata.
function PAController::setFrameDurationHours ( in  obj,
in  new_frameDurationHours 
)

Set the frame size hour's units.

Parameters
objInstance of PAController
new_frameDurationHoursHours for frame duration.
Return values
successTrue if the frame duration is changed, and false otherwise.
function PAController::setFrameDurationMinutes ( in  obj,
in  new_frameDurationMinutes 
)

Set the frame size minute's units.

Parameters
objInstance of PAController
new_frameDurationMinutesFrame duration minutes measure.
Return values
successTrue if the frame duration is changed, and false otherwise.
function PAController::setRadioButton ( in  obj,
in  displayType 
)

Executes a radio button group callback (i.e. displayChangeCallback).

Parameters
objInstance of PAController
displayTypeString value of the radio button to set. Can be
  • timeSeries
  • bins
  • features
function PAController::setResultsViewModeCallback ( in  obj,
in  hObject,
in  eventData 
)
function PAController::setSignalSelection ( in  obj,
in  signalTagLine 
)

Sets the Signal Selection's drop down menu's value based on the input parameter.

Parameters
objInstance of PAController.
signalTagLineString representing the tag line associated with each signal choice selection and listed as dropdown menus userdata.
Note
No change is made if signalTagLine is not found listed in menu handle's userdata.
function PAController::setViewMode ( in  obj,
in  viewMode 
)

Sets padaco's view mode to either time series or results viewing.

Parameters
objInstance of PAController
viewModeA string with one of two values
  • timeseries
  • results
function PAController::setViewModeCallback ( in  this,
in  hObject,
in  eventData,
in  viewMode 
)
function PAController::updateBatchToolSettingsCallback ( in  obj,
in  batchToolObj,
in  eventData 
)
function PAController::updateSecondaryAxesLabels ( in  obj,
in  axisToUpdate,
in  labels 
)
Parameters
objInstance of PAController
axisToUpdateAxis to update 'x' or 'y' on the secondary axes.
labelsCell of labels to place on the secondary axes.
function PAController::updateSecondaryFeaturesDisplay ( in  obj,
in  numFeatures 
)

Updates the secondary axes with the current features selected in the GUI.

Parameters
objInstance of PAController
numFeaturesOptional number of features to extract (i.e. the number of chunks that the the study data will be broken into and the current feature category applied to. Default is the current frame count.
Return values
heightOffsety-axis value of the top of the features displayed. This is helpful in determining where to stack additional items on top of in the secondary axes.
function PAController::updateSecondaryFeaturesDisplayCallback ( in  obj,
in  hObject,
in  eventdata 
)

Callback from signal selection widget that triggers the update to the secondary axes with the GUI selected feature and signal.

Parameters
objInstance of PAController
hObjecthandle to the callback object.
eventdataNot used. Required by MATLAB.
function PAController::windowButtonDownCallback ( in  obj,
in  hObject,
in  eventData 
)

Executes when user first clicks the mouse.

Parameters
objInstance of PAController
hObjecthandle to figure (gcf), unused
eventDataStructure of mouse press information; unused
Note- this turns off all other mouse movement and mouse wheel callback methods.
function PAController::windowButtonUpCallback ( in  obj,
in  hObject,
in  eventData 
)

Executes when user releases mouse click If the currentObject selected is the secondary axes, then the current window is set to the closest window corresponding to the mouse's x-position.

Parameters
objInstance of PAController
hObjecthandle to figure (gcf), unused
eventDataStructure of mouse press information; unused

Member Data Documentation

Property PAController::accelObj

acceleration activity object - instance of PAData

Property PAController::batch

Struct of batch settings with fields as described by.

Property PAController::contextmenuhandle

string of the current selected choice handle to the figure an instance of this class is associated with struct of handles for the context menus

Property PAController::current_linehandle

Linehandle in Padaco that is currently selected by the user.

Property PAController::display_samples
Property PAController::figureH

Figure handle to the main figure window.

Property PAController::MODEL

Instance of PAModel - Padaco's model component. See accelObj.

Property PAController::num_windows
Property PAController::Padaco_loading_file_flag

struct to keep track of various Padaco states

Property PAController::Padaco_mainaxes_xlim
Property PAController::Padaco_mainaxes_ylim
Property PAController::resultsPathname

Foldername of most recent results output pathname used.

Property PAController::screenshotPathname

Foldername of most recent screenshot.

Property PAController::SETTINGS

Instance of PASettings - this is brought in to eliminate the need for several globals.

Property PAController::shift_display_samples_delta
Property PAController::startDateTime
Property PAController::state_choices_cell

cell of string choices for the marking state (off, 'marking','general')

Property PAController::StatTool

Instance of PAStatTool - results controller when in results view mode.

Constant Property PAController::versionNum = 1.6
Property PAController::VIEW

Instance of PAView - Padaco's view component.

Property PAController::window_resolution

struct of different time resolutions, field names correspond to the units of time represented in the field


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