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

add systematically default parameter

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@5027 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 51d4550d
No related branches found
No related tags found
No related merge requests found
...@@ -231,6 +231,8 @@ error_status = 6; % at least reached this level ...@@ -231,6 +231,8 @@ error_status = 6; % at least reached this level
liuqe_version = 1; liuqe_version = 1;
if isfield(gdat_data.gdat_params,'liuqe') && ~isempty(gdat_data.gdat_params.liuqe) if isfield(gdat_data.gdat_params,'liuqe') && ~isempty(gdat_data.gdat_params.liuqe)
liuqe_version = gdat_data.gdat_params.liuqe; liuqe_version = gdat_data.gdat_params.liuqe;
else
gdat_data.gdat_params.liuqe = liuqe_version;
end end
substr_liuqe = ''; substr_liuqe = '';
if liuqe_version==2 || liuqe_version==3 if liuqe_version==2 || liuqe_version==3
...@@ -520,6 +522,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -520,6 +522,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
if isfield(params_eff,'fit') && params_eff.fit>0 if isfield(params_eff,'fit') && params_eff.fit>0
sub_nodes_eff = sub_nodes_fit; sub_nodes_eff = sub_nodes_fit;
else else
params_eff.fit = 0;
sub_nodes_eff = sub_nodes; sub_nodes_eff = sub_nodes;
end end
...@@ -544,6 +547,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -544,6 +547,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
if isfield(gdat_data.gdat_params,'time') && ~isempty(gdat_data.gdat_params.time) if isfield(gdat_data.gdat_params,'time') && ~isempty(gdat_data.gdat_params.time)
time = gdat_data.gdat_params.time; time = gdat_data.gdat_params.time;
else else
gdat_data.gdat_params.time = time;
disp(['"time" is expected as an option, choose default time = ' num2str(time)]); disp(['"time" is expected as an option, choose default time = ' num2str(time)]);
end end
gdat_data.gdat_params.time = time; gdat_data.gdat_params.time = time;
...@@ -551,6 +555,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -551,6 +555,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
zshift = 0.; zshift = 0.;
if isfield(gdat_data.gdat_params,'zshift') && ~isempty(gdat_data.gdat_params.zshift) if isfield(gdat_data.gdat_params,'zshift') && ~isempty(gdat_data.gdat_params.zshift)
zshift = gdat_data.gdat_params.zshift; zshift = gdat_data.gdat_params.zshift;
else
gdat_data.gdat_params.zshift = zshift;
end end
gdat_data.gdat_params.zshift = zshift; gdat_data.gdat_params.zshift = zshift;
for itime=1:length(time) for itime=1:length(time)
...@@ -572,6 +578,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -572,6 +578,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
cocos_out = 17; cocos_out = 17;
if isfield(gdat_data.gdat_params,'cocos') && ~isempty(gdat_data.gdat_params.cocos) if isfield(gdat_data.gdat_params,'cocos') && ~isempty(gdat_data.gdat_params.cocos)
cocos_out = gdat_data.gdat_params.cocos; cocos_out = gdat_data.gdat_params.cocos;
else
gdat_data.gdat_params.cocos = cocos_out;
end end
[eqdsk_cocosout, eqdsk_cocosout_IpB0pos,cocos_inout]=eqdsk_cocos_transform(eqdsk_cocos_in,[cocos_in cocos_out]); [eqdsk_cocosout, eqdsk_cocosout_IpB0pos,cocos_inout]=eqdsk_cocos_transform(eqdsk_cocos_in,[cocos_in cocos_out]);
% for several times, use array of structure for eqdsks, % for several times, use array of structure for eqdsks,
...@@ -630,6 +638,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -630,6 +638,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
gdat_data.gdat_params.edge>0 gdat_data.gdat_params.edge>0
edge_str_ = '_edge'; edge_str_ = '_edge';
edge_str_dot = '.edge'; edge_str_dot = '.edge';
else
gdat_data.gdat_params.edge = 0;
end end
nodenameeff=['\results::thomson' edge_str_dot ':' data_request_eff]; nodenameeff=['\results::thomson' edge_str_dot ':' data_request_eff];
tracetdi=tdi(nodenameeff); tracetdi=tdi(nodenameeff);
...@@ -694,6 +704,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') ...@@ -694,6 +704,8 @@ elseif strcmp(mapping_for_tcv.method,'switchcase')
gdat_data.gdat_params.edge>0 gdat_data.gdat_params.edge>0
edge_str_ = '_edge'; edge_str_ = '_edge';
edge_str_dot = '.edge'; edge_str_dot = '.edge';
else
gdat_data.gdat_params.edge = 0;
end end
% if nete_rho, do first ne, then Te later (so fir stuff already done) % if nete_rho, do first ne, then Te later (so fir stuff already done)
if strcmp(data_request_eff,'ne_rho') || strcmp(data_request_eff,'nete_rho') if strcmp(data_request_eff,'ne_rho') || strcmp(data_request_eff,'nete_rho')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment