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 Types | |
enum | Events { UserCancel_Event } |
Public Member Functions | |
function | PAStatTool (in padaco_fig_h, in resultsPathname, in widgetSettings) |
Constructor for PAStatTool. More... | |
function | delete (in this) |
Overload delete method to ensure we get rid of the analysis figure. More... | |
function | inClusterView (in this) |
Returns boolean indicator if results view is showing clusters (plot type 'centroids') or not. More... | |
function | getPlotType (in this) |
function | getCentroidObj (in this) |
Get method for centroidObj instance variable. More... | |
function | hasCentroid (in this) |
function | getCanPlot (in this) |
Get method for canPlot instance variable. More... | |
function | getSaveParameters (in this) |
Returns plot settings that can be used to initialize a a PAStatTool with the same settings. More... | |
function | setWidgetSettings (in this, in widgetSettings, in initializeOnSet) |
Sets the widget settings. In particular, set the originalWidgetSettings property to the input struct. More... | |
function | setStartTimes (in this, in startTimeCellStr) |
Sets the start and stop time dropdown menu content and returns the selection. More... | |
function | calcFeatureStruct (in this) |
Loads feature struct from disk using results feature directory. More... | |
function | init (in this) |
Initializes widget using current plot settings and refreshes the view. More... | |
function | clearPlots (in this) |
Clears the primary and secondary axes. More... | |
function | clearPrimaryAxes (in this) |
Clears the primary axes. More... | |
function | clearSecondaryAxes (in this) |
Clears the secondary axes. More... | |
function | refreshPlot (in this, in varargin) |
Updates the plot according to gui settings. The method is assigned as the callback function to most of the gui widgets, but can called from the instance object anytime a refresh is desired. More... | |
function | enable (in obj) |
function | disable (in obj) |
function | setEnableState (in obj, in enableState) |
function | getFullCentroidCacheFilename (in this) |
function | hasValidCentroid (in this) |
Checks if a centroid object member (instance of PACentroid) exists and converged. More... | |
function | initWidgets (in this, in widgetSettings) |
Initialize gui handles using input parameter or default parameters. Initalizes callbacks where applicable. More... | |
function | initRefreshCentroidButton (in this, in enableState) |
function | switchFromClustering (in this) |
Configure gui handles for non centroid/clusting viewing. More... | |
function | switch2clustering (in this) |
Configure gui handles for centroid analysis and viewing. More... | |
function | decreaseProfileFieldSelection (in this) |
function | increaseProfileFieldSelection (in this) |
function | setProfileFieldIndex (in this, in profileFieldIndex) |
Software driven callback trigger for profileFieldSelectionChangeCallback. Used as a wrapper for handling non-menu_ySelection menu changes to the profile field index (e.g. using up or down arrow keys). More... | |
function | profileFieldSelectionChangeCallback (in this, in hObject, in eventData) |
Callback for the profile selection menu widget found in the analysis figure. Results in changing the scatter plot and highlighting the newly selected field of interest in the centroid profile table. More... | |
function | getProfileFieldSelection (in this) |
function | shouldShowAnalysisFigure (in this) |
function | refreshScatterPlot (in this) |
function | initScatterPlotFigure (in this) |
Initialize the analysis figure, which holds the scatter plot axes and the profile table containing subject information contained in subjects grouped together by the current centroid of interest. More... | |
function | initProfileTable (in this, in profileFieldSelection) |
Initializes the row table and menu_ySelection menu handle which indicates the profile field selected by the user. The row corresponding to the selected profile field is highlighed by using a darker background color. More... | |
function | initScatterPlotAxes (in this) |
I itialize the scatter plot axes (of the analysis figure). More... | |
function | initHandles (in this) |
function | initBase (in this) |
function | plotSelection (in this, in plotOptions) |
Display a selection of results organized by day of the week. More... | |
function | checkSegmentHistogramsCallback (in this, in hObject, in ignoredArg) |
Check button callback for segmenting centroid histogram distributions into intervals across the time period covered. More... | |
function | editTrimToPercentChange (in this, in editHandle, in ignoredArg) |
Callback for trim percent change edit box. More... | |
function | checkTrimCallback (in this, in hObject, in ignoredArg) |
Check button callback for enabling/disbling load shape trimming. More... | |
function | editCullToValueChange (in this, in editHandle, in ignoredArg) |
Callback for cull value change edit widget. More... | |
function | checkCullCallback (in this, in hObject, in ignoredArg) |
Check button callback for enabling/disbling load shape culling. More... | |
function | showNextCentroidCallback (in this, in varargin) |
Push button callback for displaying the next centroid. More... | |
function | showNextCentroid (in this, in toggleOn) |
Push button callback for displaying the next centroid. More... | |
function | showPreviousCentroidCallback (in this, in varargin) |
Push button callback for displaying the previous centroid. More... | |
function | showPreviousCentroid (in this, in toggleOn) |
Push button callback for displaying the next centroid. More... | |
function | checkShowCentroidMembershipCallback (in this, in varargin) |
Check button callback to refresh centroid display. More... | |
function | cacheCentroid (in this) |
Creates a matlab struct with pertinent fields related to the current centroid and its calculation, and then saves the struct in a matlab binary (.mat) file. Fields include. More... | |
function | refreshCentroidsAndPlot (in this, in varargin) |
Push button callback for updating the centroids being displayed. More... | |
function | drawCentroidXTicksAndLabels (in this) |
function | hideCentroidControls (in this) |
Hides the panel of centroid interaction controls. For example, the forward and back buttons that appear in between the two axes. More... | |
function | toggleLegendCallback (in this, in hObject, in eventData, in axesHandle) |
function | showCentroidControls (in this) |
function | enableCentroidControls (in this) |
Does not change panel_plotCentroid controls. More... | |
function | disableCentroidControls (in this) |
Does not alter panel_plotCentroid controls, which we want to leave avaialbe to the user to manipulate settings in the event that they have excluded loadshapes and need to alter the settings to included them in a follow-on calculation. More... | |
function | plotCentroids (in this, in centroidAndPlotSettings) |
Displays most recent centroid data according to gui setttings. More... | |
function | getPlotSettings (in this) |
function | refreshProfileTableData (in this) |
Refreshes the centroid profile table based on current profile statistics found in member variable profileTableData . More... | |
function | analysisTableCellSelectionCallback (in this, in hObject, in eventdata) |
function | refreshCOIProfile (in this) |
Refreshes profile statistics for the current centroid of interest (COI). This method should be called whenever the COI changes. More... | |
function | refreshGlobalProfile (in this) |
Refreshes the global profile statistics based on the current centroids available. This method should be called whenever the centroids are changed or updated. More... | |
function | getProfileFieldIndex (in this) |
function | getProfileCell (in this, in primaryKeys, in fieldsOfInterest) |
Static Public Member Functions | |
static function | discardNonWearFeatures (in featureStructIn, in usageStateStruct) |
static function | loadAlignedFeatures (in filename) |
Loads and aligns features from a padaco batch process results output file. More... | |
static function | normalizeLoadShapes (in loadShapes) |
Normalizes each load according to the sum of its parts. More... | |
static function | getDefaultParameters () |
Gets parameters for default initialization of a PAStatTool object. More... | |
static function | getBaseSettings () |
Gets default parameter selection values for GUI dropdown menus used in conjunction with PAStatTool. More... | |
static function | profile2cell (in profileStruct) |
Public Attributes | |
Constant Property | RESULTS_CACHE_FILENAME = 'results.tmp' |
Property | profileFields |
Protected Member Functions | |
function | enableCentroidRecalculation (in this, in varargin) |
Callback to enable the push_refreshCentroids button. The button's background color is switched to green to highlight the change and need for recalculation. More... | |
function | enableCentroidCancellation (in this, in varargin) |
function | cancelCentroidsCalculationCallback (in this, in hObject, in eventdata) |
function | menuWeekdaysCallback (in this, in hObject, in eventData) |
function | analyzeClustersCallback (in this, in hObject, in eventData) |
function | exportTableResultsCallback (in this, in hObject, in eventData) |
function | hideAnalysisFigure (in this, in varargin) |
function | checkShowAnalysisFigureCallback (in this, in hObject, in eventData) |
function | primaryAxesScalingContextmenuCallback (in this, in hObject, in ignoredArg) |
function | primaryAxesScalingCallback (in this, in hObject, in ignoredArg, in yScalingMode) |
function | checkHoldYAxesCallback (in this, in hObject, in eventData) |
A 'checked' "Hold y-axis" checkbox infers 'manual' yllimmode for the primary (upper) axis. An unchecked box indicates auto-scaling for the y-axis. More... | |
function | primaryAxesNextPlotContextmenuCallback (in this, in hObject, in ignoredArg) |
function | primaryAxesNextPlotCallback (in this, in hObject, in ignoredArg, in nextPlot) |
function | checkHoldPlotsCallback (in this, in hObject, in eventData) |
function | contextmenu_secondaryAxesCallback (in this, in varargin) |
function | centroidDistributionCallback (in this, in hObject, in eventdata, in selection) |
enum PAStatTool::Events |
function PAStatTool::PAStatTool | ( | in | padaco_fig_h, |
in | resultsPathname, | ||
in | widgetSettings | ||
) |
Constructor for PAStatTool.
padaco_fig_h | Handle to figure to be instantiated with |
resultsPathname | |
optional | struct with field value pairs for initializing user settings. See getSaveParameters |
this | Instance of PAStatTool |
function PAStatTool::analysisTableCellSelectionCallback | ( | in | this, |
in | hObject, | ||
in | eventdata | ||
) |
|
protected |
function PAStatTool::cacheCentroid | ( | in | this | ) |
Creates a matlab struct with pertinent fields related to the current centroid and its calculation, and then saves the struct in a matlab binary (.mat) file. Fields include.
function PAStatTool::calcFeatureStruct | ( | in | this | ) |
Loads feature struct from disk using results feature directory.
this | Instance of PAStatTool |
success | Boolean: true if features are loaded from file. False if they are not. |
|
protected |
|
protected |
function PAStatTool::checkCullCallback | ( | in | this, |
in | hObject, | ||
in | ignoredArg | ||
) |
Check button callback for enabling/disbling load shape culling.
this | Instance of PAStatTool |
hObject | Handle of the checkbutton that is calling back. |
Variable | number of arguments required by MATLAB gui callbacks |
|
protected |
|
protected |
A 'checked' "Hold y-axis" checkbox infers 'manual' yllimmode for the primary (upper) axis. An unchecked box indicates auto-scaling for the y-axis.
function PAStatTool::checkSegmentHistogramsCallback | ( | in | this, |
in | hObject, | ||
in | ignoredArg | ||
) |
Check button callback for segmenting centroid histogram distributions into intervals across the time period covered.
this | Instance of PAStatTool |
hObject | Handle of the checkbutton that is calling back. |
Variable | number of arguments required by MATLAB gui callbacks |
|
protected |
function PAStatTool::checkShowCentroidMembershipCallback | ( | in | this, |
in | varargin | ||
) |
Check button callback to refresh centroid display.
this | Instance of PAStatTool |
Variable | number of arguments required by MATLAB gui callbacks |
function PAStatTool::checkTrimCallback | ( | in | this, |
in | hObject, | ||
in | ignoredArg | ||
) |
Check button callback for enabling/disbling load shape trimming.
this | Instance of PAStatTool |
hObject | Handle of the checkbutton that is calling back. |
Variable | number of arguments required by MATLAB gui callbacks |
function PAStatTool::clearPlots | ( | in | this | ) |
Clears the primary and secondary axes.
this | Instance of PAStatTool |
function PAStatTool::clearPrimaryAxes | ( | in | this | ) |
Clears the primary axes.
this | Instance of PAStatTool |
function PAStatTool::clearSecondaryAxes | ( | in | this | ) |
Clears the secondary axes.
this | Instance of PAStatTool |
|
protected |
function PAStatTool::decreaseProfileFieldSelection | ( | in | this | ) |
function PAStatTool::delete | ( | in | this | ) |
Overload delete method to ensure we get rid of the analysis figure.
function PAStatTool::disable | ( | in | obj | ) |
function PAStatTool::disableCentroidControls | ( | in | this | ) |
Does not alter panel_plotCentroid controls, which we want to leave avaialbe to the user to manipulate settings in the event that they have excluded loadshapes and need to alter the settings to included them in a follow-on calculation.
|
static |
function PAStatTool::drawCentroidXTicksAndLabels | ( | in | this | ) |
function PAStatTool::editCullToValueChange | ( | in | this, |
in | editHandle, | ||
in | ignoredArg | ||
) |
Callback for cull value change edit widget.
this | Instance of PAStatTool |
editHandle | handle to edit box. |
eventdata | (req'd by matlab, but unset) |
function PAStatTool::editTrimToPercentChange | ( | in | this, |
in | editHandle, | ||
in | ignoredArg | ||
) |
Callback for trim percent change edit box.
this | Instance of PAStatTool |
editHandle | handle to edit box. |
eventdata | (req'd by matlab, but unset) |
function PAStatTool::enable | ( | in | obj | ) |
|
protected |
function PAStatTool::enableCentroidControls | ( | in | this | ) |
Does not change panel_plotCentroid controls.
|
protected |
Callback to enable the push_refreshCentroids button. The button's background color is switched to green to highlight the change and need for recalculation.
this | Instance of PAStatTool |
Variable | number of arguments required by MATLAB gui callbacks |
|
protected |
|
static |
Gets default parameter selection values for GUI dropdown menus used in conjunction with PAStatTool.
Struct | of default menu selection values. Fields include
|
function PAStatTool::getCanPlot | ( | in | this | ) |
Get method for canPlot instance variable.
this | Instance of PAStatTool |
canPlot | Boolean (true if results are loaded and displayable). |
function PAStatTool::getCentroidObj | ( | in | this | ) |
Get method for centroidObj instance variable.
this | Instance of PAStatTool |
Instance | of PACentroid or [] |
|
static |
Gets parameters for default initialization of a PAStatTool object.
Struct | of default paramters. Fields include
|
function PAStatTool::getFullCentroidCacheFilename | ( | in | this | ) |
function PAStatTool::getPlotSettings | ( | in | this | ) |
this | Instance of PAStatTool |
userSettings | Struct of GUI parameter value pairs |
function PAStatTool::getPlotType | ( | in | this | ) |
function PAStatTool::getProfileCell | ( | in | this, |
in | primaryKeys, | ||
in | fieldsOfInterest | ||
) |
Obtained | from <PACentroid>.getCentroidOfInterest() or <PACentroid>.getCovariateStruct() for all subjects. |
Primary | ID's to extract from the database. |
Field | names to extract from the database. |
function PAStatTool::getProfileFieldIndex | ( | in | this | ) |
function PAStatTool::getProfileFieldSelection | ( | in | this | ) |
function PAStatTool::getSaveParameters | ( | in | this | ) |
Returns plot settings that can be used to initialize a a PAStatTool with the same settings.
this | Instance of PAStatTool |
Structure | of current plot settings. |
function PAStatTool::hasCentroid | ( | in | this | ) |
function PAStatTool::hasValidCentroid | ( | in | this | ) |
Checks if a centroid object member (instance of PACentroid) exists and converged.
this | Instance of PAStatTool |
isValid | (boolean) True if a centroid object (instance of PACentroid) exists and converged; False otherwise |
|
protected |
function PAStatTool::hideCentroidControls | ( | in | this | ) |
Hides the panel of centroid interaction controls. For example, the forward and back buttons that appear in between the two axes.
Instance | of PAStatTool |
function PAStatTool::inClusterView | ( | in | this | ) |
Returns boolean indicator if results view is showing clusters (plot type 'centroids') or not.
function PAStatTool::increaseProfileFieldSelection | ( | in | this | ) |
function PAStatTool::init | ( | in | this | ) |
Initializes widget using current plot settings and refreshes the view.
this | Instance of PAStatTool |
function PAStatTool::initBase | ( | in | this | ) |
this | Instance of PAStatTool |
function PAStatTool::initHandles | ( | in | this | ) |
this | Instance of PAStatTool |
function PAStatTool::initProfileTable | ( | in | this, |
in | profileFieldSelection | ||
) |
Initializes the row table and menu_ySelection menu handle which indicates the profile field selected by the user. The row corresponding to the selected profile field is highlighed by using a darker background color.
this | Instance of PAStatTool |
profileFieldSelection | Index of the profile field currently selected. If not entered, it is set to '1', the first profile field available. |
function PAStatTool::initRefreshCentroidButton | ( | in | this, |
in | enableState | ||
) |
function PAStatTool::initScatterPlotAxes | ( | in | this | ) |
I itialize the scatter plot axes (of the analysis figure).
this | Instance of PAStatTool |
function PAStatTool::initScatterPlotFigure | ( | in | this | ) |
Initialize the analysis figure, which holds the scatter plot axes and the profile table containing subject information contained in subjects grouped together by the current centroid of interest.
this | Instance of PAStatTool |
function PAStatTool::initWidgets | ( | in | this, |
in | widgetSettings | ||
) |
Initialize gui handles using input parameter or default parameters. Initalizes callbacks where applicable.
this | Instance of PAStatTool |
widgetSettings | GUI setting parameters (optional). If this is not included or is empty, then the default parameters are used to initialize the gui (See getDefaultParameters). |
|
static |
Loads and aligns features from a padaco batch process results output file.
filename | Full filename (i.e. contains absolute pathname) of features file produced by padaco's batch processing mode. |
featureStruct | A structure of aligned features obtained from filename. Fields include:
|
|
protected |
|
static |
Normalizes each load according to the sum of its parts.
loadShapes | NxM array of N load shapes, each of dimension M. |
normalizedLoadShapes | NxM array of normalized load shapes, where N is the number of load shapes. normalizedLoadShapes(n,:) = loadShapes(n,:)/sum(loadShapes(n,:)) |
nzi | Indices of non-zero sum load shapes. |
function PAStatTool::plotCentroids | ( | in | this, |
in | centroidAndPlotSettings | ||
) |
Displays most recent centroid data according to gui setttings.
this | Instance of PAStatTool |
plotSettings | Structure of GUI parameters for configuration and display of centroid data. |
function PAStatTool::plotSelection | ( | in | this, |
in | plotOptions | ||
) |
Display a selection of results organized by day of the week.
this | Instance of PAStatTool |
plotOptions | struct of options for how to plot featureStruct instance variable values. |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
Profile cell is output as follows
'n'
'n_above'
'n_below'
'mx'
'var'
'sem'
'string'
function PAStatTool::profileFieldSelectionChangeCallback | ( | in | this, |
in | hObject, | ||
in | eventData | ||
) |
Callback for the profile selection menu widget found in the analysis figure. Results in changing the scatter plot and highlighting the newly selected field of interest in the centroid profile table.
this | Instance of PAStatTool |
hObject | |
eventData |
function PAStatTool::refreshCentroidsAndPlot | ( | in | this, |
in | varargin | ||
) |
Push button callback for updating the centroids being displayed.
this | Instance of PAStatTool |
Variable | number of arguments required by MATLAB gui callbacks varargin{1} may be used to disable the button after success. |
function PAStatTool::refreshCOIProfile | ( | in | this | ) |
Refreshes profile statistics for the current centroid of interest (COI). This method should be called whenever the COI changes.
this | Instance of PAStatTool. |
didRefresh | True on successful refresh, false otherwise. |
function PAStatTool::refreshGlobalProfile | ( | in | this | ) |
Refreshes the global profile statistics based on the current centroids available. This method should be called whenever the centroids are changed or updated.
this | Instance of PAStatTool. |
didRefresh | True on successful refresh, false otherwise. |
function PAStatTool::refreshPlot | ( | in | this, |
in | varargin | ||
) |
Updates the plot according to gui settings. The method is assigned as the callback function to most of the gui widgets, but can called from the instance object anytime a refresh is desired.
this | Instance of PAStatTool |
varargin | Handle of callback parent and associated event data. Neither are used, but required by MATLAB gui callbacks |
function PAStatTool::refreshProfileTableData | ( | in | this | ) |
Refreshes the centroid profile table based on current profile statistics found in member variable profileTableData
.
this | Instance of PAStatTool. |
didRefresh | True on successful refresh, false otherwise. |
function PAStatTool::refreshScatterPlot | ( | in | this | ) |
function PAStatTool::setEnableState | ( | in | obj, |
in | enableState | ||
) |
function PAStatTool::setProfileFieldIndex | ( | in | this, |
in | profileFieldIndex | ||
) |
Software driven callback trigger for profileFieldSelectionChangeCallback. Used as a wrapper for handling non-menu_ySelection menu changes to the profile field index (e.g. using up or down arrow keys).
this | Instance of PAStatTool |
profileFieldIndex |
function PAStatTool::setStartTimes | ( | in | this, |
in | startTimeCellStr | ||
) |
Sets the start and stop time dropdown menu content and returns the selection.
this | Instance of PAStatTool |
Cell | string of times that can be selected to define a range of time to calculate centroid profiles from. |
Selection | value for the menu_centroidStartTime menu. |
Selection | value for the menu_centroidStopTime menu. |
function PAStatTool::setWidgetSettings | ( | in | this, |
in | widgetSettings, | ||
in | initializeOnSet | ||
) |
Sets the widget settings. In particular, set the originalWidgetSettings property to the input struct.
this | Instance of PAStatTool |
Struct | of settings for the Stat tool. Should conform to getDefaultParameters |
initializeOnSet | Optional flag that defaults to {True}. When true, initWidgets() is called using the input widgetSettings. When false, initWidgets is not called (helpful on construction) |
function PAStatTool::shouldShowAnalysisFigure | ( | in | this | ) |
function PAStatTool::showCentroidControls | ( | in | this | ) |
function PAStatTool::showNextCentroid | ( | in | this, |
in | toggleOn | ||
) |
Push button callback for displaying the next centroid.
this | Instance of PAStatTool |
toggleOn | Optional boolean:
|
function PAStatTool::showNextCentroidCallback | ( | in | this, |
in | varargin | ||
) |
Push button callback for displaying the next centroid.
this | Instance of PAStatTool |
Variable | number of arguments required by MATLAB gui callbacks |
function PAStatTool::showPreviousCentroid | ( | in | this, |
in | toggleOn | ||
) |
Push button callback for displaying the next centroid.
this | Instance of PAStatTool |
toggleOn | Optional boolean:
|
function PAStatTool::showPreviousCentroidCallback | ( | in | this, |
in | varargin | ||
) |
Push button callback for displaying the previous centroid.
this | Instance of PAStatTool |
Variable | number of arguments required by MATLAB gui callbacks |
function PAStatTool::switch2clustering | ( | in | this | ) |
Configure gui handles for centroid analysis and viewing.
this | Instance of PAStatTool |
function PAStatTool::switchFromClustering | ( | in | this | ) |
Configure gui handles for non centroid/clusting viewing.
this | Instance of PAStatTool |
function PAStatTool::toggleLegendCallback | ( | in | this, |
in | hObject, | ||
in | eventData, | ||
in | axesHandle | ||
) |
Property PAStatTool::profileFields |
struct of fields to use when profiling/describing centroids. These are names of database fields extracted which are keyed on the subject id's that are members of the centroid of interest.
Constant Property PAStatTool::RESULTS_CACHE_FILENAME = 'results.tmp' |