Skip to content
Snippets Groups Projects
tcv2ids2database.m 796 B
Newer Older
% 
% script to get TCV data as ids and then write them on the database
%

shot=40000;
Olivier Sauter's avatar
Olivier Sauter committed
shot=62745;
Olivier Sauter's avatar
Olivier Sauter committed
ids2get = {'equilibrium', 'magnetics', 'pf_active','wall'}; % default will load all defined so far
[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
%%
[ids_put_status] = ids2database(shot,run_out,occurence,ids_from_tcv);