0001 permission = test_permissions_yp;
0002
0003 if ~permission
0004 disp('Please move the script to a local folder where you have write permission before to run it')
0005 return;
0006 end
0007
0008
0009 path_simul = '';
0010
0011 id_equil = 'TScirc';
0012 path_equil = '../../../Database/EQUIL_files/';
0013
0014 id_hxr = 'TS99';
0015 path_hxr = '../../../Database/HXR_files/';
0016
0017
0018
0019
0020
0021 if exist([path_hxr,'HXR_',id_hxr,'.mat']) == 0,
0022 info_dke_yp(2,[path_hxr,'HXR_',id_hxr,'.mat does not exist']);
0023 break
0024 else
0025 eval(['load ',path_hxr,'HXR_',id_hxr,'.mat']);
0026 info_dke_yp(2,'Structures ''hxr and hxrparam'' successfully loaded');
0027 end
0028
0029 if exist([path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat']) == 0,
0030 info_dke_yp(2,[path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat does not exist']);
0031 break
0032 else
0033 eval(['load ',path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat']);
0034 info_dke_yp(2,['DKE data results in file ',path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat successfully loaded']);
0035 end
0036
0037 [Zbremchord,equilHXR] = bremchord_dke_yp(display,equil,radialDKE,Zcurr,hxr,hxrparam);
0038 [Zbremplasma] = bremsstrahlung_dke_yp(dkeparam,display,equilHXR,radialDKE,mksa,momentumDKE,dke_out,Zbremchord,hxr,hxrparam);
0039 [Zbremdiag] = bremdiag_dke_yp(Zbremplasma,hxr,hxrparam);
0040
0041
0042
0043 bremchorddisplay_dke_yp(Zbremchord,1);
0044 bremlocaldisplay_dke_yp(dkeparam,display,equilHXR,momentumDKE,radialDKE,dke_out,mksa,Zbremchord,Zbremplasma,0.3,180);
0045 bremdiagdisplay_dke_yp(hxr,Zbremchord,Zbremplasma,Zbremdiag,42,50);
0046
0047 eval(['save ',path_simul,'HXR_RESULTS_',id_equil,'_',id_simul,'_',id_hxr,'.mat Zbremchord Zbremplasma Zbremdiag equilHXR']);
0048 info_dke_yp(2,['Data saved in ',path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'_',id_hxr,'.mat']);