function [ids_struct_out] =  tcv_get_ids_circuit(shot, ids_structures)

mdsopen(shot)
%% Get power supply/coils names for each circuit.
[pf_def] =  tcv_ids_pf_active_definition();


% Get dimension
ntotcircuits2ids = numel(circuit_names2ids);
ntotpowersupply = numel(power_supply_names2ids);
ntotcoils = numel([coil_names2ids{1:end}]);
ncoilpercircuit = zeros(1,ntotcircuits2ids);
for ii=1:ntotcircuits2ids
    ncoilpercircuit(ii) =  numel(coil_names2ids{ii});
end

% Each circuit has only 1 power supply, number of elements per circuit =
% number of nodes per circuit= number of coils per circuit + 1;
nnodespercircuit = ncoilpercircuit + 1; 
ntotelements = sum(nnodespercircuit);

% Since all the coils are connected in series it d

% Preallocate memory and get data
ids_struct_out(1:ntotcircuits2ids) = ids_structures;
for ii=1:ntotcircuits2ids
    tmpdata = tdi(mds_paths2ids{ii});
    ids_struct_out{ii}.current.data = tmpdata.data;
    ids_struct_out{ii}.current.time = tmpdata.dim{1};
    ids_struct_out{ii}.connection = zeros(nnodespercircuit(ii),2*ntotelements);
end



end


