0001 function fproc_fluctn_scan(p_opt,id_equil,id_fluct,locid_simul,id_wave,sigmar_max,sigmar_hwhm,Nfluct,tn,dtn,Zfluct_ref)
0002
0003 if length(Nfluct) > 1,
0004 scanlist = Nfluct;
0005 scanvar = 'Nfluct';
0006 xlab = 'N';
0007 logx = 1;
0008 elseif length(sigmar_max) > 1,
0009 scanlist = sigmar_max;
0010 scanvar = 'sigmar_max';
0011 xlab = 'sigma';
0012 logx = 0;
0013 end
0014
0015 id_simul0 = [id_equil,'_',id_wave,'_',id_fluct,locid_simul];
0016
0017 nscan = length(scanlist);
0018
0019 fwhm = 2*sqrt(2*log(2));
0020
0021
0022 I_totm = NaN(1,nscan);
0023
0024 for iscan = 1:nscan,
0025
0026 eval([scanvar,' = ',num2str(scanlist(iscan)),';']);
0027
0028 id_simul = [id_simul0,'_sigma',num2str(sigmar_max),'_delta',num2str(sigmar_hwhm),'_dtn',num2str(dtn),'_tn',num2str(tn),'_Nfluct',num2str(Nfluct)];
0029 id_simul(id_simul == '.') = 'p';
0030 id_simul(id_simul == '+') = 'p';
0031
0032 filename = ['backup_',id_simul,'.mat'];
0033
0034 if exist(filename,'file'),
0035
0036 Zfluct = fproc_fluctn_jd(filename);
0037
0038 I_totm(iscan) = Zfluct.J.sI_totm(end);
0039 sI_tot(iscan) = Zfluct.J.ssI_tot(end);
0040 rI_totm(iscan) = Zfluct.J.srI_totm(end);
0041
0042 rhom(iscan) = Zfluct.J.srhom(end);
0043 srho(iscan) = Zfluct.J.ssrho(end);
0044 rrhom(iscan) = Zfluct.J.srrhom(end);
0045
0046 drhom(iscan) = Zfluct.J.sdrhom(end);
0047 sdrho(iscan) = Zfluct.J.ssdrho(end);
0048 rdrhom(iscan) = Zfluct.J.srdrhom(end);
0049 mdrho(iscan) = Zfluct.J.smdrho(end);
0050
0051 wavestime(iscan) = sum(Zfluct.calctime.waves);
0052 luketime(iscan) = sum(Zfluct.calctime.luke);
0053
0054 else
0055 end
0056 end
0057
0058
0059
0060
0061 figure(1),clf
0062
0063 xlim = NaN;
0064 ylim = NaN;
0065 ylab = '<I> (MA)';
0066 tit = '';
0067 leg = {'With fluct.'};
0068
0069
0070 graph1D_jd(scanlist,I_totm,logx,0,xlab,ylab,tit,NaN,xlim,ylim,'-','+','r',2,20+14i,gca,0.9,0.7,0.7,sI_tot);
0071 if ~isempty(Zfluct_ref),
0072 leg = [leg,'No fluct.'];
0073 graph1D_jd(get(gca,'xlim'),Zfluct_ref.J.sI_tot*[1,1],logx,0,'','','',leg,xlim,ylim,'-','none','k',0.5,20+14i);
0074 end
0075
0076
0077
0078 figure(2),clf
0079
0080 ylab = 'r/a';
0081 tit = 'current deposition';
0082
0083 graph1D_jd(scanlist,rhom,logx,0,xlab,ylab,tit,NaN,xlim,ylim,'-','+','r',2,20+14i,gca,0.9,0.7,0.7,srho);
0084 if ~isempty(Zfluct_ref),
0085 graph1D_jd(get(gca,'xlim'),Zfluct_ref.J.srho*[1,1],logx,0,'','','',leg,xlim,ylim,'-','none','k',0.5,20+14i);
0086 end
0087
0088
0089
0090 figure(3),clf
0091
0092 ylab = 'FWHM';
0093 leg_loc = [leg,'\sigma_{\rho}','(\sigma_{\rho}^2 + FWHM^2)^{(1/2)}','From av. profile'];
0094
0095 graph1D_jd(scanlist,drhom,logx,0,xlab,ylab,tit,NaN,xlim,ylim,'-','+','r',2,20+14i,gca,0.9,0.7,0.7,sdrho);
0096 if ~isempty(Zfluct_ref),
0097 graph1D_jd(get(gca,'xlim'),Zfluct_ref.J.sdrho*[1,1],logx,0,'','','',NaN,xlim,ylim,'-','none','k',0.5,20+14i);
0098 end
0099 graph1D_jd(scanlist,fwhm*srho,logx,0,'','','',NaN,xlim,ylim,'--','+','m',2,20+14i);
0100 graph1D_jd(scanlist,sqrt((fwhm*srho).^2 + drhom.^2),logx,0,'','','',NaN,xlim,ylim,'--','o','c',2,20+14i);
0101 graph1D_jd(scanlist,mdrho,logx,0,'','','',leg_loc,xlim,ylim,'--','*','g',2,20+14i);
0102
0103
0104
0105 figure(4),clf
0106
0107 xlim = NaN;
0108 xlab = 'N';
0109 ylim = NaN;
0110 ylab = 't (s)';
0111 tit = '';
0112 leg = {'C3PO','LUKE','TOTAL'};
0113
0114 graph1D_jd(scanlist,wavestime,logx,0,xlab,ylab,tit,NaN,xlim,ylim,'-','+','r',2,20+14i,gca,0.9,0.7,0.7);
0115 graph1D_jd(scanlist,luketime,logx,0,'','','',NaN,xlim,ylim,'-','+','b',2,20+14i);
0116 graph1D_jd(scanlist,wavestime + luketime,logx,0,'','','',leg,xlim,ylim,'-','+','m',2,20+14i);
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170