*** TCV HARD X-RAY CONFIGURATION *** ************************************ Create the local file HXR_hxr_TCV.mat by Y.Peysson CEA-DRFC <yves.peysson@cea.fr> and Joan Decker CEA-DRFC (joan.decker@cea.fr) and J. Kamleitner CRPP, EPFL
0001 % *** TCV HARD X-RAY CONFIGURATION *** 0002 % ************************************ 0003 % Create the local file HXR_hxr_TCV.mat 0004 % 0005 % by Y.Peysson CEA-DRFC <yves.peysson@cea.fr> 0006 % and Joan Decker CEA-DRFC (joan.decker@cea.fr) 0007 % and J. Kamleitner CRPP, EPFL 0008 % 0009 clear all 0010 close all 0011 hxr_id = 'TCV';%Set here the name (identifier) of the Hard X-ray configuration 0012 0013 %-------------------------------------------------------------------------- 0014 % HXRC: 19 chords: 1-19 0015 %-------------------------------------------------------------------------- 0016 0017 % define beta and alpha 0018 beta_hxr_stefano = [NaN,NaN,NaN,NaN,183.3893,182.6976,... 0019 181.7569,180.8162,179.8755,178.9349,178.0000,177.0651,176.1245,... 0020 175.1838,174.2431,173.3024,172.3615,171.6614,NaN]/180*pi; 0021 0022 hxrc.beta_hxr = NaN(1,19); 0023 hxrc.alpha_hxr = NaN(1,19); 0024 0025 hxrc.beta_hxr(beta_hxr_stefano <= pi) = beta_hxr_stefano(beta_hxr_stefano <= pi); 0026 hxrc.alpha_hxr(beta_hxr_stefano <= pi) = 0; 0027 0028 % according to the correct definitions of alpha (-pi -> pi) and beta (0 -> pi) 0029 hxrc.beta_hxr(beta_hxr_stefano > pi) = 2*pi - beta_hxr_stefano(beta_hxr_stefano > pi); 0030 hxrc.alpha_hxr(beta_hxr_stefano > pi) = pi; 0031 0032 % define further parameters 0033 hxrc.R_hxr = 1.048*ones(1,19); % R [m] of a point on line of sight 0034 hxrc.Z_hxr = -1.137*ones(1,19); % Z [m] of a point on line of sight 0035 0036 hxrc.EG_hxr = [0,0,0,0,0.219,1.627,1.789,1.951,2.112,2.272,2.384,2.272,2.112,1.951,1.789,1.627,1.465,0.178,0]*1e-9;%geometrical extend (m^2) [1,nchord] 0037 hxrc.kd_hxr = ones(19,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] 0038 hxrc.phf_hxr = ones(19,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] 0039 hxrc.res_hxr = ones(19,1)*[6,-0.9]; % fit parameters of the energy resolution of the detectors [m,2] 0040 hxrc.ef_hxr = 0.25*ones(1,19); % thickness of the vacuum window (mm) [1,m] 0041 hxrc.tf_hxr = repmat('Be',19,1); % type of material for the vacuum window (Al ou Be) [1,m] 0042 % Air absoprtion is negligible as far as the photon energy is less than 10 keV, and the length is less than several meters (here air thickness is 57.64 cm) 0043 hxrc.ea_hxr = zeros(1,19); % 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) 0044 hxrc.ta_hxr = repmat('Fe',19,1); % type of material for the absorber (Al,Fe,Ge,Be ou Pb) [1,m] 0045 hxrc.ec_hxr = 0.5*ones(1,19); % thickness of the detector shield (mm) [1,m] 0046 hxrc.tc_hxr = repmat('Al',19,1); % type of material for the detector shield (Al,C ou Be) [1,m] 0047 hxrc.ed_hxr = 2*ones(1,19); % thickness of the detector (mm) [1,m] 0048 hxrc.td_hxr = repmat('CdTe',19,1); % type of material for the detector (BGO,CsI,NaI,Ge or CdTe) [1,m] 0049 0050 %-------------------------------------------------------------------------- 0051 % HXRS: cams 5,2,4,7: 4*24 chords: 20-115 0052 %-------------------------------------------------------------------------- 0053 0054 cg=hxrs_getchords; 0055 0056 % data from hxrs_getchords 0057 % focal point position 0058 hxrs.R_hxr=cg.rd([cg.chords_abs{cg.cams(2:end)}]); 0059 hxrs.Z_hxr=cg.zd([cg.chords_abs{cg.cams(2:end)}]); 0060 % chord angles 0061 hxrs.alpha_hxr=cg.alpha([cg.chords_abs{cg.cams(2:end)}]); 0062 hxrs.beta_hxr=cg.beta([cg.chords_abs{cg.cams(2:end)}]); 0063 % etendue data 0064 hxrs.EG_hxr = cg.etendue([cg.chords_abs{cg.cams(2:end)}]);% etendue [1,nchord] 0065 0066 % keep data for HXRC detector for the moment 0067 hxrs.kd_hxr = ones(96,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] 0068 hxrs.phf_hxr = ones(96,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] 0069 hxrs.res_hxr = ones(96,1)*[6,-0.9]; % fit parameters of the energy resolution of the detectors [m,2] 0070 0071 % Be window data from wiki, HXRS/Hardware 0072 hxrs.ef_hxr = 0.127*ones(1,96); % thickness of the vacuum window (mm) [1,m] 0073 hxrs.tf_hxr = repmat('Be',96,1); % type of material for the vacuum window (Al ou Be) [1,m] 0074 0075 % no absorber of detector shield 0076 hxrs.ea_hxr = zeros(1,96); % 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) 0077 hxrs.ta_hxr = repmat('Fe',96,1); % type of material for the absorber (Al,Fe,Ge,Be ou Pb) [1,m] 0078 hxrs.ec_hxr = zeros(1,96); % thickness of the detector shield (mm) [1,m] 0079 hxrs.tc_hxr = repmat('Al',96,1); % type of material for the detector shield (Al,C ou Be) [1,m] 0080 hxrs.ed_hxr = 2*ones(1,96); % thickness of the detector (mm) [1,m] 0081 hxrs.td_hxr = repmat('CdTe',96,1); % type of material for the detector (BGO,CsI,NaI,Ge or CdTe) [1,m] 0082 0083 0084 %-------------------------------------------------------------------------- 0085 % common data 0086 %-------------------------------------------------------------------------- 0087 0088 hxr.kdiag_hxr = [10:10:180,50 ;... 0089 20:10:190,110]; % Measured photon energy spectrum (keV) [kmin1,kmin2,...,kmintphot,kmax1,kmax2,...,kmaxtphot] (here photon temp is calculated between 50 and 110 keV) [1,k] 0090 0091 hxr.kphot = [10:5:190]; % Photon energy in keV 0092 0093 hxrparam.mfactor = 1;%For the magnetic equilibrium 0094 hxrparam.method = 'spline';%For the magnetic equilibrium in the HXR calculations 0095 hxrparam.ns = 3000;%for chord integration 0096 hxrparam.n_gauleg = 35;%Number of Legendre polynomials for projections of cross-section and electron velocity distribution 0097 hxrparam.epsi_gauleg = 1e-14;%Accuracy of the Legendre projection 0098 0099 %-------------------------------------------------------------------------- 0100 % merge and save data 0101 %-------------------------------------------------------------------------- 0102 0103 % get fields 0104 hxrf=fields(hxrc); 0105 % merge fields to hxr 0106 for i=1:length(hxrf) 0107 if(size(hxrs.(hxrf{i}),1)==96 && size(hxrc.(hxrf{i}),1)==19) 0108 hxr.(hxrf{i})=[hxrc.(hxrf{i});hxrs.(hxrf{i})]; 0109 elseif(size(hxrs.(hxrf{i}),2)==96 && size(hxrc.(hxrf{i}),2)==19) 0110 hxr.(hxrf{i})=[hxrc.(hxrf{i}),hxrs.(hxrf{i})]; 0111 else 0112 error('dimensions of hxrs and hxrc do not correspond to each other or to the definition'); 0113 end 0114 end 0115 0116 % save data to the file 0117 save(sprintf('HXR_%s.mat',hxr_id),'hxr','hxrparam');