function [ids_struct_out] =  tcv_get_ids_supply(shot, ids_structures)

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

% Preallocate memory and get data
ids_struct_out(1:tcv_circuit_info.ntotpowersupplies) = ids_structures;
for ii=1:tcv_circuit_info.ntotpowersupplies
    tmpdata = tdi(tcv_circuit_info.mds_paths{ii}); % Get current
    ids_struct_out{ii}.current.data = abs(tmpdata.data);
    ids_struct_out{ii}.current.time = tmpdata.dim{1};
    % ids_struct_out{ii}.current.data_error_upper = 0.03.*max(abs(ids_struct_out{ii}.current.data)).*ones(size(ids_struct_out{ii}.current.data));
    ids_struct_out{ii}.name = tcv_circuit_info.power_supply_names{ii};
end
