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
434965a5
Commit
434965a5
authored
1 year ago
by
Antonia Frank
Browse files
Options
Downloads
Patches
Plain Diff
Add line averaged density to IDS summary
parent
cf9cfe45
No related branches found
No related tags found
1 merge request
!137
Add quantities to ids for MRE
Pipeline
#182222
canceled
1 year ago
Stage: test
Stage: post-test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/TCV_IMAS/tcv_get_ids_summary.m
+29
-4
29 additions, 4 deletions
matlab/TCV_IMAS/tcv_get_ids_summary.m
with
29 additions
and
4 deletions
matlab/TCV_IMAS/tcv_get_ids_summary.m
+
29
−
4
View file @
434965a5
...
...
@@ -36,6 +36,7 @@ ids_summary.code.name = 'gdat';
ids_summary
.
code
.
version
=
git_release_hash
;
ids_summary
.
code
.
repository
=
git_url
;
%% boundary
% use equilibrium time as reference, so load first elongation(time)
params_eff
=
params_eff_ref
;
...
...
@@ -59,7 +60,6 @@ ids_summary.time = unique([t_before; [kappa.t(1):max((kappa.t(end)-kappa.t(1))/(
ids_summary_description
.
time
=
'time from gdat(shot,
''
kappa
''
) and adding from 0 up to t(ip_trapeze(end))'
;
params_eff
=
params_eff_ref
;
% boundary:
boundary
.
elongation
=
kappa
;
boundary_desc
.
elongation
=
kappa
.
gdat_params
.
data_request
;
params_eff
.
data_request
=
'r_geom'
;
...
...
@@ -121,13 +121,13 @@ if ~isempty(special_fields)
% $$$ end
end
% disruption, use specific function
%
% disruption, use specific function
% to be decided if changes only ids_summary_out.disruption or also elsewhere..., if ids_summary_out.time is changed,
% then all the other data should be related, thus call this first?
[
ids_summary_out
,
ids_summary_out_description
]
=
ids_summary_disruption
(
shot
,
ids_summary
,
gdat_params
);
% gas: bottom/top?, deuterium, helium_xx, ?
%
% gas: bottom/top?, deuterium, helium_xx, ?
params_eff
.
data_request
=
'gas_flux'
;
gas_injection_rates
.
deuterium
=
gdat
(
params_summary
.
shot
,
params_eff
);
gas_injection_rates_desc
.
deuterium
=
params_eff
.
data_request
;
...
...
@@ -148,7 +148,8 @@ for i=1:numel(gas_injection_rates_fieldnames)
end
end
%params_eff.doplot=1;
% global_quantities:
%% global_quantities
params_eff
.
data_request
=
'b0'
;
global_quantities
.
b0
=
gdat
(
params_summary
.
shot
,
params_eff
);
% do not add 'source','liuqe' to get all times
global_quantities_desc
.
b0
=
[
params_eff
.
data_request
' ; '
global_quantities
.
b0
.
data_fullpath
];
...
...
@@ -263,6 +264,7 @@ end
ids_summary
.
global_quantities
.
r0
.
value
=
global_quantities
.
r0
.
data
;
ids_summary
.
global_quantities
.
r0
.
source
=
[
'gdat request: '
global_quantities_desc
.
r0
];
%% volume average
% cst zeff
params_eff
.
data_request
=
'\tcv_shot::top.results.ibs:z_eff'
;
volume_average
.
zeff
=
gdat
(
params_summary
.
shot
,
params_eff
);
...
...
@@ -283,6 +285,29 @@ for i=1:numel(volume_average_fieldnames)
end
end
%% line average
params_eff
.
data_request
=
'nel'
;
line_average
.
n_e
=
gdat
(
params_summary
.
shot
,
params_eff
);
line_average_desc
.
n_e
=
[
params_eff
.
data_request
' ; '
volume_average
.
zeff
.
data_fullpath
' (not vol avrg but to match Iohm)'
];
special_fields
=
{};
% fields needing non-automatic treatments
line_average_fieldnames
=
fieldnames
(
line_average
);
for
i
=
1
:
numel
(
line_average_fieldnames
)
if
~
any
(
strcmp
(
line_average_fieldnames
{
i
},
special_fields
))
if
~
isstruct
(
ids_summary
.
line_average
.
(
line_average_fieldnames
{
i
})
.
value
)
ids_summary
.
line_average
.
(
line_average_fieldnames
{
i
})
.
value
=
interp1
(
...
line_average
.
(
line_average_fieldnames
{
i
})
.
t
,
line_average
.
(
line_average_fieldnames
{
i
})
.
data
,
...
ids_summary
.
time
,
'linear'
,
NaN
);
ids_summary
.
line_average
.
(
line_average_fieldnames
{
i
})
.
source
=
[
'gdat request: '
line_average_desc
.
(
line_average_fieldnames
{
i
})];
else
special_fields
{
end
+
1
}
=
line_average_fieldnames
{
i
};
end
end
end
%%
% cocos automatic transform
if
~
isempty
(
which
(
'ids_generic_cocos_nodes_transformation_symbolic'
))
[
ids_summary
,
cocoscoeff
]
=
ids_generic_cocos_nodes_transformation_symbolic
(
ids_summary
,
'summary'
,
gdat_params
.
cocos_in
,
...
...
...
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