0001 function wave = imake_wave_EVE_jd(basestr,equil,workdir,opt_gui)
0002
0003
0004
0005
0006 wave = '';
0007
0008 if isfield(equil,'prof_src') && exist(equil.prof_src,'file'),
0009
0010 filename = equil.prof_src;
0011
0012 else
0013
0014 [data_file,data_path] = igetfile_jd(opt_gui,'*.*','Please select the EVE output file :',workdir);
0015
0016 if data_file == 0,
0017 return
0018 else
0019 filename = [data_path,data_file];
0020 end
0021
0022 end
0023
0024 load(filename,'eve');
0025
0026 disp(['EVE output data for ',basestr,' equilibrium loaded from file : ',filename])
0027
0028
0029
0030
0031
0032
0033
0034 [qe,me,mp,mn,e0,mu0,re,mc2,clum] = pc_dke_yp;
0035
0036
0037 xupar = eve.upar;
0038 yrho_S = eve.sg;
0039
0040
0041 yrho = (yrho_S(1:end-1) + yrho_S(2:end))/2;
0042
0043
0044
0045
0046
0047 xyD_EE = (eve.D_EE(:,1:end-1) + eve.D_EE(:,2:end))/2;
0048 xyD_EB = (eve.D_EB(:,1:end-1) + eve.D_EB(:,2:end))/2;
0049 xyD_BB = (eve.D_BB(:,1:end-1) + eve.D_BB(:,2:end))/2;
0050 yTe = (eve.Te(1:end-1) + eve.Te(2:end))/2;
0051
0052
0053
0054 nx = length(xupar);
0055
0056 ybetath_eve = sqrt(2*yTe/mc2).';
0057 xybetath_eve = repmat(ybetath_eve,[nx,1]);
0058
0059 xyuparc = xupar*ybetath_eve;
0060
0061
0062 xyD_EE = xyD_EE/(me*clum^2)^2;
0063 xyD_EB = xyD_EB/(me*clum^2)^2./xybetath_eve.^2;
0064 xyD_BB = xyD_BB/(me*clum^2)^2./xybetath_eve.^4;
0065
0066
0067
0068
0069
0070 wave.id = 'EVE';
0071 wave.equil_id = equil.id;
0072 wave.model = 'FW';
0073
0074 wave.Xvpar = xyuparc;
0075
0076
0077 xyuparc(xyuparc == 0) = eps;
0078 wave.XDql_LD = xyD_EE./xyuparc.^2;
0079 wave.XDql_MX = xyD_EB./xyuparc.^2;
0080 wave.XDql_TT = xyD_BB./xyuparc.^2;
0081
0082 wave.rho = yrho;
0083 wave.rho_S = yrho_S;
0084
0085 wave.rhotype = 't';
0086
0087 wave.pe_eve = eve.pe_eve;
0088 wave.pe_dql = eve.pe_dql;
0089
0090
0091
0092