Commit 7da786ce authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add gap_in out TCV; cocos out for AUG eqdsk

parent 4e85d3e7
......@@ -1052,14 +1052,16 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
% use read_results updated to effectively obtain an eqdsk with sign correct with COCOS=2
[eqdskAUG, equil_all_t, equil_t_index]=geteqdskAUG(equil,time_eff,gdat_data.gdat_params.zshift,'source',gdat_data.gdat_params.equil,'extra_arg_sf2sig',gdat_data.gdat_params.extra_arg_sf2sig,'fignb',fignb_handle);
eqdskAUG.fnamefull = fullfile(['/tmp/' getenv('USER')],['EQDSK_' num2str(shot) 't' num2str(time_eff,'%.4f')]);
cocos_out = equil.cocos;
if isfield(gdat_data.gdat_params,'cocos') && ~isempty(gdat_data.gdat_params.cocos)
cocos_out = gdat_data.gdat_params.cocos;
else
gdat_data.gdat_params.cocos = cocos_out;
cocos_in = eqdskAUG.cocos;
if cocos_in ~= equil.cocos;
equil.cocos = eqdskAUG.cocos;
end
if ~isfield(gdat_data.gdat_params,'cocos') || isempty(gdat_data.gdat_params.cocos)
gdat_data.gdat_params.cocos = cocos_in;
end
if equil.cocos ~= cocos_out
[eqdsk_cocosout, eqdsk_cocosout_IpB0pos,cocos_inout]=eqdsk_cocos_transform(eqdskAUG,[equil.cocos cocos_out]);
cocos_out = gdat_data.gdat_params.cocos;
if cocos_in ~= cocos_out
[eqdsk_cocosout, eqdsk_cocosout_IpB0pos,cocos_inout]=eqdsk_cocos_transform(eqdskAUG,[cocos_in cocos_out]);
else
eqdsk_cocosout = eqdskAUG;
end
......@@ -1291,7 +1293,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
gdat_data.data = gdat_data.qvalue; % put q in data
gdat_data.units=[]; % not applicable
gdat_data.data_fullpath = [DIAG ' from exp_name: ' gdat_data.gdat_params.exp_name '; q(rhopolnorm,t) in .data(.x,.t)'];
gdat_data.cocos = 17; % should check FPP
gdat_data.cocos = 17; % should check FPP (IDE seems 13)
gdat_data.dim{1} = gdat_data.x;
gdat_data.dim{2} = gdat_data.t;
gdat_data.dimunits{1} = 'rhopolnorm';
......@@ -2310,7 +2312,7 @@ elseif strcmp(mapping_for_aug.method,'switchcase')
gdat_data.data = gdat_data.qvalue; % put q in data
gdat_data.units=[]; % not applicable
gdat_data.data_fullpath = [DIAG ' from exp_name: ' gdat_data.gdat_params.exp_name '; q(rhopolnorm,t) in .data(.x,.t)'];
gdat_data.cocos = 17; % should check FPP
gdat_data.cocos = 17; % should check FPP (IDE seems 13)
gdat_data.dim{1} = gdat_data.x;
gdat_data.dim{2} = gdat_data.t;
gdat_data.dimunits{1} = 'rhopolnorm';
......
......@@ -146,7 +146,7 @@ eqdsk.zaxis = zmag.data(itrmag) - eqdsk.zshift;
doplot = 1;
if isnumeric(fignb) && fignb <= 0
doplot = 0;
elseif isempty(fignb) || (isnumeric(fignb) && fignb < 1) || (~isnumeric(fignb) && ~ishandle(fignb))
elseif isempty(fignb) || (isnumeric(fignb) && fignb < 1) || (~isnumeric(fignb) && ~ishandle(fignb))
figure
fignb_handle = gcf;
set(gcf,'Name','from geteqdskAUG');
......@@ -211,4 +211,15 @@ if doplot
plot(eqdsk.rlim,eqdsk.zlim,'k-')
title(eqdsk.stitle)
end
% check cocos since IDE seems 13
icocos = find_cocos(eqdsk);
if any(13==icocos)
eqdsk.cocos = 13;
elseif any(17==icocos)
eqdsk.cocos = 17;
else
eqdsk.cocos = icocos(1);
warning(['COCOS seems = ' num2str(eqdsk.cocos)]);
end
eqdskAUG = eqdsk;
......@@ -136,6 +136,14 @@ switch lower(data_request)
mapping.timedim = 0;
mapping.method = 'tdi';
mapping.expression = '\rtc::node03.params.cfg_file';
case {'gap_inout', 'gap_out', 'gap_in', 'gap_lfs','gap_hfs'}
mapping.timedim = 2;
mapping.label = 'gap hfs/lfs';
mapping.method = 'expression';
mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''tcv_eq("r_contour","LIUQE.M")'';' ...
'gdat_tmp=gdat_tcv([],params_eff);aa_data(1,:)=min(gdat_tmp.data,[],1)-0.624;' ...
'aa_data(2,:)=1.136-max(gdat_tmp.data,[],1);gdat_tmp.data=aa_data;gdat_tmp.x=[1:2];gdat_tmp.dim{1}=gdat_tmp.x;' ...
'gdat_tmp.dimunits{1}={''HFS'',''LFS''};'];
case {'gas', 'gas_flux', 'gas_request', 'gas_feedforward','gas_valve'}
mapping.timedim = 1;
mapping.label = 'gas flux';
......
Markdown is supported
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