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
1d4fb346
Commit
1d4fb346
authored
15 years ago
by
jacques.grelet_ird.fr
Browse files
Options
Downloads
Patches
Plain Diff
patch gael Alory du 14 avril
parent
b57bef8d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tsg_util/minSpeedQC.m
+46
-0
46 additions, 0 deletions
tsg_util/minSpeedQC.m
tsg_util/preferencesForm.m
+76
-4
76 additions, 4 deletions
tsg_util/preferencesForm.m
tsg_util/tsg_preferences.m
+4
-1
4 additions, 1 deletion
tsg_util/tsg_preferences.m
with
126 additions
and
5 deletions
tsg_util/minSpeedQC.m
0 → 100644
+
46
−
0
View file @
1d4fb346
function
minSpeedQC
(
hMainFig
)
%
% This function is called after option/preferences menu has been activated
% and flag salinity data where ship speed < min as HARBOUR if test is on
%
% Input
% -----
% hMainFig ............ Handle to the main user interface
%
% problem: the QC flag counter in 'Validation Codes' window
% is not updated after the test is applied
%
% Get the data from the application GUI
% -------------------------------------
tsg
=
getappdata
(
hMainFig
,
'tsg_data'
);
% Get HARBOUR code value
% ----------------------
harbourCode
=
tsg
.
qc
.
hash
.
HARBOUR
.
code
;
% get preference choice for ship speed test
% -----------------------------------------
test
=
tsg
.
preference
.
ship_speed_test
;
if
(
test
==
2
)
speed_min_string
=
tsg
.
preference
.
ship_speed_min_string
;
speed_min_choice
=
tsg
.
preference
.
ship_speed_min
;
speed_min
=
str2double
(
speed_min_string
(
speed_min_choice
));
% Set salinity QC to HARBOUR for ship speed < speed_min
% -----------------------------------------------------
ind
=
find
(
tsg
.
SPDC
<
speed_min
);
if
~
isempty
(
ind
)
tsg
.
SSPS_QC
(
ind
)
=
castByteQC
(
harbourCode
,
ind
);
end
end
% Save tsg structure
% ------------------
setappdata
(
hMainFig
,
'tsg_data'
,
tsg
);
end
This diff is collapsed.
Click to expand it.
tsg_util/preferencesForm.m
+
76
−
4
View file @
1d4fb346
...
...
@@ -108,6 +108,70 @@ if bottom < .1
left
=
left
+
inc_x
;
end
% display ship speed test text
% ----------------------------
uicontrol
(
...
'Parent'
,
hPreferencesFig
,
...
'Units'
,
'normalized'
,
...
'Style'
,
'Text'
,
...
'Fontsize'
,
tsg
.
fontSize
-
1
,
...
'HorizontalAlignment'
,
'left'
,
...
'Position'
,[
left
,
bottom
,
length
,
height
],
...
'TooltipString'
,
'enable/disable ship speed test'
,
...
'String'
,
'Ship Speed Test'
);
% display ship speed test uicontrol
% ---------------------------------
uicontrol
(
...
'Parent'
,
hPreferencesFig
,
...
'Units'
,
'normalized'
,
...
'BackgroundColor'
,
'w'
,
...
'Style'
,
'popupmenu'
,
...
'Fontsize'
,
tsg
.
fontSize
-
2
,
...
'HorizontalAlignment'
,
'right'
,
...
'Position'
,
[
left
+
length
,
bottom
,
length
,
height
],
...
'String'
,
tsg
.
preference
.
ship_speed_test_string
,
...
'Value'
,
tsg
.
preference
.
ship_speed_test
,
...
'Tag'
,
'PREFERENCES_SHIP_SPEED_TEST'
);
bottom
=
bottom
-
inc_y
-
height
;
if
bottom
<
.
1
bottom
=
0.95
;
left
=
left
+
inc_x
;
end
% display ship speed min text
% -----------------------------
uicontrol
(
...
'Parent'
,
hPreferencesFig
,
...
'Units'
,
'normalized'
,
...
'Style'
,
'Text'
,
...
'Fontsize'
,
tsg
.
fontSize
-
1
,
...
'HorizontalAlignment'
,
'left'
,
...
'Position'
,[
left
,
bottom
,
length
,
height
],
...
'TooltipString'
,
'select ship speed min (knots)'
,
...
'String'
,
'Ship Speed Min'
);
% display ship speed min uicontrol
% --------------------------------
uicontrol
(
...
'Parent'
,
hPreferencesFig
,
...
'Units'
,
'normalized'
,
...
'BackgroundColor'
,
'w'
,
...
'Style'
,
'popupmenu'
,
...
'Fontsize'
,
tsg
.
fontSize
-
2
,
...
'HorizontalAlignment'
,
'right'
,
...
'Position'
,
[
left
+
length
,
bottom
,
length
,
height
],
...
'String'
,
tsg
.
preference
.
ship_speed_min_string
,
...
'Value'
,
tsg
.
preference
.
ship_speed_min
,
...
'Tag'
,
'PREFERENCES_SHIP_SPEED_MIN'
);
bottom
=
bottom
-
inc_y
-
height
;
if
bottom
<
.
1
bottom
=
0.95
;
left
=
left
+
inc_x
;
end
% display connected line text
% -------------------------
uicontrol
(
...
...
...
@@ -152,8 +216,8 @@ if bottom < .1
left
=
left
+
inc_x
;
end
% display co
nnected lin
e text
% -------------------------
% display co
efficient typ
e text
% -------------------------
----
uicontrol
(
...
'Parent'
,
hPreferencesFig
,
...
'Units'
,
'normalized'
,
...
...
...
@@ -164,8 +228,8 @@ uicontrol(...
'TooltipString'
,
'select coefficients type'
,
...
'String'
,
'Coefficients type'
);
% display co
nnected lin
e uicontrol
% --------------------------------
% display co
efficient typ
e uicontrol
% --------------------------------
--
uicontrol
(
...
'Parent'
,
hPreferencesFig
,
...
'Units'
,
'normalized'
,
...
...
...
@@ -244,6 +308,10 @@ uiwait(hPreferencesFig);
get
(
prefs
.
PREFERENCES_LEVITUS_VALUE
,
'value'
);
tsg
.
preference
.
levitus_depth_value
=
...
get
(
prefs
.
PREFERENCES_LEVITUS_DEPTH
,
'value'
);
tsg
.
preference
.
ship_speed_test
=
...
get
(
prefs
.
PREFERENCES_SHIP_SPEED_TEST
,
'value'
);
tsg
.
preference
.
ship_speed_min
=
...
get
(
prefs
.
PREFERENCES_SHIP_SPEED_MIN
,
'value'
);
tsg
.
preference
.
plot_connected_value
=
...
get
(
prefs
.
PREFERENCES_PLOT_CONNECTED_LINE
,
'value'
);
tsg
.
preference
.
coeff_type_value
=
...
...
...
@@ -257,7 +325,11 @@ uiwait(hPreferencesFig);
% ------------------------------
updateTsgStructWithCalCoeff
(
hTsgGUI
);
% apply ship speed QC
% -------------------
minSpeedQC
(
hTsgGUI
);
% close windows (replace call to uiresume(hHeaderFig))
% ----------------------------------------------------
close
(
hPreferencesFig
);
...
...
This diff is collapsed.
Click to expand it.
tsg_util/tsg_preferences.m
+
4
−
1
View file @
1d4fb346
...
...
@@ -135,7 +135,10 @@ end
preference
.
levitus_value
=
2
;
% WOA05
preference
.
levitus_depth_string
=
{
'0'
,
'10'
};
preference
.
levitus_depth_value
=
1
;
preference
.
ship_speed
=
1
;
preference
.
ship_speed_test_string
=
{
'none'
,
'automatic'
};
preference
.
ship_speed_test
=
1
;
% no test on ship speed
preference
.
ship_speed_min_string
=
{
'1'
,
'3'
,
'5'
};
preference
.
ship_speed_min
=
1
;
preference
.
plot_connected_string
=
{
'none'
,
'-'
,
'--'
,
':'
,
'-.'
};
preference
.
plot_connected_value
=
1
;
% 0, line not connected
preference
.
coeff_type_string
=
{
'use A-D'
,
'use G-J'
};
...
...
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