From deec45a1c400307a740e6184b9272de5f9b35fa5 Mon Sep 17 00:00:00 2001 From: Antoine Merle <antoine.merle@epfl.ch> Date: Mon, 20 Jan 2020 16:58:22 +0100 Subject: [PATCH] Fix tf: add error for r0.b0 --- matlab/TCV_IMAS/tcv_get_ids_tf.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/matlab/TCV_IMAS/tcv_get_ids_tf.m b/matlab/TCV_IMAS/tcv_get_ids_tf.m index 4ce27ae1..9bb06703 100644 --- a/matlab/TCV_IMAS/tcv_get_ids_tf.m +++ b/matlab/TCV_IMAS/tcv_get_ids_tf.m @@ -11,7 +11,7 @@ function [ids_tf,ids_tf_description] = tcv_get_ids_tf(shot, ids_tf_empty, gdat_ ids_tf = ids_tf_empty; -if exist('gdat_params') +if exist('gdat_params','var') [ids_tf, params_tf] = tcv_ids_headpart(shot, ids_tf_empty,'tf','homogeneous_time',0,'gdat_params',gdat_params,varargin{:}); params_eff = gdat_params; params_eff.data_request = 'b0'; @@ -26,6 +26,8 @@ if ~ischar(tmp.data) ids_tf_description.r0 = ' b0.r0 from gdat_tcv(shot, ''b0'')'; ids_tf.b_field_tor_vacuum_r.data = tmp.data .* ids_tf.r0; ids_tf_description.b_field_tor_vacuum_r.data = ' gdat_tcv(shot, ''b0'') * .r0'; + ids_tf.b_field_tor_vaccum_r.data_error_upper = 19.2e-6*200; %TODO: Check the 200A value (might be more since TOR goes up to 70kA) + ids_tf_description.b_field_tor_vacuum_r.data_error_upper = ' Error on coil measurement is 200A, b0.r0 is 19.2e-6*iphi'; ids_tf.b_field_tor_vacuum_r.time = tmp.t; else % leave defaults @@ -37,7 +39,7 @@ ids_tf.coil = {}; ids_tf.field_map = {}; % cocos automatic transform -if exist('ids_generic_cocos_nodes_transformation_symbolic') == 2 +if exist('ids_generic_cocos_nodes_transformation_symbolic','file') [ids_tf,cocoscoeff]=ids_generic_cocos_nodes_transformation_symbolic(ids_tf,'tf',gdat_params.cocos_in, ... gdat_params.cocos_out,gdat_params.ipsign_out,gdat_params.b0sign_out,gdat_params.ipsign_in,gdat_params.b0sign_in, ... gdat_params.error_bar,gdat_params.nverbose); -- GitLab