diff --git a/matlab/TCV_IMAS/tcv2ids.m b/matlab/TCV_IMAS/tcv2ids.m index be9a48e28eb60254f2bcb250c7c59773c133c364..9b121c6e74c113c998cc691693f953a6b62517a9 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 27299c84cfe857b4d9212d6ace51b6997cdb809c..3079e2a3730ebd95281be84e3ffc7ce16b9c6ccf 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