Skip to content
Snippets Groups Projects
Commit fb0df26a authored by Olivier Sauter's avatar Olivier Sauter
Browse files

start adding tcv_get_ids_summary, add global tokamak_agnostic ids_summary_disruption.m at top

to be modified by Alessandro
parent 1ecd9159
No related branches found
No related tags found
1 merge request!58Add ids summary
Pipeline #39640 passed with stage
in 1 minute and 22 seconds
This diff is collapsed.
......@@ -53,25 +53,7 @@ ids_generic = ids_in;
% ids_properties
%
subcall='';
% $$$ if nargin>=5 && ~isempty(varargin)
% $$$ for i=1:length(varargin)
% $$$ if ~isempty(varargin{i})
% $$$ if ischar(varargin{i})
% $$$ subcall_add = [',' varargin{i}];
% $$$ elseif isnumeric(varargin{i})
% $$$ subcall_add = [',' num2str(varargin{i})];
% $$$ elseif isstruct(varargin{i})
% $$$ subcall_add = [',' 'struct_in'];
% $$$ elseif iscell(varargin{i})
% $$$ subcall_add = [',' 'cell_in'];
% $$$ end
% $$$ else
% $$$ subcall_add = [',[]'];
% $$$ end
% $$$ subcall(end+1:end+length(subcall_add)) = subcall_add;
% $$$ end
% $$$ subcall(end+1:end+2) = '; ';
% $$$ end
ids_generic.ids_properties.comment = params_ids_generic.comment;
if ~isempty(subcall)
add_to_comment = ['varargin: ' subcall];
......@@ -82,7 +64,13 @@ if ~isempty(subcall)
end
end
ids_generic.ids_properties.provider = ['tcv_get_ids_' ids_name];
%get gdat version
[abcpath,abcfile,abcext]=fileparts(mfilename('fullpath'));
[aa1,aa2]=unix(['cd ' abcpath '; git describe --tags --first-parent --abbrev=11 --long --dirty --always']);
git_release_hash='gdat git hash not found';
if aa1==0; git_release_hash = aa2(1:end-1); end % avoid newline
ids_generic.ids_properties.provider = ['gdat_git: ' git_release_hash '; tcv_get_ids_' ids_name];
if ~isempty(params_ids_generic.gdat_params)
if isfield(params_ids_generic.gdat_params,'cocos_in') && isfield(params_ids_generic.gdat_params,'cocos_out')
comment_add = ['from TCV cocos_in=' num2str(params_ids_generic.gdat_params.cocos_in) ' transformed to cocos_out=' num2str(params_ids_generic.gdat_params.cocos_out)];
......
function [ids_summary_out,ids_summary_out_description] = ids_summary_disruption(shot, ids_summary_in, gdat_params, varargin)
%
% [ids_summary_out,ids_summary_out_description] = tcv_ids_ip(shot, ids_summary_in, gdat_params, varargin);
%
% fill in subnode "disruption" expected by ids_summary, for machine gdat_params.machine
%
% error_bar: from gdat_params.error_bar
% 'delta' (default): error_bar to be added inserted in "upper" only as mentioned in description
% 'delta_with_lower' : error_bar (abs) inserted in both lower and upper
% 'added': value already added to data: upper/lower = data +/- error_bar
%
error_bar = 'delta';
if exist('gdat_params','var') && isfield(gdat_params,'error_bar') && ~isempty(gdat_params.error_bar)
error_bar = gdat_params.error_bar;
end
params_eff_ref = gdat_params; params_eff_ref.doplot=0;
try params_eff_ref=rmfield(params_eff_ref,'source');catch;end % make sure no source (from ids def)
% Get data
switch lower(params_eff_ref.machine)
case 'tcv'
otherwise
end
% Preallocate dimension
ids_summary_out = ids_summary_in;
ids_summary_out_description.disruption.time = 'time of disruption obtained from...to fill in description per subnode';
% Put data into ids structure
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment