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
cfadd5d5
Commit
cfadd5d5
authored
7 months ago
by
Olivier Sauter
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into add_gas_fluxes
parents
6f025213
4a9c0788
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!169
add new array of gas traces and add source for rtc request
Pipeline
#218544
passed
6 months ago
Stage: test
Stage: post-test
Changes
1
Pipelines
24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/TCV_IMAS/tcv_get_ids_ec_launchers.m
+30
-37
30 additions, 37 deletions
matlab/TCV_IMAS/tcv_get_ids_ec_launchers.m
with
30 additions
and
37 deletions
matlab/TCV_IMAS/tcv_get_ids_ec_launchers.m
+
30
−
37
View file @
cfadd5d5
...
...
@@ -33,7 +33,7 @@ end
nb_launchers
=
size
(
pow
.
ec
.
data
,
2
)
-
1
;
% at this stage keep same numbering as standard TCV launchers before mid-2019
ids_ec_launchers
.
launcher
(
1
:
nb_launchers
)
=
ids_ec_launchers
.
launcher
(
1
);
% copy empty structure for all units, then fill in
ids_ec_launchers
.
beam
(
1
:
nb_launchers
)
=
ids_ec_launchers
.
beam
(
1
);
% copy empty structure for all units, then fill in
ids_ec_launchers_description
.
comment
=
[
'assume '
num2str
(
nb_launchers
)
' launchers'
];
if
shot
>=
63000
...
...
@@ -48,22 +48,22 @@ end
ids_ec_launchers_description
.
launch_params
=
launch_params
;
for
iant
=
1
:
nb_launchers
ids_ec_launchers
.
launcher
{
iant
}
.
identifier
=
[
'L'
num2str
(
iant
)];
ids_ec_launchers
.
beam
{
iant
}
.
identifier
=
[
'L'
num2str
(
iant
)];
switch
iant
case
{
1
,
4
}
ids_ec_launchers
.
launcher
{
iant
}
.
name
=
'LFS equatorial launcher'
;
ids_ec_launchers
.
beam
{
iant
}
.
name
=
'LFS equatorial launcher'
;
case
{
2
,
3
,
5
,
6
}
ids_ec_launchers
.
launcher
{
iant
}
.
name
=
'LFS top launcher'
;
ids_ec_launchers
.
beam
{
iant
}
.
name
=
'LFS top launcher'
;
otherwise
ids_ec_launchers
.
launcher
{
iant
}
.
name
=
'TOP launcher'
;
ids_ec_launchers
.
beam
{
iant
}
.
name
=
'TOP launcher'
;
end
if
any
(
isfinite
(
pow
.
ec
.
data
(:,
iant
)))
ids_ec_launchers
.
launcher
{
iant
}
.
power_launched
.
data
=
pow
.
ec
.
data
(:,
iant
);
ids_ec_launchers
.
launcher
{
iant
}
.
power_launched
.
time
=
pow
.
ec
.
t
;
ids_ec_launchers_description
.
launcher
{
iant
}
.
power_launched
=
'from gdat powers .ec'
;
ids_ec_launchers_description
.
launcher
{
iant
}
.
launching_position
=
'from launch_params obtained from toray_raygeom_TCV'
;
ids_ec_launchers
.
beam
{
iant
}
.
power_launched
.
data
=
pow
.
ec
.
data
(:,
iant
);
ids_ec_launchers
.
beam
{
iant
}
.
power_launched
.
time
=
pow
.
ec
.
t
;
ids_ec_launchers_description
.
beam
{
iant
}
.
power_launched
=
'from gdat powers .ec'
;
ids_ec_launchers_description
.
beam
{
iant
}
.
launching_position
=
'from launch_params obtained from toray_raygeom_TCV'
;
else
ids_ec_launchers_description
.
launcher
{
iant
}
.
power_launched
=
'no power for this launcher from gdat powers .ec'
;
ids_ec_launchers_description
.
beam
{
iant
}
.
power_launched
=
'no power for this launcher from gdat powers .ec'
;
end
if
length
(
launch_params
)
>=
iant
&&
~
isempty
(
launch_params
{
iant
})
% find 1st non-empty data
...
...
@@ -74,48 +74,41 @@ for iant=1:nb_launchers
end
end
% non time-dependent quantities, take 1st ok values
ids_ec_launchers
.
launcher
{
iant
}
.
frequency
.
time
=
[
pow
.
ec
.
t
(
1
)
pow
.
ec
.
t
(
end
)];
ids_ec_launchers
.
launcher
{
iant
}
.
frequency
.
data
=
[
launch_params
{
iant
}{
it_ok
{
iant
}(
1
)}
.
freq
launch_params
{
iant
}{
it_ok
{
iant
}(
end
)}
.
freq
];
ids_ec_launchers
.
launcher
{
iant
}
.
mode
.
time
=
[
pow
.
ec
.
t
(
1
)
pow
.
ec
.
t
(
end
)];
ids_ec_launchers
.
launcher
{
iant
}
.
mode
.
data
=
[
-
1
-
1
];
% at this stage assume X mode always, to change when available
ids_ec_launchers
.
beam
{
iant
}
.
frequency
.
time
=
[
pow
.
ec
.
t
(
1
)
pow
.
ec
.
t
(
end
)];
ids_ec_launchers
.
beam
{
iant
}
.
frequency
.
data
=
[
launch_params
{
iant
}{
it_ok
{
iant
}(
1
)}
.
freq
launch_params
{
iant
}{
it_ok
{
iant
}(
end
)}
.
freq
];
% ids_ec_launchers.beam{iant}.mode.time = [pow.ec.t(1) pow.ec.t(end)];
% ids_ec_launchers.beam{iant}.mode.data = [-1 -1]; % at this stage assume X mode always, to change when available
% ids_ec_launchers.beam{iant}.time = [pow.ec.t(1) pow.ec.t(end)];
ids_ec_launchers
.
beam
{
iant
}
.
mode
=
-
1
;
% at this stage assume X mode always, to change when available
for
i
=
1
:
length
(
it_ok
{
iant
})
r0
=
sqrt
(
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
x0
.^
2
+
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
y0
.^
2
)
/
100.
;
% in [m]
time_launch
=
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
time
;
ids_ec_launchers
.
launcher
{
iant
}
.
launching_position
.
r
(
i
)
=
r0
;
ids_ec_launchers
.
launcher
{
iant
}
.
launching_position
.
z
(
i
)
=
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
z0
/
100.
;
ids_ec_launchers
.
launcher
{
iant
}
.
launching_position
.
phi
(
i
)
=
atan2
(
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
y0
/
100
,
r0
);
ids_ec_launchers
.
launcher
{
iant
}
.
launching_position
.
time
(
i
)
=
time_launch
;
ids_ec_launchers
.
beam
{
iant
}
.
launching_position
.
r
(
i
)
=
r0
;
ids_ec_launchers
.
beam
{
iant
}
.
launching_position
.
z
(
i
)
=
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
z0
/
100.
;
ids_ec_launchers
.
beam
{
iant
}
.
launching_position
.
phi
(
i
)
=
atan2
(
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
y0
/
100
,
r0
);
ids_ec_launchers
.
beam
{
iant
}
.
time
(
i
)
=
time_launch
;
kz
=
cos
(
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
theta_toray
*
pi
/
180.
);
kmr
=
-
sin
(
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
theta_toray
*
pi
/
180.
)
.*
cos
(
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
phi_toray
*
pi
/
180.
);
kphi
=
sin
(
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
theta_toray
*
pi
/
180.
)
.*
sin
(
launch_params
{
iant
}{
it_ok
{
iant
}(
i
)}
.
phi_toray
*
pi
/
180.
);
%*sigma_Rphiz (=+1 for TCV cocos=17)
if
(
kz
==
0
&&
kmr
==
0
)
ids_ec_launchers
.
launcher
{
iant
}
.
steering_angle_pol
.
data
(
i
)
=
0.
;
ids_ec_launchers
.
beam
{
iant
}
.
steering_angle_pol
(
i
)
=
0.
;
else
ids_ec_launchers
.
launcher
{
iant
}
.
steering_angle_pol
.
data
(
i
)
=
atan2
(
-
kz
,
kmr
);
ids_ec_launchers
.
beam
{
iant
}
.
steering_angle_pol
(
i
)
=
atan2
(
-
kz
,
kmr
);
end
ids_ec_launchers
.
launcher
{
iant
}
.
steering_angle_pol
.
time
(
i
)
=
time_launch
;
ids_ec_launchers
.
launcher
{
iant
}
.
steering_angle_tor
.
data
(
i
)
=
asin
(
kphi
);
ids_ec_launchers
.
launcher
{
iant
}
.
steering_angle_tor
.
time
(
i
)
=
time_launch
;
% $$$ ids_ec_launchers.launcher{iant}.beam.spot.size.data(i,1) = 0.023;
% $$$ ids_ec_launchers.launcher{iant}.beam.spot.size.data(i,2) = 0.012;
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
spot
.
size
.
data
(
1
,
i
)
=
0.023
;
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
spot
.
size
.
data
(
2
,
i
)
=
0.012
;
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
spot
.
size
.
time
(
i
)
=
time_launch
;
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
spot
.
angle
.
data
(
i
)
=
0.0
;
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
spot
.
angle
.
time
(
i
)
=
time_launch
;
% $$$ ids_ec_launchers.launcher{iant}.beam.phase.curvature.data(i,1) = 1./1.88;
% $$$ ids_ec_launchers.launcher{iant}.beam.phase.curvature.data(i,2) = 1./-0.95; % negative in launch_params...
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
phase
.
curvature
.
data
(
1
,
i
)
=
1.
/
1.88
;
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
phase
.
curvature
.
data
(
2
,
i
)
=
1.
/
-
0.95
;
% negative in launch_params...
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
phase
.
angle
.
data
(
i
)
=
0.0
;
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
phase
.
angle
.
time
(
i
)
=
time_launch
;
ids_ec_launchers
.
launcher
{
iant
}
.
beam
.
phase
.
curvature
.
time
(
i
)
=
time_launch
;
ids_ec_launchers
.
beam
{
iant
}
.
steering_angle_tor
(
i
)
=
asin
(
kphi
);
ids_ec_launchers
.
beam
{
iant
}
.
spot
.
size
(
1
,
i
)
=
0.023
;
ids_ec_launchers
.
beam
{
iant
}
.
spot
.
size
(
2
,
i
)
=
0.012
;
ids_ec_launchers
.
beam
{
iant
}
.
spot
.
angle
(
i
)
=
0.0
;
ids_ec_launchers
.
beam
{
iant
}
.
phase
.
curvature
(
1
,
i
)
=
1.
/
1.88
;
ids_ec_launchers
.
beam
{
iant
}
.
phase
.
curvature
(
2
,
i
)
=
1.
/
-
0.95
;
% negative in launch_params...
ids_ec_launchers
.
beam
{
iant
}
.
phase
.
angle
(
i
)
=
0.0
;
end
end
end
% cocos automatic transform
if
exist
(
'ids_generic_cocos_nodes_transformation_symbolic'
)
==
2
[
ids_ec_launchers
,
cocoscoeff
]
=
ids_generic_cocos_nodes_transformation_symbolic
(
ids_ec_launchers
,
'ec_launchers'
,
gdat_params
.
cocos_in
,
...
gdat_params
.
cocos_out
,
gdat_params
.
ipsign_out
,
gdat_params
.
b0sign_out
,
gdat_params
.
ipsign_in
,
gdat_params
.
b0sign_in
,
...
gdat_params
.
error_bar
,
gdat_params
.
nverbose
);
...
...
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