fproc_runaway_time

PURPOSE ^

SYNOPSIS ^

function aftime = fproc_runaway_time(alpha_list,frac_list,tn,trfrac,mksa,method,id_simul,p_opt,ylim,ytick,ylimsec,yticksec,ialpha_disp)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function aftime = fproc_runaway_time(alpha_list,frac_list,tn,trfrac,mksa,method,id_simul,p_opt,ylim,ytick,ylimsec,yticksec,ialpha_disp)
0002 %
0003 nalpha = length(alpha_list);
0004 nfrac = length(frac_list);
0005 %
0006 aftime = NaN(nalpha,nfrac);
0007 for ifrac = 1:nfrac,
0008     for ialpha = 1:nalpha,
0009         mask = ~isnan(trfrac(:,ialpha)) & ~isinf(trfrac(:,ialpha)) & diff([0;trfrac(:,ialpha)]) > 0;
0010         if sum(mask) < 2,
0011             continue
0012         else
0013             aftime(ialpha,ifrac) = interp1(trfrac(mask,ialpha),tn(mask),frac_list(ifrac),method);
0014         end
0015     end
0016 end
0017 %
0018 figure(1),clf
0019 %
0020 xlab = 'E/E_c';
0021 ylab = 't/\tau_c';
0022 xlim = [0,max(alpha_list)];
0023 tit = '';
0024 siz = 20+14i;
0025 colors = {'b',[0,0.5,0],'r'};
0026 %
0027 for ifrac = 1:nfrac-1,
0028     graph1D_jd(alpha_list,aftime(:,ifrac),0,1,'','','',NaN,xlim,ylim,'-','none',colors{1+rem(ifrac,length(colors))},0.5,siz);
0029     if ~isnan(ialpha_disp),
0030         text(alpha_list(ialpha_disp),aftime(ialpha_disp,ifrac),['n_r/n = 10^{',num2str(log10(frac_list(ifrac))),'}'],'fontsize',14);
0031     end
0032 end
0033 graph1D_jd(alpha_list,aftime(:,nfrac),0,1,xlab,ylab,tit,NaN,xlim,ylim,'-','none',colors{1+rem(nfrac,length(colors))},0.5,siz,gca,0.9,0.7,0.7);
0034 if ~isnan(ialpha_disp),
0035     text(alpha_list(ialpha_disp),aftime(ialpha_disp,nfrac),['n_r/n = 10^{',num2str(log10(frac_list(nfrac))),'}'],'fontsize',14);
0036 end
0037 %
0038 if ~isnan(ytick),
0039     set(gca,'ytick',ytick)
0040 end
0041 set(gca,'YMinorGrid','off')
0042 set(gca,'YMinorTick','on')
0043 %
0044 figure(2),clf
0045 %
0046 xlab = 'E/E_c';
0047 ylab = 't (s)';
0048 xlim = [0,max(alpha_list)];
0049 tit = '';
0050 siz = 20+14i;
0051 colors = {'b',[0,0.5,0],'r'};
0052 %
0053 aftimesec = aftime/mksa.nhu_ref;
0054 %
0055 for ifrac = 1:nfrac-1,
0056     graph1D_jd(alpha_list,aftimesec(:,ifrac),0,1,'','','',NaN,xlim,ylimsec,'-','none',colors{1+rem(ifrac,length(colors))},0.5,siz);
0057     if ~isnan(ialpha_disp),
0058         text(alpha_list(ialpha_disp),aftimesec(ialpha_disp,ifrac),['n_r/n = 10^{',num2str(log10(frac_list(ifrac))),'}'],'fontsize',14);
0059     end
0060 end
0061 graph1D_jd(alpha_list,aftimesec(:,nfrac),0,1,xlab,ylab,tit,NaN,xlim,ylimsec,'-','none',colors{1+rem(nfrac,length(colors))},0.5,siz,gca,0.9,0.7,0.7);
0062 if ~isnan(ialpha_disp),
0063     text(alpha_list(ialpha_disp),aftimesec(ialpha_disp,nfrac),['n_r/n = 10^{',num2str(log10(frac_list(nfrac))),'}'],'fontsize',14);
0064 end
0065 %
0066 if ~isnan(yticksec),
0067     set(gca,'ytick',yticksec)
0068 end
0069 set(gca,'YMinorGrid','off')
0070 set(gca,'YMinorTick','on')
0071 %
0072 print_jd(p_opt,['fig_',id_simul,'_norm'],'./figures',1)
0073 print_jd(p_opt,['fig_',id_simul,'_sec'],'./figures',2)
0074 %

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