Home > functions > gui > bayes_parm_editor_dir > bayes_parm_editor_init.m

bayes_parm_editor_init

PURPOSE ^

This function creates bayes parameter gui.

SYNOPSIS ^

function [obj] = bayes_parm_editor_init(proj_root, bayes_parm)

DESCRIPTION ^

 This function creates bayes parameter gui.
 [USAGE]
    obj = bayes_parm_editor_init([proj_root] [,bayes_parm]);
 [IN]
     proj_root : project root directory
    bayes_parm : bayes_parm
 [OUT]
    obj : bayes_parm_editor object(invisible figure)

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [obj] = bayes_parm_editor_init(proj_root, bayes_parm)
0002 % This function creates bayes parameter gui.
0003 % [USAGE]
0004 %    obj = bayes_parm_editor_init([proj_root] [,bayes_parm]);
0005 % [IN]
0006 %     proj_root : project root directory
0007 %    bayes_parm : bayes_parm
0008 % [OUT]
0009 %    obj : bayes_parm_editor object(invisible figure)
0010 %
0011 % Copyright (C) 2011, ATR All Rights Reserved.
0012 % License : New BSD License(see VBMEG_LICENSE.txt)
0013 
0014 %
0015 % --- Previous check
0016 %
0017 if ~exist('proj_root', 'var')
0018     proj_root = '';
0019 end
0020 if ~exist('bayes_parm', 'var') || isempty(bayes_parm)
0021     bayes_parm = vb_set_bayes_parm;
0022 end
0023 
0024 %
0025 % --- Main Procedure
0026 %
0027 obj = figure('Visible', 'off');
0028 
0029 data = struct;
0030 data.obj = obj;
0031 data.bayes_parm = bayes_parm;
0032 
0033 % figure handle of basic parameter gui.
0034 data.basic_fig = bayes_parm_basic_init(obj, proj_root, bayes_parm);
0035 data.adv_fig   = -1;
0036 
0037 data.meg_info = [];
0038 data.sensor_noise_info = [];
0039 if isfield(bayes_parm, 'a0_act') && isempty(bayes_parm.a0_act)
0040     data.a0_act_auto = true;
0041 else
0042     data.a0_act_auto = false;
0043 end
0044 % save data
0045 guidata(obj, data);
0046 
0047 % View update
0048 bayes_parm_basic_gui(data.basic_fig, 'set_project_root', proj_root);
0049 bayes_parm_basic_gui(data.basic_fig, 'gui_update', data.bayes_parm);

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005