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

fix case EQR

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4406 d63d8f72-b253-0410-a779-e742ad2e26cf
parent fdd1d5f7
No related branches found
No related tags found
No related merge requests found
......@@ -893,7 +893,6 @@ switch AUGkeywrdcase{index}
[PFxx,e]=rdaAUG_eff(shot,DIAG,'PFxx',shotfile_exp);
[RPFx,e]=rdaAUG_eff(shot,DIAG,'RPFx',shotfile_exp);
[zPFx,e]=rdaAUG_eff(shot,DIAG,'zPFx',shotfile_exp);
% seems "LCFS" q-value is far too large, limit to some max (when diverted)
max_qValue = 40; % Note could just put a NaN on LCFS value since ill-defined when diverted
for it=1:NTIME
......@@ -910,6 +909,21 @@ switch AUGkeywrdcase{index}
equil.psi_axis(it)= equil.psi(1,it);
equil.psi_lcfs(it)= equil.psi(end,it);
equil.rhopolnorm(:,it) = sqrt(abs((equil.psi(:,it)-equil.psi_axis(it)) ./(equil.psi_lcfs(it)-equil.psi_axis(it))));
if strcmp(DIAG,'EQR');
% q value has only a few values and from center to edge, assume they are from central rhopol values on
% But they are every other point starting from 3rd
ijk=find(equil.qvalue(:,it)~=0);
qeff=equil.qvalue(ijk(end:-1:1),it);
rhoeff=equil.rhopolnorm(3:2:2*length(ijk)+1,it);
if length(ijk)>2
ij_nonan=find(~isnan(equil.rhopolnorm(:,it)));
qfit = zeros(size(equil.rhopolnorm(:,it)));
qfit(ij_nonan)=interpos([0.; rhoeff],[qeff(1) ;qeff],equil.rhopolnorm(ij_nonan,it),-0.01,[1 0],[0 0],[300; ones(size(qeff))]);
else
qfit = zeros(size(equil.rhopolnorm(:,it)));
end
equil.qvalue(:,it) = qfit;
end
% get rhotor values
equil.phi(:,it) = phi_tree.value(it,Lpf1:-1:1)';
equil.rhotornorm(:,it) = sqrt(abs(equil.phi(:,it) ./ equil.phi(end,it)));
......
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