******************************************** HARD X-RAY CONFIGURATION ******************************************** ****************************************************************************************************************** Create the local file HXR_hxr_id.mat by Y.Peysson (CEA/IRFM, yves.peysson@cea.fr) and Joan Decker (CEA/IRFM, joan.decker@cea.fr)
0001 %******************************************** HARD X-RAY CONFIGURATION ******************************************** 0002 %****************************************************************************************************************** 0003 % Create the local file HXR_hxr_id.mat 0004 % 0005 %by Y.Peysson (CEA/IRFM, yves.peysson@cea.fr) and Joan Decker (CEA/IRFM, joan.decker@cea.fr) 0006 % 0007 clc 0008 clear all 0009 close all 0010 % 0011 hxr_id = 'TScirc'; 0012 % 0013 Ri = 2360;ai = 800;fi = [1.0,0.0,0.0]; 0014 % 0015 mv = [-90]; 0016 tv = [-90]; 0017 kv = [0]; 0018 % 0019 sd = [2]; 0020 r1 = [5]; 0021 r2 = [5]; 0022 lc = 1*ones(1,1); 0023 lf = 1000*ones(1,1); 0024 lfp= 1000*ones(1,1); 0025 kdiag = [20,40,60,80,100,120,140,160,50;40,60,80,100,120,140,160,180,110]; 0026 ef = [1]; 0027 tf = ['Al']; 0028 ea = [0.4]; 0029 ta = ['Fe']; 0030 ec = [0.5]; 0031 tc = ['Al']; 0032 ed = [2]; 0033 lod = [5]; 0034 lad = [5]; 0035 lpm = [0]; 0036 td = ['CdTe']; 0037 kd = ones(1,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parametres a peu pres adapt�es aux spectres de 57Co et 241Am enregistr�es en labo. 0038 phf = ones(1,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];%Parametres a� peu pres adapet�s aux spectres de 57Co et 241Am enregistre�s en labo. 0039 res = ones(1,1)*[6,-0.9];%Parametres a� peu pres adapet�s aux spectres de 57Co et 241Am enregistre�s en labo. 0040 Gain = [1]; 0041 Offset = [0]; 0042 pur = [0]; 0043 chordstatus = [1]; 0044 % 0045 EG = [1]*1e-3;%Etendue ge�ome�trique petite camera 0046 % 0047 R_TS = (Ri + ai*cos(tv*pi/180))/1000;% reference major radius (m) 0048 Z_TS = ai*sin(tv*pi/180)/1000;% reference vertical position (m) 0049 % 0050 L = [-4:1:4];%Chord length 0051 R = zeros(length(mv),length(L)); 0052 Z = zeros(length(mv),length(L)); 0053 % 0054 % Display Tore Supra chamber for chord arrangement 0055 % 0056 npoints = 1000; 0057 theta = [0:(npoints-1) 0] * 2 * pi / npoints; 0058 Rc = Ri/1000; 0059 Zc = 0; 0060 radius = ai/1000; 0061 RR = (radius * cos(theta) + Rc * ones(1,npoints+1)); 0062 ZZ = (radius * sin(theta) + Zc * ones(1,npoints+1)); 0063 figure(1), plot(RR,ZZ,'r-');hold on 0064 for chord = 1:length(mv), 0065 R(chord,:) = R_TS(chord) + L*cos(mv(chord)*pi/180); 0066 Z(chord,:) = Z_TS(chord) + L*sin(mv(chord)*pi/180); 0067 end 0068 plot(R',Z'), 0069 hold off 0070 axis('equal') 0071 xlabel('R(m)');ylabel('Z(m)') 0072 % 0073 % Build 0074 % 0075 hxr.R_hxr = R_TS;% reference major radius (m) 0076 hxr.Z_hxr = Z_TS;% reference vertical position (m) 0077 % 0078 hxr.alpha_hxr = -kv*pi/180;%horizontal angle (with respect to R) [-pi...pi]. The negative sign comes from the fact that kv is defined in a direct frame, while alpha_hxr corresponds to an indirect frame 0079 hxr.beta_hxr = pi/2 - mv*pi/180;%vertical angle (with respect to Z) [0...pi] 0080 % 0081 hxr.EG_hxr = EG*1e-6;%geometrical extend (m^2) [1,nchord] 0082 % 0083 hxr.kd_hxr = kd;% reference energies for the photofraction [m,p] 0084 % 0085 hxr.phf_hxr = phf;% photofraction determined using the "MCDET.f" Monte-carlo hard x-ray absorption code at energies kd [m,p] 0086 % 0087 hxr.res_hxr = res;%fit parameters of the energy resolution of the detectors [m,2] 0088 % 0089 hxr.ef_hxr = ef;% thickness of the vacuum window (mm) [1,m] 0090 % 0091 hxr.tf_hxr = tf;% type of material for the vacuum window (Al ou Be) [1,m] 0092 % 0093 hxr.ea_hxr = ea;%thickness of the absorber (mm) [1,m] 0094 % 0095 hxr.ta_hxr = ta;%type of material for the absorber (Al,Fe,Ge,Be ou Pb) [1,m] 0096 % 0097 hxr.ec_hxr = ec;%thickness of the detector shield (mm) [1,m] 0098 % 0099 hxr.tc_hxr = tc;%type of material for the detector shield (Al ou Be) [1,m] 0100 % 0101 hxr.ed_hxr = ed;%thickness of the detector (mm) [1,m] 0102 % 0103 hxr.td_hxr = td;%type of material for the detector (BGO,CsI,NaI,Ge or CdTe) [1,m] 0104 % 0105 hxr.kdiag_hxr = kdiag;%Measured photon energy spectrum (keV) [1,k] 0106 % 0107 hxr.kphot = [20:10:180];%Photon energy in keV 0108 % 0109 % HXR parameter 0110 % 0111 hxrparam.mfactor = 1;%For the magnetic equilibrium 0112 hxrparam.method = 'spline';%For the magnetic equilibrium in the HXR calculations 0113 hxrparam.ns = 3000;%for chord integration 0114 hxrparam.n_gauleg = 35;%Number of Legendre polynomials for projections of cross-section and electron velocity distribution 0115 hxrparam.epsi_gauleg = 1e-14;%Accuracy of the Legendre projection 0116 % 0117 eval(['save HXR_',hxr_id,'.mat hxr hxrparam']); 0118 0119