0001 function fproc_HXR_timescan(basestr,file_str,shotnum,shotimes,id_simul_o,locpath_simul,it_disp,ic,krange,dtexp,HXRopt,cnumber,kdisp,p_opt,opt)
0002
0003 savepath = [basestr,filesep,shotnum,filesep];
0004 path_simul = [savepath,locpath_simul];
0005
0006 hxr_file = [savepath,'HXR_',basestr,'_',shotnum,'.mat'];
0007 if ~exist(hxr_file,'file'),
0008 get_hxrspec_forLUKE_jd(basestr,str2num(shotnum),savepath)
0009 end
0010
0011 exp_file = [savepath,'HXREXP_',basestr,'_',shotnum,'.mat'];
0012 if ~exist(exp_file,'file'),
0013 collect_hxr_forLUKE_jd(basestr,str2num(shotnum),HXRopt,savepath)
0014 end
0015
0016
0017
0018 equilbase = [file_str,basestr,'_',shotnum,'_'];
0019 [shotimes,isel] = select_shotimes_jd(equilbase,[id_simul_o,'.mat'],path_simul,shotimes);
0020 nt = length(shotimes);
0021
0022 icdisp = 1 + cnumber - ic(1);
0023
0024 nc = length(ic);
0025
0026
0027 dI_tot = NaN(1,nt);
0028 dI_exp = NaN(1,nt);
0029
0030
0031
0032
0033
0034 Tphplasma = NaN(nc,nt);
0035 Tphexp = NaN(nc,nt);
0036 Tphdiag = NaN(nc,nt);
0037 eTphplasma = NaN(nc,nt);
0038 eTphexp = NaN(nc,nt);
0039 eTphdiag = NaN(nc,nt);
0040 Aplasma = NaN(nc,nt);
0041 Aexp = NaN(nc,nt);
0042 Adiag = NaN(nc,nt);
0043 eAplasma = NaN(nc,nt);
0044 eAexp = NaN(nc,nt);
0045 eAdiag = NaN(nc,nt);
0046 Qplasma = NaN(nc,nt);
0047 Qexp = NaN(nc,nt);
0048 Qdiag = NaN(nc,nt);
0049
0050
0051
0052
0053 dvarplasma = NaN(1,nt);
0054 dvardiag = NaN(1,nt);
0055
0056 icpeak = NaN(1,nt);
0057
0058 for it = 1:nt,
0059
0060 shotime = shotimes{it};
0061 ttimes(it) = str2num(shotime);
0062
0063 id_equil = [equilbase,shotime];
0064
0065 id_simul = [id_equil,id_simul_o];
0066
0067 texp = [ttimes(it) - dtexp/2,ttimes(it) + dtexp/2];
0068
0069 [hxr_proc,hxr,data_proc] = fproc_hxr(basestr,path_simul,id_simul,hxr_file,exp_file,texp,ic,krange,opt);
0070
0071 if isempty(hxr_proc),
0072 if exist('dNdtplasma','var'),
0073 dNdtplasma(:,:,it) = NaN;
0074 dNdtdiag(:,:,it) = NaN;
0075 end
0076
0077 continue
0078 end
0079
0080 dI_tot(it) = data_proc.scalar.I_tot;
0081 dI_exp(it) = data_proc.scalar.I_exp;
0082
0083 dJ(:,it) = data_proc.radial.J_tot.';
0084
0085 if opt.rho == 'g',
0086 dxrho(:,it) = data_proc.radial.xrhoG.';
0087 elseif opt.rho == 'p',
0088 dxrho(:,it) = data_proc.radial.xrhoP.';
0089 elseif opt.rho == 't',
0090 dxrho(:,it) = data_proc.radial.xrhoT.';
0091 elseif opt.rho == 'v',
0092 dxrho(:,it) = data_proc.radial.xrhoV.';
0093 else
0094 error('rho type not recognized')
0095 end
0096
0097
0098
0099 Tphplasma(:,it) = hxr_proc.Tphplasma;
0100 Tphdiag(:,it) = hxr_proc.Tphdiag;
0101 Aplasma(:,it) = hxr_proc.Aplasma;
0102 Adiag(:,it) = hxr_proc.Adiag;
0103 eAplasma(:,it) = hxr_proc.eAplasma;
0104 eAdiag(:,it) = hxr_proc.eAdiag;
0105 Qplasma(:,it) = hxr_proc.Qplasma;
0106 Qdiag(:,it) = hxr_proc.Qdiag;
0107 eTphplasma(:,it) = hxr_proc.eTphplasma;
0108 eTphdiag(:,it) = hxr_proc.eTphdiag;
0109
0110 dvarplasma(it) = hxr_proc.dvarplasma;
0111 dvardiag(it) = hxr_proc.dvardiag;
0112
0113 icpeak(it) = hxr_proc.icpeak;
0114
0115 ik = hxr_proc.ik;
0116
0117 dNdtplasma(:,:,it) = hxr_proc.dNdtplasma(ik,ic);
0118 dNdtdiag(:,:,it) = hxr_proc.dNdtdiag(ik,ic);
0119
0120
0121
0122 k(:,it) = hxr_proc.k(ik);
0123
0124
0125 Tphexp(:,it) = hxr_proc.Tphexp;
0126 eTphexp(:,it) = hxr_proc.eTphexp;
0127 Aexp(:,it) = hxr_proc.Aexp;
0128 eAexp(:,it) = hxr_proc.eAexp;
0129 Qexp(:,it) = hxr_proc.Qexp;
0130
0131 dNdtexp(:,:,it) = hxr_proc.dNdtexp(ik,ic);
0132
0133
0134 end
0135
0136 dt = 0.016;
0137
0138 if ~all(all(k == repmat(k(:,1),[1,nt]))),
0139 error('verify energy list')
0140 else
0141 k = k(:,1);
0142 end
0143
0144 nk = length(k);
0145 ikdisp = find(k == mean(kdisp));
0146
0147 dNdtdiag_disp = reshape(dNdtdiag(:,icdisp,:),[nk,nt]).';
0148 dNdtplasma_disp = reshape(dNdtplasma(:,icdisp,:),[nk,nt]).';
0149 dNdtexp_disp = reshape(dNdtexp(:,icdisp,:),[nk,nt]).';
0150
0151 sdNdtdiag = reshape(sum(dNdtdiag,1),[nc,nt]);
0152 sdNdtplasma = reshape(sum(dNdtplasma,1),[nc,nt]);
0153 sdNdtexp = reshape(sum(dNdtexp,1),[nc,nt]);
0154
0155 ndNdtdiag = sdNdtdiag./repmat(sdNdtdiag(icdisp,:),[nc,1]);
0156 ndNdtplasma = sdNdtplasma./repmat(sdNdtplasma(icdisp,:),[nc,1]);
0157 ndNdtexp = sdNdtexp./repmat(sdNdtexp(icdisp,:),[nc,1]);
0158
0159 endNdtdiag = sqrt(sdNdtdiag/dt)./repmat(sdNdtdiag(icdisp,:),[nc,1]);
0160 endNdtplasma = sqrt(sdNdtplasma/dt)./repmat(sdNdtplasma(icdisp,:),[nc,1]);
0161 endNdtexp = sqrt(sdNdtexp/dt)./repmat(sdNdtexp(icdisp,:),[nc,1]);
0162
0163 style0 = 'none';
0164 style = '-';
0165 style2 = '--';
0166 marker = 'none';
0167 marker1 = '+';
0168 marker2 = 'o';
0169 marker3 = 's';
0170 marker4 = '.';
0171 markers = {marker1,marker2,marker3};
0172 color = NaN;
0173 color1 = 'k';
0174 color2 = 'r';
0175 color3 = 'b';
0176 color4 = 'g';
0177 color5 = 'm';
0178 color6 = 'c';
0179 colors = {color2,color3,color4,color5};
0180
0181 width = 0.5;
0182 width2 = 2;
0183 siz = 20+14*1i;
0184
0185 red = 0.9;
0186 lspace = 0.7;
0187 lspace2 = 0.5;
0188 bspace = 0.7;
0189 bspace2 = 0.6;
0190
0191 xlab_ic = 'chord #';
0192 xlim_ic = [min(ic),max(ic)];
0193 xtick_ic = 0:5:60;
0194
0195 ncol = length(colors);
0196
0197 chordstr = ['chord # ',num2str(cnumber)];
0198 timestr = '';
0199 for it = 1:length(it_disp),
0200 timestr = [timestr,'t = ',shotimes{it_disp(it)},' (',colors{rem(it,ncol)},'); '];
0201 end
0202 kstr = ['k = ',num2str(kdisp(1)),'-',num2str(kdisp(2)),' keV'];
0203
0204 kmin = min(k);
0205 kmax = max(k);
0206
0207 krangestr = ['k = ',num2str(kmin),' - ',num2str(kmax),' keV'];
0208
0209 if opt.xdisp == 0,
0210 x = ttimes;
0211 xlab = 't (s)';
0212 else
0213 [nvol,tn]=tsbase(str2double(shotnum),'sprofnmoy');
0214 if isempty(nvol),
0215 [nvol,tn]=tsbase(str2double(shotnum),'snmoy');
0216 nvol = nvol/1e19;
0217 end
0218 x = interp1(tn,nvol,ttimes);
0219 xlab = 'volumic density (\times 10^{19} m^{-3})';
0220 end
0221
0222 if isfield(opt,'xlim'),
0223 xlim = opt.xlim;
0224 else
0225 xlim = [fix(x(1)),ceil(x(end))];
0226 end
0227
0228 if isfield(opt,'xtick'),
0229 xtick = opt.xtick;
0230 else
0231 xtick = xlim(1):ceil(diff(xlim)/5):xlim(2);
0232 end
0233
0234 if isfield(opt,'icrej_exp') && ~isempty(opt.icrej_exp),
0235 maskic_exp = ~any(repmat(ic,[length(opt.icrej_exp),1]) == repmat(opt.icrej_exp.',[1,length(ic)]),1);
0236 else
0237 maskic_exp = 1:nc;
0238 end
0239
0240
0241
0242 ifig = 1;figure(ifig),clf,set(ifig,'Name','Current')
0243
0244 ylab = 'Current (kA)';
0245 tit = '';
0246 if isfield(opt,'ylim_I'),
0247 ylim = opt.ylim_I;
0248 else
0249 ylim = 1e3*[0,max([dI_tot,dI_exp])]*1.2;
0250 end
0251
0252 leg = {'LUKE'};
0253
0254 if ~all(isnan(dI_exp)) && (~isfield(opt,'I_exp') || opt.I_exp == 1),
0255 graph1D_jd(x,dI_exp*1e3,0,0,'','','',NaN,xlim,ylim,style,marker,color1,width2,siz);
0256 leg = ['Exp.',leg];
0257 end
0258 graph1D_jd(x,dI_tot*1e3,0,0,xlab,ylab,tit,leg,xlim,ylim,style,marker2,color2,width2,siz,gca,red,lspace,bspace);
0259
0260 set(gca,'xtick',xtick);
0261
0262
0263
0264 print_jd(p_opt,['Fig_I_tot',id_simul_o],[savepath,'figures/'],ifig);
0265
0266
0267
0268 ifig = 2;figure(ifig),clf,set(ifig,'Name','TPH2D')
0269
0270 ylab = 'Photon Temperature (keV)';
0271 tit = timestr;
0272
0273 ylim = [0,60];
0274
0275
0276 leg = {'LUKE'};
0277
0278 if ~all(isnan(Tphexp(:,it_disp(1)))),
0279 if length(it_disp) > 1,
0280 localcol = colors{rem(1,ncol)};
0281 localwidth = width;
0282 else
0283 localcol = color1;
0284 localwidth = width2;
0285 end
0286 graph1D_jd(ic(maskic_exp),Tphexp(maskic_exp,it_disp(1)),0,0,'','','',NaN,xlim_ic,ylim,style,marker,localcol,localwidth,siz,gca,1,lspace,bspace2,eTphexp(maskic_exp,1));
0287 leg = ['Exp.',leg];
0288 end
0289
0290 graph1D_jd(ic,Tphdiag(:,it_disp(1)),0,0,xlab_ic,ylab,tit,leg,xlim_ic,ylim,style,marker3,colors{rem(1,ncol)},width2,siz,gca,red,lspace,bspace2,eTphdiag(:,1));
0291 for it = 2:length(it_disp),
0292
0293 graph1D_jd(ic,Tphdiag(:,it_disp(it)),0,0,'','','',NaN,xlim_ic,ylim,style,marker3,colors{rem(it,ncol)},width2,siz,gca,1,lspace,bspace2,eTphdiag(:,it));
0294 if ~all(isnan(Tphexp(:,it_disp(it)))),
0295 graph1D_jd(ic(maskic_exp),Tphexp(maskic_exp,it_disp(it)),0,0,'','','',NaN,xlim_ic,ylim,style,marker,colors{rem(it,ncol)},width,siz,gca,1,lspace,bspace2,eTphexp(maskic_exp,it));
0296 end
0297 end
0298
0299 set(gca,'xtick',xtick_ic);
0300
0301
0302 print_jd(p_opt,['Fig_TPH_2D',id_simul_o],[savepath,'figures/'],ifig);
0303
0304
0305
0306 ifig = 3;figure(ifig),clf,set(ifig,'Name','TPH1D')
0307
0308 ylab = 'Photon Temperature (keV)';
0309 tit = chordstr;
0310
0311 ylim = [0,max([Tphplasma(icdisp,:),Tphdiag(icdisp,:),Tphexp(icdisp,:)])]*1.2;
0312
0313
0314 leg = {'LUKE'};
0315
0316 if ~all(isnan(Tphexp(icdisp,:))),
0317 graph1D_jd(x,Tphexp(icdisp,:),0,0,'','','',NaN,xlim,ylim,style,marker,color1,width2,siz,gca,1,lspace,bspace2,eTphexp(icdisp,:));
0318 leg = ['Exp.',leg];
0319 end
0320
0321 graph1D_jd(x,Tphdiag(icdisp,:),0,0,xlab,ylab,tit,leg,xlim,ylim,style,marker2,color2,width2,siz,gca,red,lspace,bspace2,eTphdiag(icdisp,:));
0322
0323 set(gca,'xtick',xtick);
0324
0325
0326 print_jd(p_opt,['Fig_TPH_1D_ic',num2str(cnumber),id_simul_o],[savepath,'figures/'],ifig);
0327
0328
0329
0330 ifig = 4;figure(ifig),clf,set(ifig,'Name','CR 1D Total')
0331
0332 ylab = ['Count rate (s^{-1})'];
0333 tit = [chordstr,'; ',krangestr];
0334
0335 if isfield(opt,'ylim_CR1D_tot'),
0336 ylim = opt.ylim_CR1D_tot;
0337 else
0338 ylim = 10.^[3,5];
0339 end
0340
0341
0342 leg = {'LUKE'};
0343
0344 if ~all(isnan(dNdtexp(1,icdisp,:))),
0345 graph1D_jd(x,sdNdtexp(icdisp,:),0,1,'','','',NaN,xlim,ylim,style,marker,color1,width2,siz,gca,1,lspace,bspace2,sqrt(dNdtdiag_disp(:,1)/dt));
0346 leg = ['Exp.',leg];
0347 end
0348
0349 graph1D_jd(x,sdNdtdiag(icdisp,:),0,1,xlab,ylab,tit,leg,xlim,ylim,style,marker3,color2,width2,siz,gca,red,lspace,bspace2,sqrt(dNdtdiag_disp(:,1)/dt));
0350
0351 set(gca,'xtick',xtick);
0352
0353
0354 print_jd(p_opt,['Fig_CR_1D_tot_ic',num2str(cnumber),id_simul_o],[savepath,'figures/'],ifig);
0355
0356
0357
0358 ifig = 5;figure(ifig),clf,set(ifig,'Name','CR 1D Selected')
0359
0360 ylab = ['Count rate (s^{-1})'];
0361 tit = [chordstr,'; ',kstr];
0362
0363 if isfield(opt,'ylim_CR1D_sel'),
0364 ylim = opt.ylim_CR1D_sel;
0365 else
0366 ylim = 10.^[3,5];
0367 end
0368
0369
0370 leg = {'LUKE'};
0371
0372 if ~all(isnan(dNdtexp(1,icdisp,:))),
0373
0374 graph1D_jd(x,dNdtexp_disp(:,ikdisp),0,1,'','','',NaN,xlim,ylim,style,marker,color1,width2,siz,gca,1,lspace,bspace2,sqrt(dNdtdiag_disp(:,1)/dt));
0375 leg = ['Exp.',leg];
0376 end
0377
0378
0379
0380 graph1D_jd(x,dNdtdiag_disp(:,ikdisp),0,1,xlab,ylab,tit,leg,xlim,ylim,style,marker3,color2,width2,siz,gca,red,lspace,bspace2,sqrt(dNdtdiag_disp(:,1)/dt));
0381
0382
0383
0384
0385
0386
0387
0388
0389 set(gca,'xtick',xtick);
0390
0391
0392 print_jd(p_opt,['Fig_CR_1D_ic',num2str(cnumber),id_simul_o],[savepath,'figures/'],ifig);
0393
0394
0395
0396
0397 ifig = 6;figure(ifig),clf,set(ifig,'Name','CR 2D')
0398
0399 xlab = 'Chord #';
0400 ylab = ['Count rate (s^{-1}); ',krangestr];
0401 tit = timestr;
0402
0403 ylim = [0,max(max([sdNdtdiag;sdNdtexp(maskic_exp,:)]))]*1.2;
0404
0405
0406 leg = {'LUKE'};
0407
0408 if ~all(isnan(sdNdtexp(:,it_disp(1)))),
0409 if length(it_disp) > 1,
0410 localcol = colors{rem(1,ncol)};
0411 localwidth = width;
0412 else
0413 localcol = color1;
0414 localwidth = width2;
0415 end
0416 graph1D_jd(ic(maskic_exp),sdNdtexp(maskic_exp,it_disp(1)),0,0,'','','',NaN,xlim_ic,ylim,style,marker,localcol,localwidth,siz,gca,1,lspace,bspace2,sqrt(sdNdtexp(maskic_exp,1)/dt));
0417 leg = ['Exp.',leg];
0418 end
0419
0420 graph1D_jd(ic,sdNdtdiag(:,it_disp(1)),0,0,xlab_ic,ylab,tit,leg,xlim_ic,ylim,style,marker3,colors{rem(1,ncol)},width2,siz,gca,red,lspace,bspace2,sqrt(sdNdtdiag(:,1)/dt));
0421 for it = 2:length(it_disp),
0422
0423 graph1D_jd(ic,sdNdtdiag(:,it_disp(it)),0,0,'','','',NaN,xlim_ic,ylim,style,marker3,colors{rem(it,ncol)},width2,siz,gca,1,lspace,bspace2,sqrt(sdNdtdiag(:,it)/dt));
0424 if ~all(isnan(sdNdtexp(:,it_disp(it)))),
0425 graph1D_jd(ic(maskic_exp),sdNdtexp(maskic_exp,it_disp(it)),0,0,'','','',NaN,xlim_ic,ylim,style,marker,colors{rem(it,ncol)},width2,siz,gca,1,lspace,bspace2,sqrt(sdNdtexp(maskic_exp,it)/dt));
0426 end
0427 end
0428
0429 set(gca,'xtick',xtick_ic);
0430
0431
0432 print_jd(p_opt,['Fig_CR_2D',id_simul_o],[savepath,'figures/'],ifig);
0433
0434
0435 ifig = 7;figure(ifig),clf,set(ifig,'Name','CR 2D norm')
0436
0437 xlab = 'Chord #';
0438 ylab = ['Normalized Count rate; ',krangestr];
0439 tit = timestr;
0440
0441 ylim = [0,1.4];
0442 ytick = 0:0.2:1.4;
0443
0444 leg = {'LUKE'};
0445
0446 if ~all(isnan(sdNdtexp(:,it_disp(1)))),
0447 if length(it_disp) > 1,
0448 localcol = colors{rem(1,ncol)};
0449 localwidth = width;
0450 else
0451 localcol = color1;
0452 localwidth = width2;
0453 end
0454 graph1D_jd(ic(maskic_exp),ndNdtexp(maskic_exp,it_disp(1)),0,0,'','','',NaN,xlim_ic,ylim,style,marker,localcol,localwidth,siz,gca,1,lspace,bspace2,endNdtexp(maskic_exp,1));
0455 leg = ['Exp.',leg];
0456 end
0457
0458 graph1D_jd(ic,ndNdtdiag(:,it_disp(1)),0,0,xlab_ic,ylab,tit,leg,xlim_ic,ylim,style,marker3,colors{rem(1,ncol)},width2,siz,gca,red,lspace,bspace2,endNdtdiag(:,1));
0459 for it = 2:length(it_disp),
0460
0461 graph1D_jd(ic,ndNdtdiag(:,it_disp(it)),0,0,'','','',NaN,xlim_ic,ylim,style,marker3,colors{rem(it,ncol)},width2,siz,gca,1,lspace,bspace2,endNdtdiag(:,it));
0462 if ~all(isnan(sdNdtexp(:,it_disp(it)))),
0463 graph1D_jd(ic(maskic_exp),ndNdtexp(maskic_exp,it_disp(it)),0,0,'','','',NaN,xlim_ic,ylim,style,marker,colors{rem(it,ncol)},width2,siz,gca,1,lspace,bspace2,endNdtexp(maskic_exp,it));
0464 end
0465 end
0466
0467 set(gca,'xtick',xtick_ic);
0468 set(gca,'ytick',ytick);
0469
0470 print_jd(p_opt,['Fig_CR_2D_norm',id_simul_o],[savepath,'figures/'],ifig);
0471
0472
0473 return
0474
0475 ifig = 7;figure(ifig),clf,set(ifig,'Name','Current profiles')
0476
0477 xlab = '\rho';
0478 ylab = 'J - J_{\Omega} (MA/m^2)';
0479 tit = '';
0480
0481 xlim = [0,1];
0482 ylim = NaN;
0483 xtick = 0:0.2:1;
0484
0485
0486 leg = {};
0487
0488 for ivar = 1:length(var_disp),
0489 ivardisp = find(abs(var_list - var_disp(ivar)) < 10*eps);
0490
0491 if isempty(ivardisp),
0492 continue
0493 end
0494
0495 graph1D_jd(dxrho(:,ivardisp),dJ(:,ivardisp).' - J_ohm,0,0,'','','',NaN,xlim,ylim,...
0496 style,markers{ivar},colors{ivar},width2,siz);
0497
0498 leg = [leg,['D_0 = ',num2str(var_disp(ivar)),' m^2/s']];
0499
0500 end
0501
0502 Jfac = max(dJ(:,3).' - J_ohm);
0503 leg = [leg,'Exp.'];
0504 graph1D_jd(xrho_exp,J_exp*Jfac,0,0,xlab,ylab,tit,leg,xlim,ylim,style,marker,color1,width2,siz,gca,red,lspace,bspace);
0505
0506 set(gca,'xtick',xtick);
0507
0508
0509 print_jd(p_opt,['Fig_Jcomp_',id_simul_0],[path_simul,'figures/'],ifig);
0510
0511
0512
0513 figure(7),clf,set(7,'Name','Selected Count rate')
0514
0515 xlim = [min(ic)-1,max(ic)+1];
0516 ylab = ['Count rate (s^{-1}) [',num2str(kmin),' - ',num2str(kmax),' keV]'];
0517 ylim = NaN;
0518
0519
0520 leg = {};
0521
0522 for ivar = 1:length(var_disp),
0523 ivardisp = find(abs(var_list - var_disp(ivar)) < 10*eps);
0524
0525 if isempty(ivardisp),
0526 continue
0527 end
0528
0529 sdNdtdiag_disp = sdNdtdiag(:,ivardisp);
0530
0531 graph1D_jd(ic,sdNdtdiag_disp,0,0,'','','',NaN,xlim,ylim,...
0532 style,markers{ivar},colors{ivar},width2,siz,gca,1,lspace,bspace,sqrt(sdNdtdiag_disp/dt));
0533
0534 leg = [leg,['D_0 = ',num2str(var_disp(ivar)),' m^2/s']];
0535
0536 end
0537
0538 set(gca,'xtick',xtick_ic);
0539
0540
0541
0542 leg = [leg,'Exp.'];
0543
0544 graph1D_jd(ic,sdNdtexp,0,0,xlab,ylab,tit,leg,xlim,ylim,...
0545 style,marker,color1,width2,siz,gca,red,lspace,bspace,sqrt(sdNdtexp/dt));
0546
0547
0548
0549
0550
0551
0552
0553
0554
0555
0556
0557
0558
0559
0560
0561 print_jd(p_opt,['Fig_select_countrate_',num2str(vmindisp),'_',id_simul_0],[path_simul,'figures/'],7);
0562
0563
0564
0565 figure(8),clf,set(8,'Name','Selected Norm Count rate')
0566
0567 xlim = [min(ic)-1,max(ic)+1];
0568 ylab = ['Normalized Count rate [',num2str(kmin),' - ',num2str(kmax),' keV]'];
0569 ylim = [0,1.4];
0570 ytick = 0:0.2:1.4;
0571
0572 leg = {};
0573
0574 for ivar = 1:length(var_disp),
0575 ivardisp = find(abs(var_list - var_disp(ivar)) < 10*eps);
0576
0577 if isempty(ivardisp),
0578 continue
0579 end
0580
0581 ndNdtdiag_disp = ndNdtdiag(:,ivardisp);
0582 endNdtdiag_disp = endNdtdiag(:,ivardisp);
0583
0584 graph1D_jd(ic,ndNdtdiag_disp,0,0,'','','',NaN,xlim,ylim,...
0585 style,markers{ivar},colors{ivar},width2,siz,gca,1,lspace,bspace,endNdtdiag_disp);
0586
0587 leg = [leg,['D_0 = ',num2str(var_disp(ivar)),' m^2/s']];
0588
0589 end
0590
0591 set(gca,'xtick',xtick_ic);
0592 set(gca,'ytick',ytick);
0593
0594
0595 leg = [leg,'Exp.'];
0596
0597 graph1D_jd(ic,ndNdtexp,0,0,xlab,ylab,tit,leg,xlim,ylim,...
0598 style,marker,color1,width2,siz,gca,red,lspace,bspace,endNdtexp);
0599
0600
0601
0602
0603
0604
0605
0606
0607
0608
0609
0610
0611
0612
0613
0614
0615 print_jd(p_opt,['Fig_select_norm_countrate_',num2str(vmindisp),'_',id_simul_0],[path_simul,'figures/'],8);
0616
0617
0618 figure(9),clf,set(9,'Name','TPH_chord')
0619
0620 kmin = min(k);
0621
0622 xlab = 'Chord #';
0623 ylab = ['Photon temperature (keV)'];
0624 tit = '';
0625
0626 xlim = [min(ic)-1,max(ic)+1];
0627 ylim = NaN;
0628
0629
0630 leg = {};
0631
0632
0633
0634
0635
0636
0637
0638
0639
0640
0641
0642
0643
0644
0645
0646
0647
0648 set(gca,'xtick',xtick_ic);
0649
0650
0651 leg = [leg,'Exp.'];
0652
0653 maskexp = (1 - Qexp < 1e-2) & (Tphexp > eTphexp);
0654
0655 graph1D_jd(ic(maskexp),Tphexp(maskexp),0,0,xlab,ylab,tit,leg,xlim,ylim,...
0656 style,marker,color1,width2,siz,gca,red,lspace,bspace,eTphexp(maskexp));
0657
0658
0659
0660
0661
0662
0663
0664
0665
0666
0667
0668
0669
0670
0671
0672
0673
0674 print_jd(p_opt,['Fig_1D_tph_chord_',num2str(vmindisp),'_',id_simul_0],[path_simul,'figures/'],9);
0675
0676
0677 figure(10),clf,set(10,'Name','Exp prof')
0678
0679 ylim = [0,1.2];
0680 ytick = 0:0.2:1.2;
0681
0682 Nnorm = dNdtexp.'./repmat(max(dNdtexp.'),[nc,1]);
0683 eNnorm = sqrt(dNdtexp.'/dt)./repmat(max(dNdtexp.'),[nc,1]);
0684
0685 leg = {};
0686 for iik = 1:length(k),
0687 leg{iik} = ['k = ',num2str(k(iik)),' keV'];
0688 end
0689
0690 graph1D_jd(repmat(ic.',[1,length(k)]),Nnorm,0,0,xlab,ylab,tit,leg,xlim,ylim,...
0691 style,marker,color,width2,siz,gca,red,lspace,bspace,eNnorm);
0692
0693 set(gca,'xtick',xtick_ic);
0694 set(gca,'ytick',ytick);
0695
0696 print_jd(p_opt,['Fig_countrate_exp_',num2str(vmindisp),'_',id_simul_0],[path_simul,'figures/'],10);
0697
0698
0699
0700
0701
0702
0703
0704
0705
0706
0707
0708
0709
0710
0711
0712
0713
0714
0715
0716
0717
0718
0719
0720
0721
0722
0723
0724
0725
0726
0727
0728
0729
0730
0731
0732
0733
0734
0735
0736
0737
0738
0739
0740
0741
0742
0743
0744
0745
0746
0747
0748
0749
0750
0751
0752
0753
0754
0755
0756
0757
0758
0759
0760
0761
0762
0763
0764
0765
0766
0767
0768
0769
0770
0771
0772
0773
0774
0775