Newer
Older

Olivier Sauter
committed
%
% script to get TCV data as ids and then write them on the database
%
shot=40000;

Olivier Sauter
committed
run_out=999;
occurence=0;
ids2get = {'equilibrium', 'magnetics', 'pf_active','wall'}; % default will load all defined so far

Olivier Sauter
committed
[ids_from_tcv,idsok] = tcv2ids(shot,ids2get);
%% can plot with: [plotids_H] = plotids([],idsok.ids{1},idsok.ids{2});
if isfield(ids_from_tcv,'tf')
% avoid present problem of not saving data if ids_from_tcv.tf.field_map{1}.time is not set
if abs(ids_from_tcv.tf.field_map{1}.time+9.e40)<1e-5
ids_from_tcv.tf.field_map{1}.time = -8.9000e+40;
disp(['WARNING: ids_from_tcv.tf.field_map{1}.time changed to ' num2str(ids_from_tcv.tf.field_map{1}.time) ' to avoid writing error']);
end
end
%%

Olivier Sauter
committed
[ids_put_status] = ids2database(shot,run_out,occurence,ids_from_tcv);