0001 function equil_prof = equil_prof_jd(filename,type,prho,pspsin,pspsinT,display_mode,p_opt,dispname,savename,Zeff)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 if nargin < 10,
0016 Zeff = NaN;
0017 end
0018 if nargin < 9,
0019 savename = filename;
0020 end
0021 if nargin < 8,
0022 dispname = filename;
0023 end
0024
0025 if nargin < 7,
0026 p_opt = -1;
0027 end
0028
0029 if nargin < 6,
0030 display_mode = 0;
0031 end
0032
0033 method = 'spline';
0034
0035
0036
0037 [yrho,yspsin,yspsinT,yTe,yne,yzTi,yzni,zZi,zmi] = Teneprof_jd(filename,type,display_mode,p_opt,Zeff,dispname,savename);
0038
0039 if ~isempty(yrho),
0040 pTe = interp1(yrho,yTe,prho,method);
0041 pne = interp1(yrho,yne,prho,method);
0042 pzTi = interp1(yrho,yzTi.',prho,method).';
0043 pzni = interp1(yrho,yzni.',prho,method).';
0044
0045 elseif ~isempty(yspsin),
0046 if isstruct(yspsin),
0047 pTe = interp1(yspsin.pTe,yTe,pspsin,method);
0048 pne = interp1(yspsin.pne,yne,pspsin,method);
0049 pzTi = interp1(yspsin.pzTi,yzTi.',pspsin,method).';
0050 pzni = interp1(yspsin.pzni,yzni.',pspsin,method).';
0051 else
0052 pTe = interp1(yspsin,yTe,pspsin,method);
0053 pne = interp1(yspsin,yne,pspsin,method);
0054 pzTi = interp1(yspsin,yzTi.',pspsin,method).';
0055 pzni = interp1(yspsin,yzni.',pspsin,method).';
0056 end
0057
0058 elseif ~isempty(yspsinT),
0059 pTe = interp1(yspsinT,yTe,pspsinT,method);
0060 pne = interp1(yspsinT,yne,pspsinT,method);
0061 pzTi = interp1(yspsinT,yzTi.',pspsinT,method).';
0062 pzni = interp1(yspsinT,yzni.',pspsinT,method).';
0063
0064 end
0065
0066
0067
0068 equil_prof.zZi = zZi;
0069 equil_prof.zmi = zmi;
0070 equil_prof.pTe = pTe;
0071 equil_prof.pne = pne;
0072 equil_prof.pzTi = pzTi;
0073 equil_prof.pzni = pzni;
0074 equil_prof.prof_src = filename;
0075