comp_luke_code_jd

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 clear
0002 p_opt = -1;
0003 c_opt = true;
0004 
0005 lukedata = load('DKE_RESULTS_Runaway_alpha3_sync_0p6.mat');
0006 lukedata_4 = load('DKE_RESULTS_Runaway_alpha3_sync_0p6_Zi4.mat');
0007 codedata = load('Z1.mat');
0008 codedata_4 = load('Z4.mat');
0009 
0010 % xlog = 0;
0011 % xlim = [0,max(Ec)];
0012 % xtick = 0:20:200;
0013 ylim = 10.^[-20,0];%max([lukedata.f{1}(:);lukedata_4.f{1}(:)])
0014 ytick = 10.^(-20:4:0);
0015 
0016 xlog = 1;
0017 xlim = 10.^[-3,2]; 
0018 xtick = 10.^(-3:2);
0019 
0020 % LUKE normalization
0021 n_luke = sum(lukedata.f{end}(:,end).'.*lukedata.fgrid.pn.^2.*lukedata.fgrid.dpn);
0022 n_luke_4 = sum(lukedata_4.f{end}(:,end).'.*lukedata_4.fgrid.pn.^2.*lukedata_4.fgrid.dpn);
0023 
0024 % pn grid for CODE
0025 
0026 pn_code = codedata.gridY*sqrt(2);                           
0027 pn_S_code = (pn_code(1:end-1) + pn_code(2:end))/2;
0028 dpn_code = diff([0,pn_S_code,pn_code(end)]);
0029 
0030 pn_code_4 = codedata_4.gridY*sqrt(2);                           
0031 pn_S_code_4 = (pn_code_4(1:end-1) + pn_code_4(2:end))/2;
0032 dpn_code_4 = diff([0,pn_S_code_4,pn_code_4(end)]);
0033 
0034 % CODE normalization
0035 n_code = sum(codedata.parallelDist.'.*pn_code.^2.*dpn_code);
0036 n_code_4 = sum(codedata_4.parallelDist.'.*pn_code_4.^2.*dpn_code_4);
0037 
0038 if c_opt,
0039     colors = {'r','b','r','b'};
0040     styles = {'-','--','-','--'};
0041     sizes = [2,2,0.5,0.5];
0042     colstr = '_col';
0043 else
0044     colors = {'k','k','k','k'};
0045     styles = {'-','--','-','--'};
0046     sizes = [2,2,0.5,0.5];
0047     colstr = '';
0048 end
0049 
0050 % PLOT
0051 figure(10),clf
0052 
0053 xlab = '$\mathcal{E}_k$ (MeV)';
0054 ylab = '$f(\mathcal{E}_k,\xi = 1)$';
0055 tit = '';
0056 leg = {'LUKE, Z_{eff} = 1','CODE, Z_{eff} = 1','LUKE, Z_{eff} = 4','CODE, Z_{eff} = 4'};%{'LUKE','CODE'};
0057 siz = 20+14i;
0058 
0059 graph1D_jd(lukedata.Ec,lukedata.f{end}(:,end),xlog,1,'','','',NaN,xlim,ylim,styles{1},'none',colors{1},sizes(1),siz,gca);
0060 graph1D_jd(codedata.gridMeV,codedata.parallelDist*n_luke/n_code,xlog,1,'','','',NaN,xlim,ylim,styles{2},'none',colors{2},sizes(2),siz,gca);
0061 graph1D_jd(lukedata_4.Ec,lukedata_4.f{end}(:,end),xlog,1,'','','',NaN,xlim,ylim,styles{3},'none',colors{3},sizes(3),siz,gca);
0062 graph1D_jd(codedata_4.gridMeV,codedata_4.parallelDist*n_luke_4/n_code_4,xlog,1,xlab,ylab,tit,leg,xlim,ylim,styles{4},'none',colors{4},sizes(4),siz,gca,0.9,0.7,0.7);
0063 
0064 set(gca,'xtick',xtick)
0065 set(gca,'ytick',ytick)
0066 
0067 set(gca,'YMinorGrid','off')
0068 set(gca,'YMinorTick','on')
0069 if xlog,
0070     set(gca,'XMinorGrid','off')
0071     set(gca,'XMinorTick','on')
0072 end
0073 set(get(gca,'xlabel'),'interpreter','latex')
0074 set(get(gca,'ylabel'),'interpreter','latex')
0075 
0076 print_jd(p_opt,['fig_luke_code',colstr],'figures/',10)

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.