Commit 1824dbfc authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add ece and reset_public and mdsconnect for JET

parent 1f36c3d6
Pipeline #43387 failed with stage
in 6 minutes and 27 seconds
......@@ -533,6 +533,78 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
gdat_data.dimunits{1} = '';
gdat_data.dimunits{2} = 's';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'ece', 'eced', 'ece_rho', 'eced_rho'}
params_eff = gdat_data.gdat_params;
channel_index = [1 96];
if ~isfield(params_eff,'channel_index') || isempty(params_eff.channel_index)
params_eff.channel_index = channel_index;
else
channel_index = params_eff.channel_index;
end
channel_index_list = channel_index;
if numel(channel_index) == 2; channel_index_list=[channel_index(1):channel_index(2)]; end
if isfield(params_eff,'time_interval') && ~isempty(params_eff.time_interval) && length(params_eff.time_interval)>=2
time_interval = params_eff.time_interval;
else
time_interval = [];
end
gdat_data.gdat_params.time_interval = time_interval;
fit_tension_default = -3.;
if isfield(params_eff,'fit_tension')
fit_tension = params_eff.fit_tension;
else
fit_tension = fit_tension_default;
end
i = channel_index_list(1);
aa.data = [];
for i=channel_index_list(2:end)
mdsconnect('mdsplus.jet.efda.org');
if isempty(aa.data)
params_eff.data_request = {'ppf','kk3',num2str(i,'te%.2d')};
aa = gdat_jet(shot,params_eff);
if ~isempty(aa.data)
aa_data_start(i,:) = reshape(aa.data,1,numel(aa.data));
aa.data = aa_data_start;
params_eff.data_request = {'ppf','kk3',num2str(i,'rc%.2d')};
mdsconnect('mdsplus.jet.efda.org');
gdat_data.rc = gdat_jet(shot,params_eff);
rc_data(i,:) = reshape(gdat_data.rc.data,1,numel(gdat_data.rc.data));
gdat_data.rc.data = rc_data;
end
else
% assume same time for all
rda_data_request = ['ppf/kk3/' num2str(i,'te%.2d')];
bb = mdsvalue(['_bb=jet("' rda_data_request '",' num2str(shot) ')']);
if ~isempty(bb) && numel(bb)==size(aa.data,2)
aa.data(i,:) = bb;
end
mdsconnect('mdsplus.jet.efda.org');
rda_data_request = ['ppf/kk3/' num2str(i,'rc%.2d')];
bb = mdsvalue(['_bb=jet("' rda_data_request '",' num2str(shot) ')']);
if ~isempty(bb) && numel(bb)==size(gdat_data.rc.data,2)
gdat_data.rc.data(i,:) = bb;
end
end
end
gdat_data.data = aa.data;
gdat_data.t = aa.t;
gdat_data.units = 'eV';
gdat_data.dim{1} = channel_index_list;
gdat_data.dim{2} = gdat_data.t;
gdat_data.x = gdat_data.dim{1};
gdat_data.dimunits{1} = 'xx';
gdat_data.dimunits{2} = 's';
gdat_data.data_fullpath = aa.data_fullpath;
gdat_data.label = aa.label;
gdat_data.help = 'using jet() call for other data channels to avoid loading t many times';
gdat_data.rc.units = 'm';
gdat_data.rc.dim{1} = channel_index_list;
gdat_data.rc.dim{2} = gdat_data.rc.t;
gdat_data.rc.x = gdat_data.rc.dim{1};
gdat_data.rc.dimunits{1} = 'xx';
gdat_data.rc.dimunits{2} = 's';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'eqdsk'}
%
......
......@@ -33,6 +33,7 @@ if usemdsplus
% addpath('/home/duval/mdsplus')
end
mdsconnect('mdsplus.jet.efda.org');
mdsvalue('reset_public()');
% defines trace to fetch
% after '?' specific details
separator='+';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment