****************************************************************************************************************** Create the local file HXR_hxr_id.mat for C-MOD tokamak by Y.Peysson IRFM-CEA <yves.peysson@cea.fr> and Joan Decker IRFM-CEA (joan.decker@cea.fr)
0001 %****************************************************************************************************************** 0002 % Create the local file HXR_hxr_id.mat for C-MOD tokamak 0003 % 0004 %by Y.Peysson IRFM-CEA <yves.peysson@cea.fr> and Joan Decker IRFM-CEA (joan.decker@cea.fr) 0005 % 0006 clc 0007 clear all 0008 close all 0009 % 0010 hxr_id = 'CMOD';%Set here the name (identifier) of the Hard X-ray configuration 0011 % 0012 %Fast electron bremsstrahlung tomography (if exists) 0013 % 0014 hxr.R_hxr = 1.871*ones(1,32);% reference major radius (m) 0015 hxr.Z_hxr = zeros(1,32);% reference vertical position (m) 0016 % 0017 hxr.alpha_hxr = [2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8,2.8]*pi/180;%Angles in radians (positive in clockwise direction, see the definition of the frame in the documentation of DKE) 0018 hxr.beta_hxr = pi/2 - [14.4367,13.5049,12.5730,11.6408,10.7079,9.7743,8.8437,7.9118,6.9783,6.0466,5.1132,4.1811,3.2500,2.3162,1.3830,0.4502,-0.4788,-1.4116,-2.3447,-3.2785,-3.9957,-5.1417,-6.0758,-7.0071,-7.9376,-8.8731,-9.8037,-10.7374,-11.6667,-12.6025,-13.5353,-14.4671]*pi/180;%Angles in radians 0019 % 0020 hxr.EG_hxr = [2.9400e-03,3.0000e-03,3.0700e-03,3.1300e-03,3.1900e-03,3.2500e-03,3.3100e-03,3.3700e-03,3.4300e-03,3.4800e-03,3.5400e-03,3.5900e-03,3.6500e-03,3.7000e-03,3.7500e-03,3.8000e-03,3.8000e-03,3.7500e-03,3.7000e-03,3.6500e-03,3.5900e-03,3.5400e-03,3.4800e-03,3.4200e-03,3.3700e-03,3.3100e-03,3.2500e-03,3.1900e-03,3.1300e-03,3.0600e-03,3.0000e-03,2.9400e-03]*1e-6;%geometrical extend (m^2) [1,nchord] 0021 % 0022 hxr.kd_hxr = ones(32,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parameters approximately corresponding to photon energy spectra of gamma sources 57Co and 241Am. Reference energies for the photofraction [m,p] 0023 % 0024 hxr.phf_hxr = ones(32,1)*[0.75,0.62,0.51,0.41,0.32,0.2,0.2,0.2,0.2,0.2,0.2,0.2];%Parameters approximately corresponding to photon energy spectra of gamma sources 57Co and 241Am. Photofraction determined using the "MCDET.f" Monte-carlo hard x-ray absorption code at energies kd [m,p] 0025 % 0026 hxr.res_hxr = ones(32,1)*[6,-0.9];%fit parameters of the energy resolution of the detectors [m,2] 0027 % 0028 hxr.ef_hxr = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];% thickness of the vacuum window (mm) [1,m] 0029 hxr.tf_hxr = repmat('Al',32,1);% type of material for the vacuum window (Al ou Be) [1,m] 0030 % 0031 hxr.ea_hxr = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%thickness of the absorber (mm) [1,m] (WARNING: for 2 mm Cu: 2.83= 2*(29/26)^2*(dens_Cu/dens_Fe) dens_Cu = 63.546, dens_Fe = 55.845) 0032 hxr.ta_hxr = repmat('Fe',32,1);%type of material for the absorber (Al,Fe,Ge,Be ou Pb) [1,m] 0033 % 0034 hxr.ec_hxr = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%thickness of the detector shield (mm) [1,m] 0035 hxr.tc_hxr = repmat('Al',32,1);%type of material for the detector shield (Al,C ou Be) [1,m] 0036 % 0037 hxr.ed_hxr = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];%thickness of the detector (mm) [1,m] 0038 hxr.td_hxr = repmat('CdTe',32,1);%type of material for the detector (BGO,CsI,NaI,Ge or CdTe) [1,m] 0039 % 0040 hxr.lod_hxr = 5*ones(1,32);% length of the detector (mm) [1,m] ******** TODO: check the values ************ 0041 hxr.lad_hxr = 5*ones(1,32);% width of the detector (mm) [1,m] ******** TODO: check the values ************ 0042 hxr.lpm_hxr = zeros(1,32);% Average distance between the radiation impact point and the detector edge (mm) [1,m] ******** TODO: check the values ************ 0043 % 0044 hxr.kdiag_hxr = [20,40,60,80,100,120,140,160,50;40,60,80,100,120,140,160,180,110];%Measured photon energy spectrum (keV) [kmin1,kmin2,...,kmintphot,kmax1,kmax2,...,kmaxtphot] (here photon temp is calculated between 50 and 110 keV) [1,k] 0045 % 0046 hxr.Gain_hxr = ones(1,32);% factor of conversion photon energy (keV) <-> channel [1,m] ******** TODO: check the values ************ 0047 hxr.Offset_hxr = zeros(1,32);% offset of conversion photon energy <-> channel [1,m] ******** TODO: check the values ************ 0048 hxr.pur_hxr = zeros(1,32);% pile-up rejection (0: off, 1:on) [1,m] ******** TODO: check the values ************ 0049 % 0050 hxr.chordstatus_hxr = ones(1,32);% state of the line-of-sight [1,m] ******** TODO: check the values ************ 0051 % 0052 % HXR parameter 0053 % 0054 hxrparam.id = 'STANDARD'; 0055 hxrparam.mfactor = 1;%For the magnetic equilibrium 0056 hxrparam.method = 'spline';%For the magnetic equilibrium in the HXR calculations 0057 hxrparam.ns = 3000;%for chord integration 0058 hxrparam.n_gauleg = 35;%Number of Legendre polynomials for projections of cross-section and electron velocity distribution 0059 hxrparam.epsi_gauleg = 1e-14;%Accuracy of the Legendre projection 0060 % 0061 hxrparam.kmin = 50;% standard minimum value for Tph calculation (LH : 50; EC : 35) 0062 hxrparam.kmax = 110;% standard maximum value for Tph calculation (LH : 110; EC : 75) 0063 hxrparam.kphot = [20:10:180];%Photon energy in keV 0064 % 0065 eval(['save HXR_',hxr_id,'.mat hxr hxrparam']); 0066 % 0067 %graph1D_jd([1:20],hxr.EG_hxr,0,0,'chord index','geometrical factor (m-2)','CMOD FEB camera',NaN,[0,20],NaN,'-','o','r',2) 0068