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

add homogenous_time in options

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@11383 d63d8f72-b253-0410-a779-e742ad2e26cf
parent bcebed89
No related branches found
No related tags found
No related merge requests found
......@@ -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([]);
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));
......
......@@ -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;
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