diff --git a/crpptbx/TCV_IMAS/tcv_get_ids_magnetics.m b/crpptbx/TCV_IMAS/tcv_get_ids_magnetics.m index 9a8720afa89e0c63ba4ec2e495d61ed170a3a20f..883da13a52dd7ce873130099d1850a7f03a16fa6 100644 --- a/crpptbx/TCV_IMAS/tcv_get_ids_magnetics.m +++ b/crpptbx/TCV_IMAS/tcv_get_ids_magnetics.m @@ -3,11 +3,11 @@ function [ids_magnetics,ids_magnetics_description,varargout] = tcv_get_ids_magne % [ids_equilibrium,ids_equilibrium_description,varargout] = get_ids_equilibrium_fixed_boundary(shot,varargin); % -[ids_magnetics, params_magnetics] = tcv_ids_headpart(shot, ids_magnetics_empty,'magnetics',varargin{:}); +[ids_magnetics, params_magnetics] = tcv_ids_headpart(shot, ids_magnetics_empty,'magnetics','homogeneous_time',0,varargin{:}); [ids_magnetics.bpol_probe]= tcv_get_ids_bpol_probe(params_magnetics.shot, ids_magnetics.bpol_probe(1)); [ids_magnetics.flux_loop]= tcv_get_ids_flux_loop(params_magnetics.shot, ids_magnetics.flux_loop(1)); [ids_magnetics.method]= tcv_get_ids_ip(params_magnetics.shot, ids_magnetics.method(1)); %% Temporarely documentation -ids_magnetics_description = struct([]); \ No newline at end of file +ids_magnetics_description = struct([]); diff --git a/crpptbx/TCV_IMAS/tcv_get_ids_pf_active.m b/crpptbx/TCV_IMAS/tcv_get_ids_pf_active.m index a2e36745ecfb03a500677113fc69b254ad3c2886..e78660c2fcfc4bdffbf364cf54d4cd624bcb1dc5 100644 --- a/crpptbx/TCV_IMAS/tcv_get_ids_pf_active.m +++ b/crpptbx/TCV_IMAS/tcv_get_ids_pf_active.m @@ -1,7 +1,7 @@ function [ids_pf_active,ids_description,varargout] = tcv_get_ids_pf_active(shot, ids_pf_active_empty, varargin) % Input pharser -[ids_pf_active, params] = tcv_ids_headpart(shot, ids_pf_active_empty,'pf_active',varargin{:}); +[ids_pf_active, params] = tcv_ids_headpart(shot, ids_pf_active_empty,'pf_active','homogeneous_time',0,varargin{:}); % Get subfield [ids_pf_active.coil]= tcv_get_ids_coil(params.shot, ids_pf_active.coil(1)); diff --git a/crpptbx/TCV_IMAS/tcv_ids_headpart.m b/crpptbx/TCV_IMAS/tcv_ids_headpart.m index 2b49b353ed46cfc409492553517f199921dab5d5..90914a7aeb4e19dd31e87ff9761b732a0ae57efd 100644 --- a/crpptbx/TCV_IMAS/tcv_ids_headpart.m +++ b/crpptbx/TCV_IMAS/tcv_ids_headpart.m @@ -4,6 +4,13 @@ function [ids_generic, params_ids_generic] = tcv_ids_headpart(shot,ids_in,ids_na % % parses inputs and fill in ids_properties % +% +% varargin options: +% +% 'comment': comment to include in ids_properties +% 'homogeneous_time': homogeneous_time in ids_properties: 1 (default) if the whole ids has same time, 0 otherwise +% +% % example: % [ids_equilibrium, params_ids_equilibrium] = tcv_ids_headpart(shot,ids_equil_empty,'equilibrium','comment','your comment'); % @@ -17,6 +24,7 @@ p.addOptional('shot', [], @(x) (isnumeric(x) && isscalar(x) && (x == round(x)))) p.addOptional('ids_in', struct([]), @(x) (isstruct(x))); p.addOptional('ids_name', '', @(x) (ischar(x))); % char p.addOptional('comment', 'default comment', @(x) isempty(x) || ischar(x)); % char +p.addOptional('homogeneous_time', 1, @(x) (isnumeric(x) && isscalar(x) && (x == round(x)))); p.parse(shot,ids_in,ids_name); defaults_ids_generic = p.Results; % to keep track of defaults @@ -41,7 +49,7 @@ ids_generic = ids_in; % ids_properties % ids_generic.ids_properties.comment = params_ids_generic.comment; -ids_generic.ids_properties.homogeneous_time = 1; +ids_generic.ids_properties.homogeneous_time = params_ids_generic.homogeneous_time; ids_generic.ids_properties.source = ['TCV shot #' num2str(params_ids_generic.shot)]; ids_generic.ids_properties.provider = ['tcv_get_ids_' ids_name]; ids_generic.ids_properties.creation_date = date;