Skip to content
Snippets Groups Projects
Commit 433c24ed authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

utilise maintenant setappdata

parent 4d368049
No related branches found
No related tags found
No related merge requests found
function tsg = tsg_initialisation()
%function tsg_initialisation(hTsgGUI)
function tsg_initialisation(hMainFig)
%
% Input
% -----
% none
% hMainFig ............ Handel to the main user interface
%
% Output
% ------
% tsg ............ tsg structure that contain data
% none
%
% $Id$
%
......@@ -15,6 +14,7 @@ function tsg = tsg_initialisation()
% -------------------------------------------------------------------------
%% Constants for NetCDF DATA FORMAT TSG
% -------------------------------------------------------------------------
tsg = [];
% netcdf file version
% -------------------
......@@ -166,3 +166,6 @@ tsg.DATE_CREATION = [date(1:8) date(10:15)];
tsg.DATE_UPDATE = tsg.DATE_CREATION;
tsg.REFERENCE_DATE_TIME = REFERENCE_DATE_TIME;
% Save tsg structure
% ------------------
setappdata( hMainFig, 'tsg_data', tsg);
......@@ -126,8 +126,12 @@ set(0, 'userdata', root);
% call default tsg_initialisation
% -------------------------------
tsg = tsg_initialisation;
tsg_initialisation(hTsgGUI);
% Get the data from the application GUI
% -------------------------------------
tsg = getappdata( hTsgGUI, 'tsg_data');
% init root structure to default values
% -------------------------------------
root.preference.autoload = 'off';
......
......@@ -101,9 +101,6 @@ hMainFig = figure(...
'Position',guiLimits, ...
'Color', get( 0, 'DefaultUIControlBackgroundColor' ));
% Initialize tsg structure
% ------------------------
% tsg_initialisation(hMainFig)
%% Initialize tsg structure with tsg_preference function
% -----------------------------------------------------
......@@ -1017,6 +1014,10 @@ end
% construct valid and full file path
% -----------------------------------
fullFileName = strcat(pathname, fileName);
% call default tsg_initialisation
% -------------------------------
tsg_initialisation(hMainFig);
% Read the data
% -------------
......@@ -1085,13 +1086,15 @@ end
% ---------------------------
set( hInfoFileText, 'String', strcat(tsg.file.name, tsg.file.ext));
% update some fields in tsg structure
% -----------------------------------
% update some fields in tsg structure and restore tsg
% ---------------------------------------------------
updateTsgStruct(hMainFig);
tsg = getappdata( hMainFig, 'tsg_data');
% Running average of TSG time series
% ----------------------------------
tsg_moveaverage(hMainFig);
% The callback to detect the mouse motion can be set to on
% --------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment