Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gdat
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
Model registry
Operate
Environments
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
SPC
gdat
Commits
5949e5d9
Commit
5949e5d9
authored
9 months ago
by
Olivier Sauter
Browse files
Options
Downloads
Patches
Plain Diff
add radcam in mapping and hence in tests
parent
d7484faa
No related branches found
No related tags found
1 merge request
!152
add radcam 4 cameras top upper euatorial and bottom or 1 to 4
Pipeline
#195486
failed
9 months ago
Stage: test
Stage: post-test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
matlab/TCV/tcv_requests_mapping.m
+1
-5
1 addition, 5 deletions
matlab/TCV/tcv_requests_mapping.m
matlab/tests/test_requestnames.m
+22
-10
22 additions, 10 deletions
matlab/tests/test_requestnames.m
matlab/tests/test_requestnames_tcv.m
+3
-3
3 additions, 3 deletions
matlab/tests/test_requestnames_tcv.m
with
26 additions
and
18 deletions
matlab/TCV/tcv_requests_mapping.m
+
1
−
5
View file @
5949e5d9
...
...
@@ -458,7 +458,7 @@ switch lower(data_request)
mapping
.
expression
=
[
'params_eff = gdat_data.gdat_params;params_eff.data_request=
''
tcv_eq("surf","LIUQE.M")
''
;'
...
'gdat_tmp=gdat_tcv(shot,params_eff); gdat_tmp.dim = {gdat_tmp.t}; gdat_tmp.x=[]; gdat_tmp.data= gdat_tmp.data(end,:);'
...
'gdat_tmp.dimunits{1}=
''
s
''
;gdat_tmp.help=
''
toroidal surface of LCFS
''
;'
];
case
'sxr'
case
{
'sxr'
,
'mpx'
,
'radcam'
}
mapping
.
timedim
=
1
;
mapping
.
gdat_timedim
=
2
;
mapping
.
method
=
'switchcase'
;
...
...
@@ -583,10 +583,6 @@ switch lower(data_request)
% $$$ mapping.method = 'tdiliuqe';
% $$$ % mapping.expression = '\results::thomson:psiscatvol:foo';
% $$$ mapping.expression = '\results::thomson:psiscatvol';
case
'mpx'
mapping
.
timedim
=
1
;
mapping
.
gdat_timedim
=
2
;
mapping
.
method
=
'switchcase'
;
case
{
'profnerho'
,
'profterho'
}
mapping
.
timedim
=
1
;
mapping
.
label
=
data_request
;
...
...
This diff is collapsed.
Click to expand it.
matlab/tests/test_requestnames.m
+
22
−
10
View file @
5949e5d9
classdef
(
SharedTestFixtures
=
{
...
check_mds
,
check_gdatpaths
})
...
test_requestnames
<
matlab
.
unittest
.
TestCase
properties
(
Abstract
)
Machine
;
end
properties
(
TestParameter
,
Abstract
)
% parameters that will vary during tests
shot
;
requests_fast
;
% placeholders
requests_slow
;
end
methods
(
Static
)
function
test_gdat_call
(
testCase
,
shot
,
request
)
% actual function to test gdat call
testCase
.
assertTrue
(
isnumeric
(
str2double
(
shot
)));
testCase
.
assertTrue
(
ischar
(
request
));
% gdat call
gdat_call
=
sprintf
([
'gdat_'
lower
(
testCase
.
Machine
)
'(%s,
''
%s
''
)'
],
shot
,
request
);
do_gdat_call
=
1
;
switch
request
case
'eqdsk'
% avoid writing files in /tmp, may not be allowed
gdat_call
=
sprintf
([
'gdat_%s(%s,
''
%s
''
,
''
write
''
,0)'
],
lower
(
testCase
.
Machine
),
shot
,
request
);
case
'radcam'
% need a newer shot for tcv radcam
shot
=
81102
;
gdat_call
=
sprintf
([
'gdat_'
lower
(
testCase
.
Machine
)
'(%s,
''
%s
''
)'
],
shot
,
request
);
end
% logging
fprintf
(
'Testing gdat call: %s\n'
,
gdat_call
);
if
do_gdat_call
gdat_out
=
eval
(
gdat_call
);
%#ok<NASGU>
else
gdat_out
=
struct
([]);
end
% in some future: check for warnings
%gdat_out = verifyWarningFree(testCase,eval(gdat_call),...
% 'Warning issued from gdat call:\n %s\n',gdat_call);
% (add optional sanity checks of gdat_out here)
switch
request
case
'rtc'
% in this case .data is empty, all in .scd_mems
testCase
.
assertTrue
(
isfield
(
gdat_out
,
'scd_mems'
)
&&
isstruct
(
gdat_out
.
scd_mems
));
% testCase.assertTrue(isstruct(gdat_out.scd_mems));
otherwise
testCase
.
assertTrue
(
isnumeric
(
gdat_out
.
data
)
&
numel
(
gdat_out
.
data
)
>
0
);
end
end
end
end
\ No newline at end of file
end
This diff is collapsed.
Click to expand it.
matlab/tests/test_requestnames_tcv.m
+
3
−
3
View file @
5949e5d9
...
...
@@ -11,17 +11,17 @@ classdef (TestTags={'tcv'})test_requestnames_tcv < test_requestnames
requests_fast
=
get_all_gdat_requests
(
'TCV'
,
'fast'
);
requests_slow
=
get_all_gdat_requests
(
'TCV'
,
'slow'
);
end
methods
(
Test
,
TestTags
=
{
'fast'
})
function
test_gdat_call_fast
(
testCase
,
shot
,
requests_fast
)
testCase
.
test_gdat_call
(
testCase
,
shot
,
requests_fast
);
end
end
methods
(
Test
,
TestTags
=
{
'slow'
})
function
test_gdat_call_slow
(
testCase
,
shot
,
requests_slow
)
testCase
.
test_gdat_call
(
testCase
,
shot
,
requests_slow
);
end
end
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