diff --git a/matlab/TCV_IMAS/tcv2ids.m b/matlab/TCV_IMAS/tcv2ids.m index 312cb4bc04e85f2f8b17efb95ded310f19b8234d..2e25496b8219786efeb583ae58e00be9d5a4eaaa 100644 --- a/matlab/TCV_IMAS/tcv2ids.m +++ b/matlab/TCV_IMAS/tcv2ids.m @@ -117,6 +117,17 @@ 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 + + for ii = 1:numel(ids_from_tcv.code.library) + library_gitinfo= ... + tcv_get_deploymentinfo(fullfile(fileparts(which(ids_from_tcv_.code.library{ii}.name)),'.this-deployment.info')); + ids_bolometer.code.library{ii}.commit = library_gitinfo.git_commit; + ids_bolometer.code.library{ii}.version = library_gitinfo.git_tag; + ids_bolometer.code.library{ii}.repository =library_gitinfo.gitlab_project_url; + end + end if nargout>=2 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 34cea3ec54bd171914db2dcea8c346fec8e02652..b9fd4b30ca45c31ba8ad42a6cdc6727d5cc8fdfa 100644 --- a/matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m +++ b/matlab/TCV_IMAS/tcv_get_ids_soft_x_rays.m @@ -36,6 +36,7 @@ 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 @@ -121,13 +122,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_bolometer.code.name = 'rc_gti_prep'; - ids_bolometer.code.description = ['rc_load_diodes, RADCAM gitlab repo, loads' ... + 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_bolometer.code.commit=''; - ids_soft_x_rays.code.version=''; - ids_soft_x_rays.code.repository= ... - 'https://gitlab.epfl.ch/spc/tcv/diag/radcam/'; + radcam_gitinfo = tcv_get_deploymentinfo(fullfile(fileparts(which(ids_soft_x_rays.code.name)),'.this-deployment.info')); + 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_soft_x_rays.code.parameters='''diag_name'',''sxr'''; end