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
31677670
Commit
31677670
authored
5 years ago
by
Olivier Sauter
Browse files
Options
Downloads
Patches
Plain Diff
replace ids_gen with gdat([],'ids','source','xx')
parent
05909c14
No related branches found
No related tags found
1 merge request
!45
Fix ids gen
Pipeline
#31503
passed
5 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/IMAS/complete_IDS_CORSICA.m
+11
-10
11 additions, 10 deletions
matlab/IMAS/complete_IDS_CORSICA.m
with
11 additions
and
10 deletions
matlab/IMAS/complete_IDS_CORSICA.m
+
11
−
10
View file @
31677670
function
IDS_out
=
complete_IDS_CORSICA
(
IDS_in
,
varargin
)
function
IDS_out
=
complete_IDS_CORSICA
(
IDS_in
,
varargin
)
%
%
%
%
%
%
doread
=
0
;
doread
=
0
;
dosave
=
0
;
dosave
=
0
;
...
@@ -14,9 +14,9 @@ if doread
...
@@ -14,9 +14,9 @@ if doread
data_path_in
=
'/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130510.mat'
;
data_path_in
=
'/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130510.mat'
;
%path_IDS = '/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130506.mat';
%path_IDS = '/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130506.mat';
data_path_out
=
'/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130510_extended_COCOS17.mat'
;
data_path_out
=
'/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130510_extended_COCOS17.mat'
;
% Load the IDS_in file
% Load the IDS_in file
IDS_out
=
load
(
data_path_in
);
IDS_out
=
load
(
data_path_in
);
else
else
...
@@ -26,9 +26,9 @@ end
...
@@ -26,9 +26,9 @@ end
%% Correct COCOS convention on original data
%% Correct COCOS convention on original data
% Put homogenous = 0 on magnetic but 1 on the coils.
% Put homogenous = 0 on magnetic but 1 on the coils.
% Sign of the angle of the magnetic probes.
% Sign of the angle of the magnetic probes.
%%
%%
G
=
G_ITER_generator
;
G
=
G_ITER_generator
;
% Get the structure from generating files
% Get the structure from generating files
...
@@ -51,8 +51,8 @@ for ii = 1:numel(tmp.names)
...
@@ -51,8 +51,8 @@ for ii = 1:numel(tmp.names)
IDS_out
.
pf_active
.
coil
{
jj
}
.
name
=
regexprep
(
IDS_out
.
pf_active
.
coil
{
jj
}
.
name
,
'[\n\r]+'
,
''
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
name
=
regexprep
(
IDS_out
.
pf_active
.
coil
{
jj
}
.
name
,
'[\n\r]+'
,
''
);
if
strcmp
(
tmp
.
names
{
ii
},
IDS_out
.
pf_active
.
coil
{
jj
}
.
name
)
if
strcmp
(
tmp
.
names
{
ii
},
IDS_out
.
pf_active
.
coil
{
jj
}
.
name
)
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
geometry_type
=
2
;
% Rectangle description
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
geometry_type
=
2
;
% Rectangle description
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
rectangle
.
r
=
tmp
.
R
(
ii
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
rectangle
.
r
=
tmp
.
R
(
ii
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
rectangle
.
z
=
tmp
.
Z
(
ii
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
rectangle
.
z
=
tmp
.
Z
(
ii
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
rectangle
.
width
=
tmp
.
dR
(
ii
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
rectangle
.
width
=
tmp
.
dR
(
ii
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
rectangle
.
height
=
tmp
.
dZ
(
ii
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
geometry
.
rectangle
.
height
=
tmp
.
dZ
(
ii
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
turns_with_sign
=
tmp
.
N
(
ii
);
IDS_out
.
pf_active
.
coil
{
jj
}
.
element
{
1
}
.
turns_with_sign
=
tmp
.
N
(
ii
);
...
@@ -98,11 +98,12 @@ IDS_out.wall.description_2d{1}.limiter.unit{1}.outline.z = tmp.z;
...
@@ -98,11 +98,12 @@ IDS_out.wall.description_2d{1}.limiter.unit{1}.outline.z = tmp.z;
%% -------------- Synthetic diagnostics------------ Need to be recomputed from CORSICA flux map
%% -------------- Synthetic diagnostics------------ Need to be recomputed from CORSICA flux map
IDS_out
.
magnetics
.
method
{
1
}
.
ip
.
time
=
LXC
.
t
;
IDS_out
.
magnetics
.
method
{
1
}
.
ip
.
time
=
LXC
.
t
;
IDS_out
.
magnetics
.
method
{
1
}
.
ip
.
data
=
LXC
.
Ip
;
IDS_out
.
magnetics
.
method
{
1
}
.
ip
.
data
=
LXC
.
Ip
;
% Correct IDS magnetics
% Correct IDS magnetics
magnetics_default
=
ids_gen
(
'magnetics'
);
aa
=
gdat
([],
'ids'
,
'source'
,
'magnetics'
);
magnetics_default
=
aa
.
magnetics
;
mag_fluxloop_def_fields
=
fieldnames
(
magnetics_default
.
flux_loop
{
1
});
mag_fluxloop_def_fields
=
fieldnames
(
magnetics_default
.
flux_loop
{
1
});
if
isfield
(
IDS_out
.
magnetics
,
'flux_loop'
)
&&
length
(
IDS_out
.
magnetics
.
flux_loop
)
>
0
if
isfield
(
IDS_out
.
magnetics
,
'flux_loop'
)
&&
length
(
IDS_out
.
magnetics
.
flux_loop
)
>
0
mag_fluxloop_fields
=
fieldnames
(
IDS_out
.
magnetics
.
flux_loop
{
1
});
mag_fluxloop_fields
=
fieldnames
(
IDS_out
.
magnetics
.
flux_loop
{
1
});
...
@@ -176,7 +177,7 @@ for ii=1:numel(tmp.name)
...
@@ -176,7 +177,7 @@ for ii=1:numel(tmp.name)
IDS_out
.
magnetics
.
bpol_probe
{
ii
}
.
field
.
time
=
LXC
.
t
;
IDS_out
.
magnetics
.
bpol_probe
{
ii
}
.
field
.
time
=
LXC
.
t
;
end
end
%% Ft
%% Ft
mag_method_def_fields
=
fieldnames
(
magnetics_default
.
method
{
1
});
mag_method_def_fields
=
fieldnames
(
magnetics_default
.
method
{
1
});
if
isfield
(
IDS_out
.
magnetics
,
'method'
)
&&
length
(
IDS_out
.
magnetics
.
method
)
>
0
if
isfield
(
IDS_out
.
magnetics
,
'method'
)
&&
length
(
IDS_out
.
magnetics
.
method
)
>
0
mag_method_fields
=
fieldnames
(
IDS_out
.
magnetics
.
method
{
1
});
mag_method_fields
=
fieldnames
(
IDS_out
.
magnetics
.
method
{
1
});
...
...
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