diff --git a/crpptbx_new/AUG/gdat_aug.m b/crpptbx_new/AUG/gdat_aug.m index 228b8fd9294fed7da6f058c694eaac1048ecf27a..f070e344b769bc1899c876c9521ebcf19883fdd3 100644 --- a/crpptbx_new/AUG/gdat_aug.m +++ b/crpptbx_new/AUG/gdat_aug.m @@ -201,7 +201,13 @@ data_request_eff = gdat_params.data_request; % in case was defined in pairs % if it is a request_keyword copy it: ij=strmatch(data_request_eff,data_request_names_all,'exact'); -if ~isempty(ij); gdat_data.gdat_request = data_request_names_all{ij}; end +if ~isempty(ij); + gdat_data.gdat_request = data_request_names_all{ij}; + if isfield(data_request_names.all.(data_request_names_all{ij}),'description') && ~isempty(data_request_names.all.(data_request_names_all{ij}).description) + % copy description of keyword + gdat_data.request_description = data_request_names.all.(data_request_names_all{ij}).description; + end +end % special treatment if shot and data_request given within pairs if isfield(gdat_params,'shot') diff --git a/crpptbx_new/TCV/gdat_tcv.m b/crpptbx_new/TCV/gdat_tcv.m index fdec0bcea92e492b2e13219f9312fa2f416eb905..44155bf37c046e692e0a457b31dfe884858f7607 100644 --- a/crpptbx_new/TCV/gdat_tcv.m +++ b/crpptbx_new/TCV/gdat_tcv.m @@ -200,7 +200,13 @@ data_request_eff = gdat_params.data_request; % in case was defined in pairs % if it is a request_keyword copy it: ij=strmatch(data_request_eff,data_request_names_all,'exact'); -if ~isempty(ij); gdat_data.gdat_request = data_request_names_all{ij}; end +if ~isempty(ij); + gdat_data.gdat_request = data_request_names_all{ij}; + if isfield(data_request_names.all.(data_request_names_all{ij}),'description') && ~isempty(data_request_names.all.(data_request_names_all{ij}).description) + % copy description of keyword + gdat_data.request_description = data_request_names.all.(data_request_names_all{ij}).description; + end +end % special treatment if shot and data_request given within pairs if isfield(gdat_params,'shot') diff --git a/crpptbx_new/gdat.m b/crpptbx_new/gdat.m index 5ec4e3634ed2d7212e326585e3d33a68d0cce7ba..5b4804f92047887a358ae9e08a254817341d9e6c 100644 --- a/crpptbx_new/gdat.m +++ b/crpptbx_new/gdat.m @@ -100,7 +100,7 @@ if nargin>=2 % need at least 2 inputs to have 'machine','aug' as arguments (to a machine_eff = shot.machine; elseif isstruct(data_request) && isfield(data_request,'machine') machine_eff = data_request.machine; - else + elseif nargin>=3 imachine=[]; for i=1:length(varargin_eff) if ischar(varargin_eff{i})