Skip to content
Snippets Groups Projects
Commit 654dc8a4 authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add \rhoq2 ptdata type single requests

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@7307 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 24a3e9a0
Branches
Tags
No related merge requests found
...@@ -2,7 +2,6 @@ function mapping = d3d_requests_mapping(data_request) ...@@ -2,7 +2,6 @@ function mapping = d3d_requests_mapping(data_request)
% %
% Information pre-defined for gdat_d3d, you can add cases here to match official cases in gdat_d3d, allowing backward compatibility % Information pre-defined for gdat_d3d, you can add cases here to match official cases in gdat_d3d, allowing backward compatibility
% %
% Defaults % Defaults
mapping = struct(... mapping = struct(...
'label', '', ... 'label', '', ...
...@@ -32,7 +31,11 @@ mapping.label = data_request; ...@@ -32,7 +31,11 @@ mapping.label = data_request;
if iscell(data_request) % || (~ischar(data_request) && length(data_request)>1) if iscell(data_request) % || (~ischar(data_request) && length(data_request)>1)
mapping.label = data_request; mapping.label = data_request;
mapping.method = 'signal'; % assume a full tracename is given, so just try with tdi (could check there are some ":", etc...) mapping.method = 'signal'; % assume a full tracename is given, so just try with tdi (could check there are some ":", etc...)
mapping.expression = data_request; if length(data_request)==1 && strcmp(data_request{1}(1),'\')
mapping.expression = {'d3d',data_request{1}};
else
mapping.expression = data_request;
end
mapping.gdat_timedim = mapping.timedim; mapping.gdat_timedim = mapping.timedim;
return return
end end
...@@ -345,7 +348,12 @@ switch lower(data_request) ...@@ -345,7 +348,12 @@ switch lower(data_request)
otherwise otherwise
mapping.label = data_request; mapping.label = data_request;
mapping.method = 'signal'; % assume a full tracename is given, so just try with tdi (could check there are some ":", etc...) mapping.method = 'signal'; % assume a full tracename is given, so just try with tdi (could check there are some ":", etc...)
mapping.expression = data_request; % pseudo point name: '\ptdata' given, or {'\ptdata'} add D3D as tree
if ischar(data_request) && strcmp(data_request(1),'\')
mapping.expression = {'d3d',data_request};
else
mapping.expression = data_request;
end
end end
......
...@@ -250,11 +250,11 @@ gdat_params = gdat_data.gdat_params; ...@@ -250,11 +250,11 @@ gdat_params = gdat_data.gdat_params;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1st treat the simplest method: "signal" % 1st treat the simplest method: "signal"
if strcmp(mapping_for_d3d.method,'signal') if strcmp(mapping_for_d3d.method,'signal')
% allow changing main source with simple signals, 'source' parameter relates to mapping_for_d3d.expression{1} % allow changing main tree with simple signals, 'tree' parameter relates to mapping_for_d3d.expression{1}
if ~isfield(gdat_data.gdat_params,'source') || isempty(gdat_data.gdat_params.source) || ~ischar(gdat_data.gdat_params.source) if ~isfield(gdat_data.gdat_params,'tree') || isempty(gdat_data.gdat_params.tree) || ~ischar(gdat_data.gdat_params.tree)
gdat_data.gdat_params.source = mapping_for_d3d.expression{1}; gdat_data.gdat_params.tree = mapping_for_d3d.expression{1};
else else
mapping_for_d3d.expression{1} = gdat_data.gdat_params.source; mapping_for_d3d.expression{1} = gdat_data.gdat_params.tree;
end end
shoteff = []; shoteff = [];
if exist('mdscurrent') > 0 if exist('mdscurrent') > 0
...@@ -708,16 +708,15 @@ elseif strcmp(mapping_for_d3d.method,'switchcase') ...@@ -708,16 +708,15 @@ elseif strcmp(mapping_for_d3d.method,'switchcase')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case {'equil'} case {'equil'}
if ~isfield(gdat_data.gdat_params,'source') || isempty(gdat_data.gdat_params.source) || ~ischar(gdat_data.gdat_params.source) if ~isfield(gdat_data.gdat_params,'equil') || isempty(gdat_data.gdat_params.equil) || ~ischar(gdat_data.gdat_params.equil)
gdat_data.gdat_params.source = 'efit03'; gdat_data.gdat_params.equil = 'efit03';
else else
end end
gdat_data.gdat_params.equil = gdat_data.gdat_params.source;
if exist('read_mds_eq_func')<=0 if exist('read_mds_eq_func')<=0
if gdat_params.nverbose>=3; disp(['addpath(''/m/GAtools/matlab/efit'',''end'') since needs function read_mds_eq_func']); end if gdat_params.nverbose>=3; disp(['addpath(''/m/GAtools/matlab/efit'',''end'') since needs function read_mds_eq_func']); end
addpath('/m/GAtools/matlab/efit','end'); addpath('/m/GAtools/matlab/efit','end');
end end
[equil_all_t,neq,eq,ier]=read_mds_eq_func(shot,gdat_data.gdat_params.source,'d3d'); [equil_all_t,neq,eq,ier]=read_mds_eq_func(shot,gdat_data.gdat_params.equil,'d3d');
gdat_data.rhovolnorm = eq.results.geqdsk.rhovn; gdat_data.rhovolnorm = eq.results.geqdsk.rhovn;
gdat_data.equil_all_t = equil_all_t; gdat_data.equil_all_t = equil_all_t;
gdat_data.eq_raw = eq; gdat_data.eq_raw = eq;
...@@ -771,7 +770,7 @@ elseif strcmp(mapping_for_d3d.method,'switchcase') ...@@ -771,7 +770,7 @@ elseif strcmp(mapping_for_d3d.method,'switchcase')
gdat_data.data = gdat_data.qvalue; % put q in data gdat_data.data = gdat_data.qvalue; % put q in data
gdat_data.units='q'; % not applicable gdat_data.units='q'; % not applicable
gdat_data.data_fullpath = ... gdat_data.data_fullpath = ...
['q(:,time) in .data, all from [equil_all_t,neq,eq,ier]=read_mds_eq_func(shot,gdat_data.gdat_params.source,''d3d'');']; ['q(:,time) in .data, all from [equil_all_t,neq,eq,ier]=read_mds_eq_func(shot,gdat_data.gdat_params.equil,''d3d'');'];
gdat_data.cocos = 2; gdat_data.cocos = 2;
gdat_data.dim{1} = gdat_data.x; gdat_data.dim{1} = gdat_data.x;
gdat_data.dim{2} = gdat_data.t; gdat_data.dim{2} = gdat_data.t;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment