Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TSG QC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
US191
TSG QC
Commits
ced74e3f
Commit
ced74e3f
authored
13 years ago
by
Yves Gouriou
Browse files
Options
Downloads
Patches
Plain Diff
In progress
Function that manages IO and concatenation of TSG files
parent
381109ad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tsg_io/TEST_READ.m
+126
-0
126 additions, 0 deletions
tsg_io/TEST_READ.m
with
126 additions
and
0 deletions
tsg_io/TEST_READ.m
0 → 100644
+
126
−
0
View file @
ced74e3f
function
[
errTsg
,
errSpl
]
=
TEST_READ
(
hMainFig
,
filterIndex
,
fullFileName
)
errTsg
=
-
2
;
errSpl
=
-
2
;
% Retrieve named application data
% -------------------------------
tsg
=
getappdata
(
hMainFig
,
'tsg_data'
);
switch
filterIndex
% Water Sample : Lecture de donnes discrtes autres que les mesures TSG
% ----------------------------------------------------------------------
case
{
1
,
3
,
8
}
% Test si un fichier a dj t charg en mmoire. Ceci est obligatoire
% avant tout chargement d'un fichier bouteille
% ---------------------------------------------------------------------
if
isempty
(
tsg
.
SSPS
)
msgbox
(
'Load a TSG file before a Water sample file'
,
'Read Bucket'
);
return
;
elseif
filterIndex
==
1
% Read Argo file *.arg (G. Reverdin format)
errSpl
=
readArgoLocean
(
hMainFig
,
fullFileName
);
elseif
filterIndex
==
3
||
filterIndex
==
8
% Read sample file *.spl
errSpl
=
readAsciiSample
(
hMainFig
,
fullFileName
,
'SPL'
);
end
% TSG : lecture de donnes TSG
% ----------------------------
case
{
2
,
4
,
5
,
6
,
7
,
9
,
10
,
11
}
% Test si un fichier a dj t charg en mmoire.
% Offre la possibilit de concatner les fichiers ASCII et NETCDF
% ---------------------------------------------------------------
button
=
'Replace'
;
if
~
isempty
(
tsg
.
SSPS
)
if
filterIndex
==
5
||
filterIndex
==
10
qstring
=
{
'TSG data have already been uploaded in TSGQC '
;
' '
;
...
'Do you want to Replace or to Concatenate them?'
};
title
=
'Read TSG Data'
;
button
=
questdlg
(
qstring
,
title
,
'Replace'
,
'Concatenate'
,
'Cancel'
,
'Cancel'
);
end
end
switch
button
case
'Replace'
% Initialisation de la structure TSG
% ----------------------------------
tsg_initialisation
(
hMainFig
);
switch
filterIndex
case
2
% read TSG Astrolabe text file *.ast
errTsg
=
readTsgDataAstrolabe
(
hMainFig
,
fullFileName
);
case
4
% read TSG labview file *.lbv
errTsg
=
readTsgDataLabview
(
hMainFig
,
fullFileName
);
case
5
% read TSG netcdf file *.nc
errTsg
=
readTsgDataNetCDF
(
hMainFig
,
fullFileName
);
case
6
% read TSG Oracle text file *.ora
errTsg
=
readTsgDataOracle
(
hMainFig
,
fullFileName
);
case
7
% read TSG SDF file *.sdf
errTsg
=
readTsgDataSDF
(
hMainFig
,
fullFileName
);
case
9
% read TSG Nuka transmit file *.transmit*
errTsg
=
readTsgDataNuka
(
hMainFig
,
fullFileName
);
case
10
% read TSG text file *.tsgqc
errTsg
=
readAsciiTsg
(
hMainFig
,
fullFileName
);
case
11
% read TSG XML file *.xml
errTsg
=
readTsgDataXML
(
hMainFig
,
fullFileName
);
end
case
'Concatenate'
% Gestion de la mmoire vive disponible
% -------------------------------------
% [userview systemview] = memory
% Sauvegarde la structure tsg
% ---------------------------
tsg_old
=
getappdata
(
hMainFig
,
'tsg_data'
);
% Initailisation d'une nouvelle structure TSG.
tsg_initialisation
(
hMainFig
);
% tsg = getappdata( hMainFig, 'tsg_data');
if
filterIndex
==
10
errTsg
=
readAsciiTsg
(
hMainFig
,
fullFileName
);
elseif
filterIndex
==
5
errTsg
=
readTsgDataNetCDF
(
hMainFig
,
fullFileName
);
end
error
=
concatStructTSG
(
hMainFig
,
tsg_old
);
% Rcupre la structure tsg qui vient d'tre lue
% ----------------------------------------------
tsg
=
getappdata
(
hMainFig
,
'tsg_data'
);
case
'Cancel'
return
;
otherwise
return
;
end
otherwise
% Reset pointer to arrow
% ----------------------
set
(
hMainFig
,
'Pointer'
,
'arrow'
);
% diplay warning msgbox
% ---------------------
msgbox
(
{[
'Invalid TSG file: '
fileName
],
...
'Please select another file'
},
...
'Warning open file'
,
'warn'
,
'modal'
);
return
;
end
% switch filterIndex
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment