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
2602b83e
Commit
2602b83e
authored
1 month ago
by
Luke Simons
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into 67-add-tcv_get_ids_bolometer-to-tcv_imas-functions
parents
7592dbb8
e49b44f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!171
Resolve "Add tcv_get_ids_bolometer to TCV_IMAS functions"
Pipeline
#255120
passed
1 month 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_soft_x_rays.m
+139
-0
139 additions, 0 deletions
matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m
with
139 additions
and
0 deletions
matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m
0 → 100644
+
139
−
0
View file @
2602b83e
function
[
ids_soft_x_rays
,
ids_soft_x_rays_description
]
=
...
tcv_get_ids_soft_x_rays
(
shot
,
ids_soft_x_rays_empty
,
gdat_params
,
varargin
)
%
% [ids_soft_x_rays,ids_soft_x_rays_description] = ...
% tcv_get_ids_soft_x_rays(shot, ids_soft_x_rays_empty,varargin);
%
% Get the RADCAM Soft X-Ray (SXR) diagnostics data
%
% ids_soft_x_rays_empty should at least be the empty Soft X-Ray ids
% structure in input
%
% gdat_params: gdat_data.gdat_params to get all params passed from original
% call, in particular error_bar options
%
% Date: 20/09/24
% Author: L. Simons
% Initialise structure with default ids_properties
% shot=70777; gdat_params=[]; varargin={};
% aa=gdat([],'ids','source','soft_x_rays');
% ids_soft_x_rays_empty=aa.soft_x_rays;
if
exist
(
'gdat_params'
)
[
ids_soft_x_rays
,
~
]
=
tcv_ids_headpart
(
shot
,
ids_soft_x_rays_empty
,
...
'soft_x_rays'
,
'homogeneous_time'
,
1
,
'gdat_params'
,
gdat_params
,
...
'comment'
,
'RADCAM Soft X-Ray 47um Be filered optodiode AXUV20ELGDS diodes '
,
...
varargin
{:});
else
[
ids_soft_x_rays
,
~
]
=
tcv_ids_headpart
(
shot
,
ids_soft_x_rays_empty
,
...
'soft_x_rays'
,
'homogeneous_time'
,
0
,
...
'comment'
,
'RADCAM Soft X-Ray 47um Be filered optodiode AXUV20ELGDS diodes'
,
...
varargin
{:});
end
ids_soft_x_rays_description
=
struct
();
% Load the soft_x_rays geometry
sxr_geom
=
sxr_load_geometry
();
sxr_data
=
rc_load_diodes
(
shot
,
'diag_name'
,
'sxr'
);
status
=
numel
(
sxr_data
.
data
)
>
0
;
%get gdat version, FIXME: Need to write function
%radcam_repo_version=imas_get_code_version();
if
status
nchannel
=
sum
(
rc_n_chn
(
shot
,
'sxr'
));
ids_soft_x_rays
.
channel
(
1
:
nchannel
)
=
ids_soft_x_rays
.
channel
(
1
);
for
ii
=
1
:
nchannel
ids_soft_x_rays
.
channel
{
ii
}
.
name
=
sxr_geom
.
channel
{
ii
}
.
name
;
ids_soft_x_rays_description
.
channel
{
ii
}
.
name
=
...
[
'RADCAM Soft X-Ray (SXR) detector name, from camera labels and '
...
'number VT: Vertical Top, UL: Upper Lateral, ML: Middle Lateral, '
...
'DIV: Divertor, VB: Vertical bottom. Matches cabling.'
];
ids_soft_x_rays
.
channel
{
ii
}
.
identifier
=
...
sxr_geom
.
channel
{
ii
}
.
identifier
;
ids_soft_x_rays_description
.
channel
{
ii
}
.
identifier
=
...
[
'RADCAM Soft X-Ray (SXR) system, global index from clock-wise '
...
'ordering from inboard side'
];
%ids_soft_x_rays_description.channel{ii}.description = ...
% [sprintf('SXR Diode detector %d, %s Line of Sight %d',ii,,)];
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
geometry_type
=
sxr_geom
.
channel
{
ii
}
.
detector
.
geometry_type
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
centre
.
phi
=
sxr_geom
.
channel
{
ii
}
.
detector
.
centre
.
phi
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
centre
.
r
=
sxr_geom
.
channel
{
ii
}
.
detector
.
centre
.
r
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
centre
.
z
=
sxr_geom
.
channel
{
ii
}
.
detector
.
centre
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x1_unit_vector
.
x
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x1_unit_vector
.
x
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x1_unit_vector
.
y
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x1_unit_vector
.
y
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x1_unit_vector
.
z
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x1_unit_vector
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x2_unit_vector
.
x
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x2_unit_vector
.
x
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x2_unit_vector
.
y
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x2_unit_vector
.
y
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x2_unit_vector
.
z
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x2_unit_vector
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x3_unit_vector
.
x
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x3_unit_vector
.
x
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x3_unit_vector
.
y
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x3_unit_vector
.
y
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x3_unit_vector
.
z
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x3_unit_vector
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x1_width
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x1_width
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
x2_width
=
sxr_geom
.
channel
{
ii
}
.
detector
.
x2_width
;
ids_soft_x_rays
.
channel
{
ii
}
.
detector
.
surface
=
sxr_geom
.
channel
{
ii
}
.
detector
.
surface
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
geometry_type
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
geometry_type
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
centre
.
r
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
centre
.
r
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
centre
.
z
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
centre
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x1_unit_vector
.
x
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x1_unit_vector
.
x
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x1_unit_vector
.
y
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x1_unit_vector
.
y
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x1_unit_vector
.
z
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x1_unit_vector
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x2_unit_vector
.
x
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x2_unit_vector
.
x
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x2_unit_vector
.
y
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x2_unit_vector
.
y
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x2_unit_vector
.
z
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x2_unit_vector
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x3_unit_vector
.
x
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x3_unit_vector
.
x
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x3_unit_vector
.
y
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x3_unit_vector
.
y
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x3_unit_vector
.
z
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x3_unit_vector
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x1_width
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x1_width
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
x2_width
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
x2_width
;
ids_soft_x_rays
.
channel
{
ii
}
.
aperture
{
1
}
.
surface
=
sxr_geom
.
channel
{
ii
}
.
aperture
{
1
}
.
surface
;
ids_soft_x_rays
.
channel
{
ii
}
.
etendue
=
sxr_geom
.
channel
{
ii
}
.
etendue
;
ids_soft_x_rays
.
channel
{
ii
}
.
etendue_method
.
name
=
sxr_geom
.
channel
{
ii
}
.
etendue_method
.
name
;
ids_soft_x_rays
.
channel
{
ii
}
.
etendue_method
.
description
=
sxr_geom
.
channel
{
ii
}
.
etendue_method
.
description
;
ids_soft_x_rays
.
channel
{
ii
}
.
filter_window
{
1
}
.
identifier
=
1
;
ids_soft_x_rays
.
channel
{
ii
}
.
filter_window
{
1
}
.
material
.
name
=
'Be'
;
ids_soft_x_rays
.
channel
{
ii
}
.
filter_window
{
1
}
.
material
.
index
=
10
;
ids_soft_x_rays
.
channel
{
ii
}
.
filter_window
{
1
}
.
material
.
description
=
''
;
ids_soft_x_rays
.
channel
{
ii
}
.
filter_window
{
1
}
.
thickness
=
'47e-6'
;
ids_soft_x_rays
.
channel
{
ii
}
.
line_of_sight
.
first_point
.
phi
=
sxr_geom
.
channel
{
ii
}
.
line_of_sight
.
first_point
.
phi
;
ids_soft_x_rays
.
channel
{
ii
}
.
line_of_sight
.
first_point
.
r
=
sxr_geom
.
channel
{
ii
}
.
line_of_sight
.
first_point
.
r
;
ids_soft_x_rays
.
channel
{
ii
}
.
line_of_sight
.
first_point
.
z
=
sxr_geom
.
channel
{
ii
}
.
line_of_sight
.
first_point
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
line_of_sight
.
second_point
.
phi
=
sxr_geom
.
channel
{
ii
}
.
line_of_sight
.
second_point
.
phi
;
ids_soft_x_rays
.
channel
{
ii
}
.
line_of_sight
.
second_point
.
r
=
sxr_geom
.
channel
{
ii
}
.
line_of_sight
.
second_point
.
r
;
ids_soft_x_rays
.
channel
{
ii
}
.
line_of_sight
.
second_point
.
z
=
sxr_geom
.
channel
{
ii
}
.
line_of_sight
.
second_point
.
z
;
ids_soft_x_rays
.
channel
{
ii
}
.
brightness
.
data
=
sxr_data
.
data
(
ii
,:);
ids_soft_x_rays
.
channel
{
ii
}
.
brightness
.
time
=
sxr_data
.
time
;
ids_soft_x_rays_description
.
channel
{
ii
}
.
brightness
.
data
=
...
[
'From ATLAS::SYSTEM:SXR:CHANNEL_ data, Radiance measured by '
...
'Each SXR diode in arbitrary units of [counts]'
];
ids_soft_x_rays
.
channel
{
ii
}
.
validity
=
0
;
% FIXME: Always valid data
ids_soft_x_rays
.
channel
{
ii
}
.
validity
=
0
*
ones
(
1
,
nchannel
);
ids_soft_x_rays
.
code
.
name
=
'rc_load_diodes'
;
ids_soft_x_rays
.
code
.
description
=
[
'rc_load_diodes, RADCAM gitlab repo, loads'
...
'the signal from the SXR diodes in arbitrary units.'
];
ids_soft_x_rays
.
code
.
commit
=
''
;
ids_soft_x_rays
.
code
.
version
=
''
;
ids_soft_x_rays
.
code
.
repository
=
...
'https://gitlab.epfl.ch/spc/tcv/diag/radcam/'
;
ids_soft_x_rays
.
code
.
parameters
=
'
''
diag_name
''
,
''
sxr
''
'
;
end
ids_soft_x_rays
.
time
=
sxr_data
.
time
;
else
warning
(
'Failed to load data for shot %d'
,
shot
);
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