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

debug when Thomson edge does not exist

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@2875 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 24e09745
No related branches found
No related tags found
No related merge requests found
...@@ -678,16 +678,24 @@ switch TCVkeywrdcase{index} ...@@ -678,16 +678,24 @@ switch TCVkeywrdcase{index}
endstr endstr
psi_max=tdi(['\results::thomson.edge:psi_max' endstr]); psi_max=tdi(['\results::thomson.edge:psi_max' endstr]);
psiscatvol=tdi(['\results::thomson.edge:psiscatvol' endstr]); psiscatvol=tdi(['\results::thomson.edge:psiscatvol' endstr]);
for ir=1:length(psiscatvol.dim{2}) if ~isempty(psiscatvol.data) && ~ischar(psiscatvol.data)
rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))'; for ir=1:length(psiscatvol.dim{2})
end rho(ir,:)= sqrt(1.-psiscatvol.data(:,ir)./psi_max.data(:))';
trace.dim=[{rho};{time}]; end
trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}]; trace.dim=[{rho};{time}];
trace.x=rho; trace.dimunits=[{'sqrt(psi)'} ; {'time [s]'}];
trace.t=time; trace.x=rho;
% isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work trace.t=time;
if any(strcmp(fieldnames(tracetdi),'units')) % isfield does not work since tracetdi is not a 'struct' but a tdi object, thus isfield using isa does not work
trace.units=tracetdi.units; if any(strcmp(fieldnames(tracetdi),'units'))
trace.units=tracetdi.units;
end
else
trace.dim={};
trace.dimunits={};
trace.x=[];
trace.t=[];
trace.units={};
end end
mdsclose; mdsclose;
......
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