function [ids_tf_out,ids_tf_out_description] =  tcv_get_ids_tf(shot, ids_tf_empty, gdat_params,varargin)
%
% [ids_tf_out] =  tcv_get_ids_tf(shot, ids_tf_empty,varargin);
%
% Get the vacuum toroidal field
%
% ids_tf_empty should at least be the empty tf ids structure in input
%
% gdat_params: gdat_data.gdat_params to get all params passed from original call, in particular error_bar options
%

ids_tf_out = ids_tf_empty;

[ids_tf_out, params_tf] = tcv_ids_headpart(shot, ids_tf_empty,'tf','homogeneous_time',0,varargin{:});

tmp = gdat_tcv(shot, 'b0');
if ~ischar(tmp.data)
  ids_tf_out.b_field_tor_vacuum_r.data = tmp.data; 
  ids_tf_out.b_field_tor_vacuum_r.time = tmp.t;
  ids_tf_out.r0 = tmp.r0;
  ids_tf_out_description.b_field_tor_vacuum_r.data = ' gdat_tcv(shot, ''b0'')';
  ids_tf_out_description.r0 = ' b0.r0 from gdat_tcv(shot, ''b0'')';
else
  % leave defaults
  ids_tf_out_description = struct([]);
end

% make arrays not filled in empty: not the case for magnetics
ids_tf_out.coil = {};
ids_tf_out.field_map = {};

% cocos automatic transform
cocos_in=17;
cocos_out=11;
[ids_tf_out,cocoscoeff]=ids_generic_cocos_nodes_transformation_symbolic(ids_tf_out,'tf',cocos_in,cocos_out);

