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
46466c28
Commit
46466c28
authored
5 years ago
by
Olivier Sauter
Browse files
Options
Downloads
Patches
Plain Diff
fix when no EC or no NBI
parent
837312fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!21
fix when no EC or no NBI
Pipeline
#19545
passed
5 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/TCV_IMAS/tcv_get_ids_ec_antennas.m
+10
-3
10 additions, 3 deletions
matlab/TCV_IMAS/tcv_get_ids_ec_antennas.m
matlab/TCV_IMAS/tcv_get_ids_nbi.m
+8
-3
8 additions, 3 deletions
matlab/TCV_IMAS/tcv_get_ids_nbi.m
with
18 additions
and
6 deletions
matlab/TCV_IMAS/tcv_get_ids_ec_antennas.m
+
10
−
3
View file @
46466c28
...
...
@@ -15,14 +15,21 @@ function [ids_ec_antennas,ids_ec_antennas_description,varargout] = tcv_get_ids_e
pow
=
gdat_tcv
(
shot
,
'powers'
);
if
shot
>=
6300
0
warning
(
'not sure if set-up correct for new launchers, beams, gyrotrons. Check with O. Saut
er'
)
if
isempty
(
pow
.
ec
.
t
)
||
isempty
(
pow
.
ec
.
data
)
||
max
(
pow
.
ec
.
data
(:,
end
))
<
1e-1
0
ids_ec_antennas_description
.
comment
=
'no pow
er'
;
return
end
nb_antennas
=
9
;
% at this stage keep same numbering as standard TCV launchers before mid-2019
nb_antennas
=
size
(
pow
.
ec
.
data
,
2
)
-
1
;
% at this stage keep same numbering as standard TCV launchers before mid-2019
ids_ec_antennas
.
antenna
(
1
:
nb_antennas
)
=
ids_ec_antennas
.
antenna
(
1
);
% copy empty structure for all units, then fill in
ids_ec_antennas_description
.
comment
=
[
'assume '
num2str
(
nb_antennas
)
' launchers'
];
if
shot
>=
63000
warning
(
'not sure if set-up correct for new launchers, beams, gyrotrons. Check with O. Sauter'
)
% return
end
% $$$ ids_ec_antennas.time = pow.ec.t; if homogeneous time
% $$$ ids_ec_antennas_description.time = 'time from power';
[
r_phi0
,
z_phi0
,
r1
,
z1
,
rc
,
zc
,
thetphi_L
,
thetphi_tor
,
raysbylauncher
,
powers
,
fname
,
z_axis
,
launch_params
]
=
...
...
...
This diff is collapsed.
Click to expand it.
matlab/TCV_IMAS/tcv_get_ids_nbi.m
+
8
−
3
View file @
46466c28
...
...
@@ -72,11 +72,16 @@ for iunit=1:nb_units
ids_nbi_description
.
unit
{
iunit
}
.
energy
=
[
'from \results::'
results_subname
{
iunit
}
':energy'
];
%% power & current fractions
p_frac
=
gdat
(
shot
,[
'\results::'
results_subname
{
iunit
}
':fraction'
]);
ids_nbi
.
unit
{
iunit
}
.
beam_power_fraction
.
data
=
p_frac
.
data
(:,
1
:
3
)
*
0.01
;
ids_nbi
.
unit
{
iunit
}
.
beam_power_fraction
.
time
=
p_frac
.
t
;
ids_nbi_description
.
unit
{
iunit
}
.
beam_power_fraction
=
[
'from \results::'
results_subname
{
iunit
}
':fraction'
];
i_frac
=
p_frac
.
data
(:,
1
:
3
)
.*
repmat
([
1
2
3
],
size
(
p_frac
.
data
,
1
),
1
);
% to be compatible with older matlab version .*[1 2 3] not ok
i_frac
=
i_frac
.*
1.
/
repmat
(
sum
(
i_frac
),
size
(
p_frac
.
data
,
1
),
1
);
if
~
isempty
(
p_frac
.
data
)
&&
size
(
p_frac
.
data
,
2
)
>=
3
ids_nbi
.
unit
{
iunit
}
.
beam_power_fraction
.
data
=
p_frac
.
data
(:,
1
:
3
)
*
0.01
;
i_frac
=
p_frac
.
data
(:,
1
:
3
)
.*
repmat
([
1
2
3
],
size
(
p_frac
.
data
,
1
),
1
);
% to be compatible with older matlab version .*[1 2 3] not ok
i_frac
=
i_frac
.*
1.
/
repmat
(
sum
(
i_frac
),
size
(
p_frac
.
data
,
1
),
1
);
else
ids_nbi
.
unit
{
iunit
}
.
beam_power_fraction
.
data
=
p_frac
.
data
;
i_frac
=
p_frac
.
data
;
end
ids_nbi
.
unit
{
iunit
}
.
beam_current_fraction
.
data
=
i_frac
;
ids_nbi
.
unit
{
iunit
}
.
beam_current_fraction
.
time
=
p_frac
.
t
;
%% species
...
...
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