LUKE_GET_HXR_DIAG_TCV [ hxr, hxrparam, ap ] = luke_get_hxr_diag_tcv( shot, cams, chords ) returns the HXR diagnostic configuration parameters required by LUKE for a given TCV shot and (optional) the requested cameras and chords. If a camera was not present for a shot a default configuration is returned. INPUT: shot ...... the TCV shot number cams ...... the requested cameras. By default [1,5,2,7,4] with 1 being the HXRC and [5,2,7,4] being the HXRS cameras according to their numbering. chords .... allows to select chords, by default all chords: {5:18,1:24,[],1:24,1:24,[],1:24} of cams 1,2,4,5,7 J. Kamleitner, CRPP, EPFL, March 2014
0001 function [ hxr, hxrparam, ap ] = luke_get_hxr_diag_tcv( shot, cams, chords ) 0002 %LUKE_GET_HXR_DIAG_TCV [ hxr, hxrparam, ap ] = luke_get_hxr_diag_tcv( shot, cams, chords ) 0003 % returns the HXR diagnostic configuration parameters required by LUKE 0004 % for a given TCV shot and (optional) the requested cameras and chords. 0005 % If a camera was not present for a shot a default configuration is 0006 % returned. 0007 % INPUT: 0008 % shot ...... the TCV shot number 0009 % cams ...... the requested cameras. By default [1,5,2,7,4] with 1 being 0010 % the HXRC and [5,2,7,4] being the HXRS cameras according to 0011 % their numbering. 0012 % chords .... allows to select chords, by default all chords: 0013 % {5:18,1:24,[],1:24,1:24,[],1:24} of cams 1,2,4,5,7 0014 % 0015 % J. Kamleitner, CRPP, EPFL, March 2014 0016 0017 if(nargin<2 || isempty(cams)) 0018 cams=[1,5,2,7,4]; 0019 end 0020 if(nargin<3 || isempty(chords)) 0021 chords={5:18,1:24,[],1:24,1:24,[],1:24}; 0022 end 0023 0024 %-------------------------------------------------------------------------- 0025 % get all parameters and extract information required for LUKE 0026 %-------------------------------------------------------------------------- 0027 ap=hxrs_getallpar(shot,cams,chords); 0028 0029 % data from hxrs_getchords 0030 0031 % focal point position 0032 hxr.R_hxr=ap.cg.rd; 0033 hxr.Z_hxr=ap.cg.zd; 0034 % chord angles 0035 hxr.alpha_hxr=ap.cg.alpha; 0036 hxr.beta_hxr=ap.cg.beta; 0037 % etendue data 0038 hxr.EG_hxr = ap.cg.etendue; 0039 % filter, window and absorber 0040 hxr.ec_hxr = NaN(1,ap.nc); % thickness of the detector shield (mm) [1,m] 0041 hxr.tc_hxr = repmat('fm',ap.nc,1); % type of material for the detector shield (Al,C ou Be) [m,2] 0042 hxr.ef_hxr = NaN(1,ap.nc); % thickness of the vacuum window (mm) [1,m] 0043 hxr.tf_hxr = repmat('wm',ap.nc,1); % type of material for the vacuum window (Al ou Be) [m,2] 0044 hxr.ea_hxr = NaN(1,ap.nc); % 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) 0045 hxr.ta_hxr = repmat('am',ap.nc,1); % type of material for the absorber (Al,Fe,Ge,Be ou Pb) [m,2] 0046 hxr.ed_hxr = NaN(1,ap.nc); % thickness of the detector (mm) [1,m] 0047 hxr.td_hxr = repmat('detm',ap.nc,1);% type of material for the detector (BGO , CsI , NaI , Ge , CdTe) [m,4] 0048 for i=1:ap.nc 0049 hxr.ec_hxr(i)=ap.fch{i}.filt{1}.d; 0050 hxr.tc_hxr(i,:)=ap.fch{i}.filt{1}.mt; 0051 hxr.ef_hxr(i)=ap.fch{i}.win{1}.d; 0052 hxr.tf_hxr(i,:)=ap.fch{i}.win{1}.mt; 0053 hxr.ea_hxr(i)=ap.fch{i}.abs{1}.d; 0054 hxr.ta_hxr(i,:)=ap.fch{i}.abs{1}.mt; 0055 hxr.ed_hxr(i)=ap.det{i}.d; 0056 hxr.td_hxr(i,:)=ap.det{i}.mt; 0057 end 0058 0059 %-------------------------------------------------------------------------- 0060 % additional information required for LUKE, not provided by hxrs_getallpar 0061 %-------------------------------------------------------------------------- 0062 0063 % keep data for HXRC detector for the moment 0064 hxr.kd_hxr = ones(ap.nc,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] 0065 hxr.phf_hxr = ones(ap.nc,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] 0066 hxr.res_hxr = ones(ap.nc,1)*[6,-0.9]; % fit parameters of the energy resolution of the detectors [m,2] 0067 % energy bin data 0068 hxr.kdiag_hxr = [15:10:195,35 ;... 0069 25:10:205,135]; % Measured photon energy spectrum (keV) [kmin1,kmin2,...,kmintphot,kmax1,kmax2,...,kmaxtphot] (here photon temp is calculated between 35 and 135 keV) [1,k] 0070 % hxr.kphot = [10:5:205]; % Photon energy in keV 0071 0072 %-------------------------------------------------------------------------- 0073 % hxrparam structure 0074 %-------------------------------------------------------------------------- 0075 0076 hxrparam.mfactor = 1;%For the magnetic equilibrium 0077 hxrparam.method = 'spline';%For the magnetic equilibrium in the HXR calculations 0078 hxrparam.ns = 3000;%for chord integration 0079 hxrparam.n_gauleg = 35;%Number of Legendre polynomials for projections of cross-section and electron velocity distribution 0080 hxrparam.epsi_gauleg = 1e-14;%Accuracy of the Legendre projection 0081 0082 0083 end 0084