runhxr

PURPOSE ^

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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 %id_simul = 'LH_karney_transp_bounce';%Simulation ID
0009 path_simul = '';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0010 %
0011 id_equil = 'TScirc';%For plasma equilibrium
0012 path_equil = '../../../Database/EQUIL_files/';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0013 %
0014 id_hxr = 'TS99';%For HXR diagnostic configuration
0015 path_hxr = '../../../Database/HXR_files/';%if nothing is specified, the working directory is first used and then MatLab is looking in all the path
0016 %
0017 %************************************************************************************************************************************
0018 %************************************************************************************************************************************
0019 %************************************************************************************************************************************
0020 %
0021 if exist([path_hxr,'HXR_',id_hxr,'.mat']) == 0,%HXR
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,%DKE results
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 %For display HXR
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']);

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