bremdiagdisplay_dke_yp

PURPOSE ^

SYNOPSIS ^

function [] = bremdiagdisplay_dke_yp(hxr,Zbremchord,Zbremplasma,Zbremdiag,chord_display,kphot_display,p_opt,filename,hxrexp);

DESCRIPTION ^

 This function draws local properties of the plasma bremsstrahlung

 by J. Decker (joan.decker@cea.fr) and Y. Peysson (yves.peysson@cea.fr)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [] = bremdiagdisplay_dke_yp(hxr,Zbremchord,Zbremplasma,Zbremdiag,chord_display,kphot_display,p_opt,filename,hxrexp);
0002 %
0003 % This function draws local properties of the plasma bremsstrahlung
0004 %
0005 % by J. Decker (joan.decker@cea.fr) and Y. Peysson (yves.peysson@cea.fr)
0006 %
0007 if nargin < 5,
0008    chord_display = 1;
0009    kphot_display = hxr.kphot(round(length(hxr.kphot)/2));%keV
0010    p_opt = 2;
0011    filename = '';
0012 end
0013 if nargin < 6,
0014     kphot_display = hxr.kphot(round(length(hxr.kphot)/2));%keV
0015     p_opt = 2;
0016     filename = '';
0017 end
0018 if nargin < 7,
0019     p_opt = 2;
0020     filename = '';
0021 end
0022 if nargin < 8,
0023     filename = '';
0024 end
0025 nchords = length(hxr.alpha_hxr);
0026 %
0027 ikphot_display = max(find(Zbremdiag.kfit <= kphot_display));
0028 ikphot_display_2 = max(find(Zbremplasma.kphot <= kphot_display));
0029 nkphot = length(Zbremplasma.kphot);
0030 dkphot_display = Zbremdiag.dkfit(1);
0031 %
0032 figure('Name','Plasma bremsstrahlung spectrum');
0033 graph1D_jd(Zbremdiag.kfit,Zbremdiag.brem_bd_plasma(chord_display,:)./Zbremdiag.dkfit(1),0,1,'Photon energy k (keV)','dN_{phot}/dk.dt [keV^{-1}.s^{-1}]',['Non-thermal Bremsstrahlung, chord #',num2str(chord_display),', \Deltak = ',num2str(dkphot_display),'keV'],NaN,'','','-','non','b',2);
0034 print_jd(p_opt,[filename,'_PlasmaSpectrum']);
0035 %
0036 figure('Name','Pulse bremsstrahlung spectrum');
0037 graph1D_jd(Zbremdiag.kfit,Zbremdiag.brem_bd_diag(chord_display,:)./Zbremdiag.dkfit(1),0,1,'Pulse energy channel E (keV)','dN_{pulse}/dE.dt [keV^{-1}.s^{-1}]',['HXR diagnostic count rate, chord #',num2str(chord_display),', \DeltaE = ',num2str(dkphot_display),'keV'],NaN,'','','-','non','b',2);
0038 print_jd(p_opt,[filename,'_PulseSpectrum']);
0039 %
0040 figure('Name','Plasma bremsstrahlung profile');
0041 graph1D_jd([1:length(Zbremdiag.tphot_plasma)],Zbremdiag.brem_bd_plasma(:,ikphot_display),0,0,'Chord number','dN_{phot}/dt [s^{-1}]',['Plasma count rate, k=',num2str(Zbremdiag.kfit(ikphot_display)),'�',num2str(dkphot_display/2),'keV'],NaN,'','','-','non','b',2);
0042 print_jd(p_opt,[filename,'_PlasmaHXRProfile']);
0043 %
0044 for i=1:size(Zbremplasma.theta_hxr,1),
0045     for j=1:size(Zbremplasma.theta_hxr,2),
0046         brem_forward(i,j,:) = reshape(Zbremplasma.brem_forward{i,j},[1,1,nkphot]);
0047         brem_backward(i,j,:) = reshape(Zbremplasma.brem_backward{i,j},[1,1,nkphot]);
0048         brem_perp(i,j,:) = reshape(Zbremplasma.brem_perp{i,j},[1,1,nkphot]);
0049         brem_4pi(i,j,:) = reshape(Zbremplasma.brem_4pi{i,j},[1,1,nkphot]);
0050     end
0051 end
0052 %
0053 figure('Name',['Plasma forward bremsstrahlung at energy ',num2str(kphot_display)]);
0054 graph2D_jd(Zbremplasma.r_hxr.*cos(Zbremplasma.theta_hxr),Zbremplasma.r_hxr.*sin(Zbremplasma.theta_hxr),brem_forward(:,:,ikphot_display_2).','x','y',['Plasma forward bremsstrahlung at energy ',num2str(kphot_display)],NaN,NaN,1);
0055 print_jd(p_opt,[filename,'_PlasmaHXRbrem_forward']);axis('equal')
0056 %
0057 figure('Name',['Plasma backward bremsstrahlung at energy ',num2str(kphot_display)]);
0058 graph2D_jd(Zbremplasma.r_hxr.*cos(Zbremplasma.theta_hxr),Zbremplasma.r_hxr.*sin(Zbremplasma.theta_hxr),brem_backward(:,:,ikphot_display_2).','x','y',['Plasma backward bremsstrahlung at energy ',num2str(kphot_display)],NaN,NaN,1);
0059 print_jd(p_opt,[filename,'_PlasmaHXRbrem_backward']);axis('equal')
0060 %
0061 figure('Name',['Plasma perp bremsstrahlung at energy ',num2str(kphot_display)]);
0062 graph2D_jd(Zbremplasma.r_hxr.*cos(Zbremplasma.theta_hxr),Zbremplasma.r_hxr.*sin(Zbremplasma.theta_hxr),brem_perp(:,:,ikphot_display_2).','x','y',['Plasma perp bremsstrahlung at energy ',num2str(kphot_display)],NaN,NaN,1);
0063 print_jd(p_opt,[filename,'_PlasmaHXRbrem_perp']);axis('equal')
0064 %
0065 figure('Name',['Plasma 4pi bremsstrahlung at energy ',num2str(kphot_display)]);
0066 graph2D_jd(Zbremplasma.r_hxr.*cos(Zbremplasma.theta_hxr),Zbremplasma.r_hxr.*sin(Zbremplasma.theta_hxr),brem_4pi(:,:,ikphot_display_2).','x','y',['Plasma 4pi bremsstrahlung at energy ',num2str(kphot_display)],NaN,NaN,1);
0067 print_jd(p_opt,[filename,'_PlasmaHXRbrem_4pi']);axis('equal')
0068 %
0069 hxr.chordstatus_hxr(hxr.chordstatus_hxr==0) = NaN;
0070 %
0071 figure('Name','Pulse bremsstrahlung profile');
0072 graph1D_jd([1:length(Zbremdiag.tphot_plasma)],Zbremdiag.brem_bd_diag(:,ikphot_display),0,0,'Chord number','dN_{pulse}/dt [s^{-1}]',['Pulse count rate, E=',num2str(Zbremdiag.kfit(ikphot_display)),'keV +/- ',num2str(dkphot_display/2),'keV'],NaN,'','','-','*','r',2);
0073 graph1D_jd([1:length(Zbremdiag.tphot_plasma)],Zbremdiag.brem_bd_diag(:,ikphot_display).*hxr.chordstatus_hxr',0,0,'Chord number','dN_{pulse}/dt [s^{-1}]',['Pulse count rate, E=',num2str(Zbremdiag.kfit(ikphot_display)),'keV +/- ',num2str(dkphot_display/2),'keV'],NaN,'','',':','*','b',2);
0074 legend('all chords','active chords');
0075 if exist('hxrexp'),
0076     leg = {'simulations','experimental'};
0077     graph1D_jd([1:length(Zbremdiag.tphot_plasma)],hxrexp,0,0,'','','',leg,'','','-','non','r',2);
0078 end   
0079 print_jd(p_opt,[filename,'_PulseHXRProfile']);
0080 %
0081 figure('Name','Measured plasma bremsstrahlung profile');
0082 graph1D_jd([1:length(Zbremdiag.tphot_plasma)],Zbremdiag.brem_bd_diag(:,ikphot_display)./Zbremdiag.meanabsx(:,ikphot_display),0,0,'Chord number','dN_{pulse}/meanabs(E).dt [s^{-1}]',['Measured plasma count rate, E=',num2str(Zbremdiag.kfit(ikphot_display)),'keV +/- ',num2str(dkphot_display/2),'keV'],NaN,'','','-','*','r',2);
0083 graph1D_jd([1:length(Zbremdiag.tphot_plasma)],Zbremdiag.brem_bd_diag(:,ikphot_display)./Zbremdiag.meanabsx(:,ikphot_display).*hxr.chordstatus_hxr',0,0,'Chord number','dN_{pulse}/meanabs(E).dt [s^{-1}]',['Measured plasma count rate, E=',num2str(Zbremdiag.kfit(ikphot_display)),'keV +/- ',num2str(dkphot_display/2),'keV'],NaN,'','','-','*','b',2);
0084 legend('all chords','active chords');
0085 print_jd(p_opt,[filename,'_MeasuredPlasmaHXRProfile']);
0086 %
0087 figure('Name','Plasma photon temperature');
0088 graph1D_jd([1:length(Zbremdiag.tphot_plasma)],Zbremdiag.tphot_plasma,0,0,'Chord number','T_{phot} [keV]','k.dN_{phot}/dk.dt = A.exp(-k/T_{phot}) [50-110 keV]',NaN,'',[0,100],'-','non','b',2,20,gca,1,NaN,NaN,Zbremdiag.etphot_plasma,Zbremdiag.etphot_plasma);
0089 xxlimit = xlim;yylimit = ylim;
0090 ht = text(xxlimit(2)*0.8,yylimit(2)*0.9,['\Deltat = ',num2str(Zbremdiag.dt),' (s)']);set(ht,'fontsize',20);
0091 print_jd(p_opt,[filename,'_PlasmaTph']);
0092 %
0093 figure('Name','Measured photon temperature');
0094 graph1D_jd([1:length(Zbremdiag.tphot_plasma)],Zbremdiag.tphot_plasma_exp,0,0,'Chord number','T_{phot}^{*} [keV]','E.dN_{pulse}/dE.dt.{\eta}_{E} = A.exp(-E/T_{phot}^{*}) [50-110 keV]',NaN,'',[0,100],'-','non','r',2,20,gca,1,NaN,NaN,Zbremdiag.etphot_plasma_exp,Zbremdiag.etphot_plasma_exp);
0095 xxlimit = xlim;yylimit = ylim;
0096 ht = text(xxlimit(2)*0.8,yylimit(2)*0.9,['\Deltat = ',num2str(Zbremdiag.dt),' (s)']);set(ht,'fontsize',20);
0097 print_jd(p_opt,[filename,'_PulseTph']);
0098 %
0099 %    figure(10015),
0100 %    graph1D_jd([1:length(tphot_plasma)],afit_plasma,0,0,'Chord number','A(k=0) [s^{-1}]','k.dN_{phot}/dk.dt = A.exp(-k/T_{phot})@k=0 [50-110 keV]',NaN,'','','-','non','b',2);
0101 %
0102 %    figure(10016),
0103 %    graph1D_jd([1:length(tphot_plasma)],afit_plasma_exp,0,0,'Chord number','A^{*}(E=0) [s^{-1}]','E.dN_{pulse}/dE.dt.{\eta}_{E} = A.exp(-E/T_{phot}^{*})@E=0 [50-110 keV]',NaN,'','','-','non','r',2);
0104 %
0105 figure('Name','Mean HXR absorption efficiency');
0106 graph1D_jd(Zbremdiag.kfit,Zbremdiag.meanabsx,0,0,'Photon energy channel (keV)','{\eta}_{E}','Mean stopping efficiency {\eta}_{E}',NaN,'','','-','none','r',2);
0107 print_jd(p_opt,[filename,'_MeanAbsorptionEfficiency']);
0108 %
0109 figure('Name','Detector HXR response');
0110 ikinterp_display = max(find(Zbremdiag.kinterp <= kphot_display));
0111 graph1D_jd(Zbremdiag.kinterp,Zbremdiag.gkEinterp_out{chord_display}(ikinterp_display,:),0,0,'Photon energy k','G_{kE}',['Detector response function @k=',num2str(Zbremdiag.kinterp(ikinterp_display)),' (keV), chord#',int2str(chord_display)],NaN,'','','-','non','r',2);
0112 xxlimit = xlim;yylimit = ylim;
0113 ht = text(xxlimit(2)*0.8,yylimit(2)*0.9,['Norm. = ',num2str(trapz(Zbremdiag.kinterp,Zbremdiag.gkEinterp_out{chord_display}(ikinterp_display,:)))]);set(ht,'fontsize',20);
0114 print_jd(p_opt,[filename,'_ResponseFunction']);

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