Commit 79dce796 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add sxr-s40 and as default sxr for JET

parent 52e96c14
Pipeline #43609 passed with stage
in 2 minutes and 47 seconds
......@@ -1642,14 +1642,26 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
gdat_data.t = gdat_data.dim{mapping_for_jet.gdat_timedim};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'sxr'}
if ~isfield(gdat_data.gdat_params,'source') || isempty(gdat_data.gdat_params.source)
gdat_data.gdat_params.source = 'H';
elseif ~strmatch(lower(gdat_data.gdat_params.source),{'h','v','t'})
if gdat_data.gdat_params.nverbose>=1
warning(['source = ' gdat_data.gdat_params.source ' not expected with data_request= ' data_request_eff])
case {'sxr', 'sxr_s40', 'sxr_htv'}
if strcmp(data_request_eff,'sxr') || strcmp(data_request_eff,'sxr_s40')
% newer shots?
% SXRs: JPF/DA/SXR-S40xx xx 1:17
if ~isfield(gdat_data.gdat_params,'source') || isempty(gdat_data.gdat_params.source)
gdat_data.gdat_params.source = 'sxr-s40';
gdat_data.gdat_params.source_main = {'jpf','da'};
end
return
elseif strcmp(data_request_eff,'sxr_htv')
if ~isfield(gdat_data.gdat_params,'source') || isempty(gdat_data.gdat_params.source)
gdat_data.gdat_params.source = 'H';
gdat_data.gdat_params.source_main = {'ppf','sxr'};
elseif ~strmatch(lower(gdat_data.gdat_params.source),{'h','v','t'})
if gdat_data.gdat_params.nverbose>=1
warning(['source = ' gdat_data.gdat_params.source ' not expected with data_request= ' data_request_eff])
end
return
end
else
error(['should not get here, data_request_eff = ' data_request_eff]);
end
if ~isfield(gdat_data.gdat_params,'time_interval')
gdat_data.gdat_params.time_interval = [];
......@@ -1661,6 +1673,8 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
camera_all = [1:3:35];
case 'v'
camera_all = [1:3:35];
otherwise
camera_all = [1:17];
end
if ~isfield(gdat_data.gdat_params,'camera') || isempty(gdat_data.gdat_params.camera)
camera = camera_all;
......@@ -1680,8 +1694,9 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
try
gdat_data.chord_ok = [];
for ichord=1:length(camera)
aa = gdat_jet(shot,{'ppf','sxr',[source num2str(camera(ichord),'%.2d')]});
if ~isempty(aa.data) && ~isempty(aa.dim)
aa = gdat_jet(shot,{gdat_data.gdat_params.source_main{1},gdat_data.gdat_params.source_main{2}, ...
[source num2str(camera(ichord),'%.2d')]});
if isnumeric(aa.data) && ~isempty(aa.data) && ~isempty(aa.dim)
if isempty(gdat_data.data)
gdat_data.data = NaN*ones(numel(camera_all),numel(aa.dim{gdat_data.mapping_for.jet.timedim}));
gdat_data.dim{1} = camera_all;
......
......@@ -335,7 +335,7 @@ switch lower(data_request)
mapping.timedim = 1;
mapping.method = 'signal';
mapping.expression = [{'PPF'},{'EFIT'},{'RMAG'}];
case 'sxr'
case {'sxr', 'sxr_s40', 'sxr_htv'}
mapping.timedim = 1;
mapping.gdat_timedim = 2;
mapping.method = 'switchcase';
......
......@@ -111,6 +111,7 @@ if usemdsplus
traceeff=[traceeff '/' num2str(seq)];
end
user=getenv('USER');
mdsconnect('mdsplus.jet.efda.org');
eval(['[data,error]=mdsvalue(''_rdaeff' user '=jet("' traceeff '",' num2str(shot) ')'');'])
hsig=[];
ss=size(data);
......@@ -119,11 +120,13 @@ if usemdsplus
nbofdim=max(nbofdim,1);
switch nbofdim
case 1
mdsconnect('mdsplus.jet.efda.org');
eval(['time=mdsvalue(''dim_of(_rdaeff' user ',0)'');']);
x=[];
if isempty(time) & length(data)>1e6 & strcmpi(type,'lpf') & strcmpi(diag,'kc1f')
mdsdisconnect;
mdsconnect('mdsplus.jet.efda.org');
mdsconnect('mdsplus.jet.efda.org');
eval(['aaa=mdsvalue(''_tc91=jet("jpf/da/c1-tc91",' num2str(shot) ');1'');'])
taaa=mdsvalue('_ttc91=dim_of(_tc91,0);_ttc91[0]');
time=linspace(taaa+1e-6,taaa+4,length(data))';
......@@ -137,13 +140,18 @@ if usemdsplus
time=linspace(taaa,taaa+8-4e-6,length(data))';
end
case 2
mdsconnect('mdsplus.jet.efda.org');
eval(['x=mdsvalue(''dim_of(_rdaeff' user ',0)'');']);
mdsconnect('mdsplus.jet.efda.org');
eval(['time=mdsvalue(''dim_of(_rdaeff' user ',1)'');']);
case 3
mdsconnect('mdsplus.jet.efda.org');
eval(['x=mdsvalue(''dim_of(_rdaeff' user ',0)'');']);
mdsconnect('mdsplus.jet.efda.org');
eval(['time=mdsvalue(''dim_of(_rdaeff' user ',1)'');']);
disp('3rd dimension in hsig!!!!!!!!!!!!!!!!!!!!!!!!!')
mdsconnect('mdsplus.jet.efda.org');
eval(['hsig=mdsvalue(''dim_of(_rdaeff' user ',2)'');']);
otherwise
......
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