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
4ae4c0d1
Commit
4ae4c0d1
authored
2 months ago
by
Luke Simons
Browse files
Options
Downloads
Patches
Plain Diff
Revert changes to tcv2ids and adding tcv_get_deploymentinfo.m
parent
490db962
No related branches found
No related tags found
1 merge request
!174
Add tcv get ids soft x rays to tcv imas functions
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
matlab/TCV_IMAS/tcv2ids.m
+0
-19
0 additions, 19 deletions
matlab/TCV_IMAS/tcv2ids.m
matlab/TCV_IMAS/tcv_get_deploymentinfo.m
+0
-64
0 additions, 64 deletions
matlab/TCV_IMAS/tcv_get_deploymentinfo.m
matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m
+6
-7
6 additions, 7 deletions
matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m
with
6 additions
and
90 deletions
matlab/TCV_IMAS/tcv2ids.m
+
0
−
19
View file @
4ae4c0d1
...
...
@@ -117,25 +117,6 @@ for i=1:length(params_tcv2ids.ids_names)
tmp
=
gdat
(
shot
,
gdat_params
);
ids_from_tcv
.
(
ids_to_get
)
=
tmp
.
(
ids_to_get
);
ids_from_tcv
.
([
ids_to_get
'_description'
])
=
tmp
.
([
ids_to_get
'_description'
]);
% Retrieve versioning information from .this-deployment.info
if
~
isempty
(
ids_from_tcv
.
(
ids_to_get
)
.
code
.
name
)
library_gitinfo
=
...
tcv_get_deploymentinfo
(
fullfile
(
fileparts
(
which
(
ids_from_tcv
.
(
ids_to_get
)
.
code
.
name
)),
'.this-deployment.info'
));
ids_from_tcv
.
(
ids_to_get
)
.
code
.
commit
=
library_gitinfo
.
git_commit
;
ids_from_tcv
.
(
ids_to_get
)
.
code
.
version
=
library_gitinfo
.
git_tag
;
ids_from_tcv
.
(
ids_to_get
)
.
code
.
repository
=
library_gitinfo
.
gitlab_project_url
;
end
for
ii
=
1
:
numel
(
ids_from_tcv
.
(
ids_to_get
)
.
code
.
library
)
if
~
isempty
(
ids_from_tcv
.
(
ids_to_get
)
.
code
.
library
{
ii
}
.
name
)
library_gitinfo
=
...
tcv_get_deploymentinfo
(
fullfile
(
fileparts
(
which
(
ids_from_tcv
.
(
ids_to_get
)
.
code
.
library
{
ii
}
.
name
)),
'.this-deployment.info'
));
ids_from_tcv
.
(
ids_to_get
)
.
code
.
library
{
ii
}
.
commit
=
library_gitinfo
.
git_commit
;
ids_from_tcv
.
(
ids_to_get
)
.
code
.
library
{
ii
}
.
version
=
library_gitinfo
.
git_tag
;
ids_from_tcv
.
(
ids_to_get
)
.
code
.
library
{
ii
}
.
repository
=
library_gitinfo
.
gitlab_project_url
;
end
end
end
if
nargout
>=
2
...
...
This diff is collapsed.
Click to expand it.
matlab/TCV_IMAS/tcv_get_deploymentinfo.m
deleted
100644 → 0
+
0
−
64
View file @
490db962
function
info
=
tcv_get_deploymentinfo
(
function_name
)
% Reads a deployment info file and extracts relevant details
% Author: L. Simons
% Date: 07/03/25
%
% Args:
% function_name: String, name of function
%
% Returns:
% info: Struct containing extracted information
% Initialize output struct
info
=
struct
();
info
.
deployment_date
=
''
;
info
.
git_tag
=
''
;
info
.
git_commit
=
''
;
info
.
gitlab_project_url
=
''
;
try
filepath
=
fullfile
(
fileparts
(
which
(
function_name
)),
'.this-deployment.info'
);
info
.
repository
=
fileparts
(
filepath
);
% Check if file exists
if
exist
(
filepath
,
'file'
)
~=
2
error
(
'File does not exist: %s'
,
filepath
);
end
% Open file for reading
fid
=
fopen
(
filepath
,
'r'
);
if
fid
==
-
1
error
(
'Could not open file: %s'
,
filepath
);
end
% Read file line by line
while
~
feof
(
fid
)
line
=
fgetl
(
fid
);
if
ischar
(
line
)
tokens
=
regexp
(
line
,
'^(\w+):\s(.+)$'
,
'tokens'
);
if
~
isempty
(
tokens
)
key
=
tokens
{
1
}{
1
};
value
=
strtrim
(
tokens
{
1
}{
2
});
% Store relevant fields in the struct
switch
key
case
'DEPLOYMENT_DATE'
info
.
deployment_date
=
value
;
case
'GIT_TAG'
info
.
git_tag
=
value
;
case
'GIT_COMMIT'
info
.
git_commit
=
value
;
case
'GIT_TAG_DATE'
info
.
git_tag_date
=
value
;
case
'GITLAB_PROJECT_URL'
info
.
gitlab_project_url
=
value
;
end
end
end
end
% Close the file
fclose
(
fid
);
catch
warning
(
'Failed to read .deployment at filepath: %s'
,
filepath
);
end
end
This diff is collapsed.
Click to expand it.
matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m
+
6
−
7
View file @
4ae4c0d1
...
...
@@ -36,7 +36,6 @@ 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
...
...
@@ -122,13 +121,13 @@ if status
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'
...
ids_
bolometer
.
code
.
name
=
'rc_
gti_prep
'
;
ids_
bolometer
.
code
.
description
=
[
'rc_load_diodes, RADCAM gitlab repo, loads'
...
'the signal from the SXR diodes in arbitrary units.'
];
radcam_gitinfo
=
tcv_get_dep
lo
y
me
ntinfo
(
ids_soft_x_rays
.
code
.
name
)
;
ids_soft_x_rays
.
code
.
commit
=
library_gitinfo
.
git_commit
;
ids_soft_x_rays
.
code
.
version
=
library_gitinfo
.
git_tag
;
ids_soft_x_rays
.
code
.
repository
=
library_gitinfo
.
git_project_url
;
ids_bo
lome
ter
.
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
...
...
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