diff --git a/matlab/TCV_IMAS/tcv2ids.m b/matlab/TCV_IMAS/tcv2ids.m index 3715a8a1162c965270b3c7ee6a2f1df9e48f146d..312cb4bc04e85f2f8b17efb95ded310f19b8234d 100644 --- a/matlab/TCV_IMAS/tcv2ids.m +++ b/matlab/TCV_IMAS/tcv2ids.m @@ -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 diff --git a/matlab/TCV_IMAS/tcv_get_deploymentinfo.m b/matlab/TCV_IMAS/tcv_get_deploymentinfo.m deleted file mode 100644 index 2ef00f1ba402dc80fcb62647fe59de2a31bcdf2c..0000000000000000000000000000000000000000 --- a/matlab/TCV_IMAS/tcv_get_deploymentinfo.m +++ /dev/null @@ -1,64 +0,0 @@ -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 diff --git a/matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m b/matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m index 5cdf1cf9f51bda3c284b27696ab033dfcf4a025d..34cea3ec54bd171914db2dcea8c346fec8e02652 100644 --- a/matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m +++ b/matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m @@ -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_deploymentinfo(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_bolometer.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