From 6d6c09be5e24dbdc7eb87d33efcdfdb9baaf1a43 Mon Sep 17 00:00:00 2001 From: Olivier Sauter <Olivier.Sauter@epfl.ch> Date: Sun, 27 Oct 2019 20:32:48 +0100 Subject: [PATCH] add time_out to tcv2ids2database params list --- matlab/TCV_IMAS/tcv2ids.m | 2 ++ matlab/TCV_IMAS/tcv2ids2database.m | 3 +++ 2 files changed, 5 insertions(+) diff --git a/matlab/TCV_IMAS/tcv2ids.m b/matlab/TCV_IMAS/tcv2ids.m index be9a48e2..9b121c6e 100644 --- a/matlab/TCV_IMAS/tcv2ids.m +++ b/matlab/TCV_IMAS/tcv2ids.m @@ -20,6 +20,8 @@ function [ids_from_tcv,varargout] = tcv2ids(shot,varargin); % 'ipsign_out': if a specific sign fo Ip is desired in output within the cocos_out system (default 0=no specific sign) % 'b0sign_out': if a specific sign fo B0 is desired in output within the cocos_out system (default 0=no specific sign) % 'nverbose': (default 1), set it to 3 to have more messages, for example about not fully valid nodes when doing transformation (empty or Nans) +% 'time_out': if 2 values provided: get all time data within that time interval +% otherwise get values at these times provided in time_out (with linear interpolation and cst extrapolation) % % Outputs % varargout{1}: return also the ids in array of structure with the names, to allow easy use of plotallids diff --git a/matlab/TCV_IMAS/tcv2ids2database.m b/matlab/TCV_IMAS/tcv2ids2database.m index 27299c84..3079e2a3 100644 --- a/matlab/TCV_IMAS/tcv2ids2database.m +++ b/matlab/TCV_IMAS/tcv2ids2database.m @@ -20,6 +20,8 @@ function [ids_from_tcv,varargout] = tcv2ids2database(shot,run_out,varargin); % 'cocos_out': (default 11) cocos to transform ids from TCV cocos_in=17 to cocos_out % 'ipsign_out': if a specific sign fo Ip is desired in output within the cocos_out system (default 0=no specific sign) % 'b0sign_out': if a specific sign fo B0 is desired in output within the cocos_out system (default 0=no specific sign) +% 'time_out': if 2 values provided: get all time data within that time interval +% otherwise get values at these times provided in time_out (with linear interpolation and cst extrapolation) % % example: % ids_from_tcv = tcv2ids2database(62745,9999,'ids_names',{'pf_active'},'error_bar','added'); % to test only one ids @@ -54,6 +56,7 @@ p.addOptional('cocos_out', 11, @(x) isempty(x) || isnumeric(x) ); % char p.addOptional('ipsign_out', 0, @(x) isempty(x) || (x==0 | x==-1 | x==+1) ); % char p.addOptional('b0sign_out', 0, @(x) isempty(x) || (x==0 | x==-1 | x==+1) ); % char p.addOptional('nverbose', 1, @(x) isempty(x) || isnumeric(x) ); +p.addOptional('time_out', [], @(x) isempty(x) || isnumeric(x) ); p.parse; defaults_tcv2ids2database = p.Results; % to keep track of defaults -- GitLab