partok_dke_yp

PURPOSE ^

SYNOPSIS ^

function [tok,Rp,ap,epsip,hp,Rm,Ri,ai,fi,nv,nv0,tv,kv,mv,sd,r1,r2,lc,lf,lfp,EG,kdiag,ef,tf,ea,ta,ec,tc,td,res,lod,lad,ed,lpm,phf,kd,Gain,Offset,pur,chordstatus] = partok_dke_yp(tokname,day,month,year);

DESCRIPTION ^

    Generates parameters on the geometrical arrangement of the detectors for hard x-ray 
    measurements and also physical quantities related to the photon detection: energy resolution,
    photo-fraction, Compton effect...

    Input:

        - tokname: tokamak name (string) [1,m]
        - day: day of the parameter file [1,1]
        - month: month of the parameter file [1,1]
        - year: year of the parameter file [1,1]

    Output:

        - tok: tokamak name (string) [1,ms]
        - Rp: plasma major radius (mm)  [1,1]
        - ap: plasma minor radius (mm) [1,1]
        - epsip: plasma ellipticity (at three positions: 0, 1/2 and 1) [3,1]
        - hp: plasma vertical shift (mm) [1,1]
        - Rm: magnetic axis (cm)  [1,1]
        - Ri: chamber major radius (mm)  [1,1]
        - ai: chamber minor radius (mm) [1,1]
        - fi: chamber ellipticity, elongation and triangularity  [1,3]
        - nv: number of chords [1,1]
        - nv0: number of chords viewing the plasma in a poloidal plane [1,1]
        - tv: angular position of the intersection between detector axis direction 
              and the chamber (degrees) [1,m] 
         - kv: horizontal rotation (degrees) [1,m] 
         - mv: vertical rotation (degrees) [1,m] 
        - sd: shape of the diaphragm (1 : cir / 2 : rec) [1,m]
        - r1: radius of the diaphragm 1 (detector side) (mm) [1,m]
        - r2: radius of the diaphragm 2 (chamber side) (mm) [1,m]
        - hd: elevation of the detector position for a pine-hole camera (mm) [1,m]
        - lc: distance between the diaphragms 1 and 2 (mm) [1,m]
        - lf: distance between diaphragm 1 and the vacuum window (mm) [1,m]
        - lfp: distance between the vacuum window and a reference plane (equatorial for a vertical camera) (mm) [1,m]
        - EG: geometrical extent of each line of sight (mm*mm) [1,m]
        - kdiag: energy channels (the last one -> upper and lower bound for Tph calculation) (keV) [2,m+1]
        - ef: thickness of the vacuum window (mm) [1,m]
        - tf: type of material for the vacuum window (Al ou Be) [1,m]
        - ea: thickness of the absorber (mm) [1,m]
        - ta: type of material for the absorber (Al,Fe,Ge,Be ou Pb) [1,m]
        - ec: thickness of the detector shield (mm) [1,m]
        - tc: type of material for the detector shield (Al ou Be) [1,m]
         - td: type of material for the detector (BGO,CsI,NaI ou Ge) [1,m]
        - res: fit parameters of the energy resolution of the detectors [m,2]
        - lod: length of the detector (mm) [1,m]
        - lad: width of the detector (mm) [1,m]
        - ed: thickness of the detector (mm) [1,m]
        - lpm: Average distance between the radiation impact point and the detector edge (mm) [1,m]
        - phf: photofraction determined using the "MCDET.for" Monte-carlo hard x-ray absorption
               code at energies kd [m,p]
        - kd: reference energies for the photofraction [m,p]
         - Gain: factor of conversion photon energy (keV) <-> channel [1,m]
        - Offset: offset of conversion photon energy <-> channel [1,m]
        - pur : Pile-up rejection (0: off, 1:on) [1,m]
        - chordstatus: state of the line-of-sight [1,m]


by Y.PEYSSON CEA-DRFC 08/09/1994 <peysson@drfc.cad.cea.fr>
updated by D. MAZON CEA-DRFC 10/04/2002 <mazon@drfc.cad.cea.fr>
last update: 26/06/2002

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [tok,Rp,ap,epsip,hp,Rm,Ri,ai,fi,nv,nv0,tv,kv,mv,sd,r1,r2,lc,lf,lfp,EG,kdiag,ef,tf,ea,ta,ec,tc,td,res,lod,lad,ed,lpm,phf,kd,Gain,Offset,pur,chordstatus] = partok_dke_yp(tokname,day,month,year);
0002 %
0003 %    Generates parameters on the geometrical arrangement of the detectors for hard x-ray
0004 %    measurements and also physical quantities related to the photon detection: energy resolution,
0005 %    photo-fraction, Compton effect...
0006 %
0007 %    Input:
0008 %
0009 %        - tokname: tokamak name (string) [1,m]
0010 %        - day: day of the parameter file [1,1]
0011 %        - month: month of the parameter file [1,1]
0012 %        - year: year of the parameter file [1,1]
0013 %
0014 %    Output:
0015 %
0016 %        - tok: tokamak name (string) [1,ms]
0017 %        - Rp: plasma major radius (mm)  [1,1]
0018 %        - ap: plasma minor radius (mm) [1,1]
0019 %        - epsip: plasma ellipticity (at three positions: 0, 1/2 and 1) [3,1]
0020 %        - hp: plasma vertical shift (mm) [1,1]
0021 %        - Rm: magnetic axis (cm)  [1,1]
0022 %        - Ri: chamber major radius (mm)  [1,1]
0023 %        - ai: chamber minor radius (mm) [1,1]
0024 %        - fi: chamber ellipticity, elongation and triangularity  [1,3]
0025 %        - nv: number of chords [1,1]
0026 %        - nv0: number of chords viewing the plasma in a poloidal plane [1,1]
0027 %        - tv: angular position of the intersection between detector axis direction
0028 %              and the chamber (degrees) [1,m]
0029 %         - kv: horizontal rotation (degrees) [1,m]
0030 %         - mv: vertical rotation (degrees) [1,m]
0031 %        - sd: shape of the diaphragm (1 : cir / 2 : rec) [1,m]
0032 %        - r1: radius of the diaphragm 1 (detector side) (mm) [1,m]
0033 %        - r2: radius of the diaphragm 2 (chamber side) (mm) [1,m]
0034 %        - hd: elevation of the detector position for a pine-hole camera (mm) [1,m]
0035 %        - lc: distance between the diaphragms 1 and 2 (mm) [1,m]
0036 %        - lf: distance between diaphragm 1 and the vacuum window (mm) [1,m]
0037 %        - lfp: distance between the vacuum window and a reference plane (equatorial for a vertical camera) (mm) [1,m]
0038 %        - EG: geometrical extent of each line of sight (mm*mm) [1,m]
0039 %        - kdiag: energy channels (the last one -> upper and lower bound for Tph calculation) (keV) [2,m+1]
0040 %        - ef: thickness of the vacuum window (mm) [1,m]
0041 %        - tf: type of material for the vacuum window (Al ou Be) [1,m]
0042 %        - ea: thickness of the absorber (mm) [1,m]
0043 %        - ta: type of material for the absorber (Al,Fe,Ge,Be ou Pb) [1,m]
0044 %        - ec: thickness of the detector shield (mm) [1,m]
0045 %        - tc: type of material for the detector shield (Al ou Be) [1,m]
0046 %         - td: type of material for the detector (BGO,CsI,NaI ou Ge) [1,m]
0047 %        - res: fit parameters of the energy resolution of the detectors [m,2]
0048 %        - lod: length of the detector (mm) [1,m]
0049 %        - lad: width of the detector (mm) [1,m]
0050 %        - ed: thickness of the detector (mm) [1,m]
0051 %        - lpm: Average distance between the radiation impact point and the detector edge (mm) [1,m]
0052 %        - phf: photofraction determined using the "MCDET.for" Monte-carlo hard x-ray absorption
0053 %               code at energies kd [m,p]
0054 %        - kd: reference energies for the photofraction [m,p]
0055 %         - Gain: factor of conversion photon energy (keV) <-> channel [1,m]
0056 %        - Offset: offset of conversion photon energy <-> channel [1,m]
0057 %        - pur : Pile-up rejection (0: off, 1:on) [1,m]
0058 %        - chordstatus: state of the line-of-sight [1,m]
0059 %
0060 %
0061 %by Y.PEYSSON CEA-DRFC 08/09/1994 <peysson@drfc.cad.cea.fr>
0062 %updated by D. MAZON CEA-DRFC 10/04/2002 <mazon@drfc.cad.cea.fr>
0063 %last update: 26/06/2002
0064 %
0065 %
0066 if nargin < 4,
0067     infoyp(2,'Wrong number of input arguments for partokyp');
0068     return;
0069 end
0070 %
0071 machine = computer;
0072 %
0073 if day<10,days=['0',int2str(day)];else,days =int2str(day);end
0074 if month<10,months = ['0',int2str(month)];else,months = int2str(month);end
0075 if year>=80 & year<=99,
0076     years = [int2str(year+1900)];
0077 elseif year>=00 & year<=10,
0078     years = [int2str(year+2000)];
0079 else    
0080     years = int2str(year);
0081 end
0082 xdate = str2num([years,months,days]);
0083 if strcmp(tokname,'TS')==1,
0084     tok = 'TS';
0085     Rp = 2340;
0086     ap = 780;
0087     hp = 0;
0088     epsip = [1,1,1];
0089     Rm = 2440;
0090 %        if mode == 'N',
0091 %            infoyp(2,['Default values for ',tokname,' / last update: 01/05/98']);
0092 %        end
0093 %
0094 %    elseif strcmp(tokname,'TS')==1,
0095 %        if mode == 'N',
0096 %            infoyp(2,['Default values for ',tokname,' / last update: 18/11/1993']);
0097 %        end
0098 %        mv = [-94.70,-90.0,-83.46,-78.91,-74.41];
0099 %        tv = [-84.32,-90.0,-101.20,-107.11,-114.46];
0100 %        kv = [0.0,0.0,0.0,0.0,0.0];
0101 %        Ri = 2360;ai = 800;fi = [1.0,0.0,0.0];
0102 %        sd = [1,1,1,1,1];
0103 %        r1 = [3.5,3.5,3.5,3.5,3.5];
0104 %        r2 = [6,6,6,6,6];
0105 %        lc = [1432,1428,1438,1457,1485];
0106 %        lf = [1171,1167,1174,1189,1211];
0107 %        lfp= [1923,1917,1929,1953,1990];
0108 %        kdiag = [50,100,150,200,125;100,150,200,250,225];
0109 %        ef = [1,1,1,1,1];
0110 %        tf = ['Al';'Al';'Al';'Al';'Al'];
0111 %        ea = [1,1,1,1,1];
0112 %        ta = ['Fe';'Fe';'Fe';'Fe';'Fe'];
0113 %        ec = [0.75,0.75,0.75,0.75,0.75];
0114 %        tc = ['Al';'Al';'Al';'Al';'Al'];
0115 %        ed = [23,23,23,23,23];
0116 %        lod = [65,65,65,65,65];
0117 %        lad = [50,50,50,50,50];
0118 %        lpm = [40,40,40,40,40];
0119 %        td = ['BGO';'BGO';'BGO';'BGO';'BGO'];
0120 %        kd = [20,40,122,400,511,660,834,1000;
0121 %                 20,40,122,400,511,660,834,1000;
0122 %                  20,40,122,400,511,660,834,1000;
0123 %                  20,40,122,400,511,660,834,1000;
0124 %                  20,40,122,400,511,660,834,1000];
0125 %        phf = [0.978,0.920,0.804,0.892,0.806,0.716,0.646,0.587;
0126 %                   0.978,0.920,0.804,0.892,0.806,0.716,0.646,0.587;
0127 %                   0.978,0.920,0.804,0.892,0.806,0.716,0.646,0.587;
0128 %                   0.978,0.920,0.804,0.892,0.806,0.716,0.646,0.587;
0129 %                   0.978,0.920,0.804,0.892,0.806,0.716,0.646,0.587];
0130 %        res = [4.534,-0.52;
0131 %                   4.534,-0.52;
0132 %                   4.534,-0.52;
0133 %                   4.534,-0.52;
0134 %                   4.534,-0.52];
0135 %        pur = [0,0,0,0,0];
0136 %        chordstatus = [1,1,1,1,1];
0137 
0138     
0139     if (xdate >= 19970101 & xdate < 19970331), %choc >=20500 � <=21400
0140 %    Les cordes du nouveau DSPX correspondant le plus a l'ancien diagnostic sont les 26, 31, 35, 42 et 46
0141         mv = [-1.5000,-2.4500,-3.4000,-4.3500,-5.3000,-6.2500,-7.2000,-8.1500,-9.1000,-10.0500,-11.0000,-11.9500,-12.9000,-13.8500,-14.8000,-15.7500,-16.7000,-17.6500,-18.6000,-19.5500,-20.5000];
0142         mv = [mv,-71.0000,-71.9756,-72.9513,-73.9270,-74.9027,-75.8783,-76.8540,-77.8297,-78.8054,-79.7810,-80.7567];
0143         mv = [mv,-81.7324,-82.7081,-83.6837,-84.6594,-85.6351,-86.6108,-87.5864,-88.5621,-89.5378,-90.5135,-91.4891];
0144           mv = [mv,-92.4648,-93.4405,-94.4162,-95.3918,-96.3675,-97.3432,-98.3189,-99.2945,-100.2702,-101.2459,-102.2216,-103.1972,-104.1729,-105.1486,-106.1243,-107.1000];        
0145 %
0146         tv = [-16.2113,-14.5156,-12.8425,-11.1865,-9.5429,-7.9067,-6.2735,-4.6386,-2.9976,-1.3456,0.3222,2.0109,3.7263,5.4746,7.2625,9.0981,10.9904,12.9503,14.9909,17.1281,19.3825];
0147         tv = [tv,-126.4985,-123.5939,-120.9769,-118.5775,-116.3486,-114.2569,-112.2775,-110.3915,-108.5837,-106.8400,-105.1564,-103.5184,-101.9207,-100.3570,-98.8216,-97.3096,-95.8164,-94.3375,-92.8692,-91.4074];
0148         tv = [tv,-89.9484,-88.4886,-87.0242,-85.5515,-84.0665,-82.5651,-81.0428,-79.4950,-77.9162,-76.3006,-74.6415,-72.9310,-71.1600,-69.3175,-67.3903,-65.3614,-63.2095,-60.9063];%Grande camera
0149 %
0150         kv = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%Petite camera
0151         kv = [kv,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,0,0,0,0,0,0];%Grande camera
0152 %
0153         Ri = 2360;ai = 800;fi = [1.0,0.0,0.0];
0154 %
0155         sd = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];%Petite camera
0156         sd = [sd,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,2,2,2,2,2,2];%Grande camera
0157         r1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0158         r1 = [r1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0159         r2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0160         r2 = [r2,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0161         lc = 1*ones(1,59);
0162         lf = 1000*ones(1,59);
0163         lfp = 1000*ones(1,59);
0164         kdiag = [20,40,60,80,100,120,140,160,30;40,60,80,100,120,140,160,180,170];
0165         ef = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0166         ef = [ef,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,1,1,1,1,1,1];
0167         tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0168         tf = [tf;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0169         ea = [0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6,0.6];
0170         ea = [ea,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0171         ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0172         ta = [ta;'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0173         ec = [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0174         ec = [ec,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0175         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0176         tc = [tc;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0177         ed = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];
0178         ed = [ed,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,2,2,2,2,2,2];
0179         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0180         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0181         lad = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0182         lad = [lad,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0183         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0184         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0185         lpm = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0186         lpm = [lpm,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,0,0,0,0,0,0];
0187         td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0188         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0189         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0190         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0191         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0192         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0193         kd = ones(59,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0194         phf = ones(59,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 � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0195         res = ones(59,1)*[6,-0.9];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0196         Gain = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];   
0197         Gain = [Gain,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,1,1,1,1,1,1];       
0198         Offset = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0199         Offset = [Offset,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,0,0,0,0,0,0];
0200         pur = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0201         pur = [pur,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,0,0,0,0,0,0];
0202         chordstatus = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0203 %        chordstatus = [chordstatus,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1];
0204         chordstatus = [chordstatus,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,0,0,0,0,0,0];     
0205 %
0206         EG = [0.86 1.0269 1.1958 1.3642 1.5365 1.7049 1.8709 2.0370 2.1994 2.3651 2.4803 2.3651];%Etendue g�om�trique petite camera
0207         EG = [EG 2.1994 2.037 1.8709 1.7049 1.5365 1.3642 1.1958 1.0269 0.86];
0208 %
0209         EG = [EG 1e-3 1e-3 1e-3 1e-3 1e-3 0.1208 0.2889 0.4581 0.6249 0.86 1.0269 1.1958 1.3642 1.5365 1.7049];%Etendue g�om�trique grande camera sans decalage
0210         EG = [EG 1.8709 2.0370 2.1994 2.3651 2.4803 2.3651 2.1994 2.037 1.8709 1.7049 1.5365 1.3642 1.1958 1.0269 0.86];
0211         EG = [EG 0.6249 0.4581 0.2889 0.1208 1e-3 1e-3 1e-3 1e-3]*1e-3;    
0212     elseif (xdate >= 19970401 & xdate < 19980501),%choc >21400 � <=24000
0213         mv = [-1.5000,-2.4500,-3.4000,-4.3500,-5.3000,-6.2500,-7.2000,-8.1500,-9.1000,-10.0500,-11.0000,-11.9500,-12.9000,-13.8500,-14.8000,-15.7500,-16.7000,-17.6500,-18.6000,-19.5500,-20.5000];
0214          mv = [mv,-71.0000,-71.9756,-72.9513,-73.9270,-74.9027,-75.8783,-76.8540,-77.8297,-78.8054,-79.7810,-80.7567];
0215           mv = [mv,-81.7324,-82.7081,-83.6837,-84.6594,-85.6351,-86.6108,-87.5864,-88.5621,-89.5378,-90.5135,-91.4891];
0216           mv = [mv,-92.4648,-93.4405,-94.4162,-95.3918,-96.3675,-97.3432,-98.3189,-99.2945,-100.2702,-101.2459,-102.2216,-103.1972,-104.1729,-105.1486,-106.1243,-107.1000];        
0217 %
0218          tv = [-16.2113,-14.5156,-12.8425,-11.1865,-9.5429,-7.9067,-6.2735,-4.6386,-2.9976,-1.3456,0.3222,2.0109,3.7263,5.4746,7.2625,9.0981,10.9904,12.9503,14.9909,17.1281,19.3825];
0219         tv = [tv,-126.4985,-123.5939,-120.9769,-118.5775,-116.3486,-114.2569,-112.2775,-110.3915,-108.5837,-106.8400,-105.1564,-103.5184,-101.9207,-100.3570,-98.8216,-97.3096,-95.8164,-94.3375,-92.8692,-91.4074];
0220         tv = [tv,-89.9484,-88.4886,-87.0242,-85.5515,-84.0665,-82.5651,-81.0428,-79.4950,-77.9162,-76.3006,-74.6415,-72.9310,-71.1600,-69.3175,-67.3903,-65.3614,-63.2095,-60.9063];%Vertical camera
0221 %
0222         kv = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%Petite camera
0223         kv = [kv,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,0,0,0,0,0,0];%Grande camera
0224 %
0225         Ri = 2360;ai = 800;fi = [1.0,0.0,0.0];        
0226 %
0227         sd = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];%Petite camera
0228         sd = [sd,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,2,2,2,2,2,2];%Grande camera
0229         r1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0230         r1 = [r1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0231         r2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0232         r2 = [r2,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0233         lc = 1*ones(1,59);
0234         lf = 1000*ones(1,59);
0235         lfp= 1000*ones(1,59);
0236         kdiag = [20,40,60,80,100,120,140,160,30;40,60,80,100,120,140,160,180,170];
0237         ef = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0238         ef = [ef,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,1,1,1,1,1,1];
0239         tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0240         tf = [tf;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0241         ea = [0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0242         ea = [ea,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0243         ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0244         ta = [ta;'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0245         ec = [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0246         ec = [ec,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0247         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0248         tc = [tc;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0249         ed = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];
0250         ed = [ed,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,2,2,2,2,2,2];
0251         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0252         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0253         lad = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0254         lad = [lad,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0255         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0256         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0257         lpm = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0258         lpm = [lpm,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,0,0,0,0,0,0];
0259         td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0260         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0261         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0262         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0263         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0264         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0265         kd = ones(59,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0266         phf = ones(59,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 � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0267         res = ones(59,1)*[6,-0.9];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0268         Gain = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];   
0269         Gain = [Gain,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,1,1,1,1,1,1];       
0270         Offset = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0271         Offset = [Offset,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,0,0,0,0,0,0];
0272         pur = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0273         pur = [pur,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,0,0,0,0,0,0];
0274         chordstatus = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0275         chordstatus = [chordstatus,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1];  
0276 %
0277         EG=[0.86 1.0269 1.1958 1.3642 1.5365 1.7049 1.8709 2.0370 2.1994 2.3651 2.4803 2.3651];
0278         EG=[EG 2.1994 2.037 1.8709 1.7049 1.5365 1.3642 1.1958 1.0269 0.86];
0279 
0280  % avec camera verticale sans decalage
0281         EG=[EG 1e-3 1e-3 1e-3 1e-3 1e-3 0.1208 0.2889 0.4581 0.6249 0.86 1.0269 1.1958 1.3642 1.5365 1.7049];
0282         EG=[EG 1.8709 2.0370 2.1994 2.3651 2.4803 2.3651 2.1994 2.037 1.8709 1.7049 1.5365 1.3642 1.1958 1.0269 0.86];
0283         EG=[EG 0.6249 0.4581 0.2889 0.1208 1e-3 1e-3 1e-3 1e-3]*1e-3;
0284     elseif (xdate >= 19980501 & xdate < 19991118),%choc >24000 � <=28353
0285         mv = [-1.5000,-2.4500,-3.4000,-4.3500,-5.3000,-6.2500,-7.2000,-8.1500,-9.1000,-10.0500,-11.0000,-11.9500,-12.9000,-13.8500,-14.8000,-15.7500,-16.7000,-17.6500,-18.6000,-19.5500,-20.5000];
0286          mv = [mv,-71.0000,-71.9756,-72.9513,-73.9270,-74.9027,-75.8783,-76.8540,-77.8297,-78.8054,-79.7810,-80.7567];
0287           mv = [mv,-81.7324,-82.7081,-83.6837,-84.6594,-85.6351,-86.6108,-87.5864,-88.5621,-89.5378,-90.5135,-91.4891];
0288           mv = [mv,-92.4648,-93.4405,-94.4162,-95.3918,-96.3675,-97.3432,-98.3189,-99.2945,-100.2702,-101.2459,-102.2216,-103.1972,-104.1729,-105.1486,-106.1243,-107.1000];        
0289 %
0290          tv = [-16.2113,-14.5156,-12.8425,-11.1865,-9.5429,-7.9067,-6.2735,-4.6386,-2.9976,-1.3456,0.3222,2.0109,3.7263,5.4746,7.2625,9.0981,10.9904,12.9503,14.9909,17.1281,19.3825];
0291         tv = [tv,-126.4985,-123.5939,-120.9769,-118.5775,-116.3486,-114.2569,-112.2775,-110.3915,-108.5837,-106.8400,-105.1564,-103.5184,-101.9207,-100.3570,-98.8216,-97.3096,-95.8164,-94.3375,-92.8692,-91.4074];
0292         tv = [tv,-89.9484,-88.4886,-87.0242,-85.5515,-84.0665,-82.5651,-81.0428,-79.4950,-77.9162,-76.3006,-74.6415,-72.9310,-71.1600,-69.3175,-67.3903,-65.3614,-63.2095,-60.9063];%Vertical camera
0293 %
0294         kv = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%Petite camera
0295         kv = [kv,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,0,0,0,0,0,0];%Grande camera
0296 %
0297         Ri = 2360;ai = 800;fi = [1.0,0.0,0.0];        
0298 %
0299         sd = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];%Petite camera
0300         sd = [sd,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,2,2,2,2,2,2];%Grande camera
0301         r1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0302         r1 = [r1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0303         r2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0304         r2 = [r2,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0305         lc = 1*ones(1,59);
0306         lf = 1000*ones(1,59);
0307         lfp= 1000*ones(1,59);
0308         kdiag = [20,40,60,80,100,120,140,160,30;40,60,80,100,120,140,160,180,170];
0309         ef = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0310         ef = [ef,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,1,1,1,1,1,1];
0311         tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0312         tf = [tf;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0313         ea = [0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0314         ea = [ea,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0315         ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0316         ta = [ta;'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0317         ec = [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0318         ec = [ec,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0319         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0320         tc = [tc;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0321         ed = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];
0322         ed = [ed,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,2,2,2,2,2,2];
0323         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0324         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0325         lad = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0326         lad = [lad,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0327         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0328         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0329         lpm = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0330         lpm = [lpm,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,0,0,0,0,0,0];
0331         td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0332         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0333         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0334         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0335         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0336         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0337         kd = ones(59,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0338         phf = ones(59,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 � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0339         res = ones(59,1)*[6,-0.9];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0340         Gain = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];   
0341         Gain = [Gain,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,1,1,1,1,1,1];       
0342         Offset = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0343         Offset = [Offset,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,0,0,0,0,0,0];
0344         pur = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0345         pur = [pur,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,0,0,0,0,0,0];
0346         chordstatus = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0347         chordstatus = [chordstatus,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1];  
0348 %
0349         EG = [2.1010 2.1422 2.1794 2.2160 2.2557 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597];%Etendue g�om�trique petite camera
0350         EG = [EG 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];        
0351 %
0352         EG = [EG 1.7150 1.7656 1.8101 1.8542 1.8980 1.9414 1.9812 2.0238 2.0627 2.1010 2.1422 2.1794 2.2160 2.2557];%Etendue g�om�trique grande camera
0353         EG = [EG 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];
0354         EG = [EG 2.0627 2.0238 1.9812 1.9414 1.8980 1.8542 1.8101 1.7656]*1e-3;            
0355     elseif (xdate >= 19991118 & xdate < 20011215),%choc >28353 <=29394
0356         mv = [-1.5000,-2.4500,-3.4000,-4.3500,-5.3000,-6.2500,-7.2000,-8.1500,-9.1000,-10.0500,-11.0000,-11.9500,-12.9000,-13.8500,-14.8000,-15.7500,-16.7000,-17.6500,-18.6000,-19.5500,-20.5000];
0357         mv = [mv,108.05,107.1,106.15,105.2,104.25,103.3,102.35,101.4,100.45,99.5,98.55,97.6,96.65,95.7,94.75,93.8,92.85,91.9,90.95,90.0,89.05,88.1,87.15,86.2,85.25,84.3,83.35,82.4,81.45,80.5,79.55,78.6,77.65,76.7,75.75,74.8,73.85,72.9];            
0358 %
0359          tv = [-16.2113,-14.5156,-12.8425,-11.1865,-9.5429,-7.9067,-6.2735,-4.6386,-2.9976,-1.3456,0.3222,2.0109,3.7263,5.4746,7.2625,9.0981,10.9904,12.9503,14.9909,17.1281,19.3825];
0360         tv = [tv,49.7175,53.2928,56.4438,59.2913,61.9100,64.3502,66.6474,68.8282,70.9129,72.9178,74.8560,76.7383,78.5741,80.3714,82.1373,83.8782,85.5998,87.3077,89.0070,90.7026,92.3996];
0361            tv = [tv,94.1028,95.8173,97.5484,99.3018,101.0836,102.9004,104.7599,106.6706,108.6427,110.6882,112.8218,115.0615,117.4309,119.9607,122.6935,125.6907,129.0476];
0362 %
0363         kv = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%Petite camera
0364         kv = [kv,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,0,0,0,0,0,0];%Grande camera
0365 %
0366         Ri = 2360;ai = 800;fi = [1.0,0.0,0.0];        
0367 %
0368         sd = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];%Petite camera
0369         sd = [sd,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,2,2,2,2,2,2];%Grande camera
0370         r1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0371         r1 = [r1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0372         r2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0373         r2 = [r2,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0374         lc = 1*ones(1,59);
0375         lf = 1000*ones(1,59);
0376         lfp = 1000*ones(1,59);
0377         kdiag = [20,40,60,80,100,120,140,160,30;40,60,80,100,120,140,160,180,170];
0378         ef = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0379         ef = [ef,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,1,1,1,1,1,1];
0380         tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0381         tf = [tf;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0382         ea = [0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0383         ea = [ea,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0384         ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0385         ta = [ta;'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0386         ec = [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0387         ec = [ec,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0388         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0389         tc = [tc;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0390         ed = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];
0391         ed = [ed,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,2,2,2,2,2,2];
0392         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0393         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0394         lad = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0395         lad = [lad,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0396         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0397         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0398         lpm = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0399         lpm = [lpm,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,0,0,0,0,0,0];
0400         td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0401         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0402         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0403         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0404         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0405         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0406         kd = ones(59,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0407         phf = ones(59,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 � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0408         res = ones(59,1)*[6,-0.9];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0409         Gain = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];   
0410         Gain = [Gain,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,1,1,1,1,1,1];       
0411         Offset = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0412         Offset = [Offset,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,0,0,0,0,0,0];
0413         pur = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0414         pur = [pur,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,0,0,0,0,0,0];
0415         chordstatus = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%Petite cam�ra (pas en place)
0416         chordstatus = [chordstatus,0,0,0,0,0,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,0,0,0,0,0];%Grande cam�ra (champ r�duit)
0417 %
0418         EG = [2.1010 2.1422 2.1794 2.2160 2.2557 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597];%Etendue g�om�trique petite camera
0419         EG = [EG 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];        
0420 %
0421         EG = [EG 1.7150 1.7656 1.8101 1.8542 1.8980 1.9414 1.9812 2.0238 2.0627 2.1010 2.1422 2.1794 2.2160 2.2557];%Etendue g�om�trique grande camera
0422         EG = [EG 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];
0423         EG = [EG 2.0627 2.0238 1.9812 1.9414 1.8980 1.8542 1.8101 1.7656]*1e-3;
0424     elseif (xdate >= 20011215 & xdate<20021220),%choc >29394 &<=30855
0425         
0426 %        XD38 horizontale (voie 41 horizontale), XD21 verticale(voie 11 perpendiculaire)
0427 %        XD21, 21-1 (la 1 regarde l'int�rieur du plasma et dans la camra se trouve � gauche)
0428         mv = [80.5000,81.4500,82.4000,83.3500,84.3000,85.2500,86.2000,87.1500,88.1000,89.0500,90.0000,90.9500,91.9000,92.8500,93.8000,94.7500,95.7000,96.6500,97.6000,98.5500,99.5000];
0429 %        XD21, 1-21 (la 1 regarde l'ext�rieur du plasma et dans la camra se trouve � droite )
0430 %        mv = [99.5000,98.5500,97.6000,96.6500,95.7000,94.7500,93.8000,92.8500,91.9000,90.9500,90.0000,89.0500,88.1000,87.1500,86.2000,85.2500,84.3000,83.3500,82.4000,81.4500,80.5000];
0431 %        XD38, 22-59 de haut en bas, 22 regarde le bas du plasma
0432         mv = [mv,18.05,17.10,16.15,15.2,14.25,13.30,12.35,11.40,10.45,9.50,8.55,7.60,6.65,5.70,4.75,3.80,2.85,1.90,0.95,0,-0.95,-1.90,-2.85,-3.80,-4.75,-5.70,-6.65,-7.60,-8.55,-9.50,-10.45,-11.40,-12.35,-13.30,-14.25,-15.20,-16.15,-17.10];
0433 %        XD38, 59-22 de haut en bas, 22 regarde le haut du plasma
0434 %        mv = [mv,-18.05,-17.10,-16.15,-15.2,-14.25,-13.30,-12.35,-11.40,-10.45,-9.50,-8.55,-7.60,-6.65,-5.70,-4.75,-3.80,-2.85,-1.90,-0.95,0,0.95,1.90,2.85,3.80,4.75,5.70,6.65,7.60,8.55,9.50,10.45,11.40,12.35,13.30,14.25,15.20,16.15,17.10];
0435 %
0436 %        tv correspondant � XD21, 21-1
0437         tv = [109.4519,107.3820,105.3801,103.4349,101.5366,99.6768,97.8481,96.0436,94.2573,92.4834,90.7162,88.9505,87.1808,85.4017,83.6076,81.7924,79.9499,78.0729,76.1535,74.1829,72.1504];
0438 %        tv correspondant � XD21, 1-21
0439 %       tv = [72.9178,74.8560,76.7383,78.5741,80.3714,82.1373,83.8782,85.5998,87.3077,89.0070,90.7026,92.3996,94.1028,95.8173,97.5484,99.3018,101.0836,102.9004,104.7599,106.6706,108.6427];
0440 %        tv correspondant � XD38, 22-59 de haut en bas
0441         tv = [tv,-32.9550,-30.4376,-28.1197,-25.9598,-23.9278,-22.0014,-20.1631,-18.3991,-16.6980,-15.0505,-13.4487,-11.8858,-10.3558,-8.8536,-7.3742,-5.9134,-4.4672,-3.0318,-1.6036,-0.1790,1.2452];
0442         tv = [tv,2.6727,4.1068,5.5511,7.0094,8.4857,9.9843,11.5097,13.0673,14.6628,16.3029,17.9953,19.7492,21.5755,23.4876,25.5024,27.6413,29.9330];
0443 %        tv = [tv,-32.9204,-30.3928,-28.0656,-25.8972,-23.8571,-21.9230,-20.0773,-18.3060,-16.5978,-14.9433,-13.3346,-11.7648,-10.2279,-8.7187,-7.2323,-5.7644,-4.3110,-2.8681,-1.4323,0.0,1.4323];
0444 %        tv = [tv,2.8681,4.3110,5.7644,7.2323,8.7187,10.2279,11.7648,13.3346,14.9433,16.5978,18.3060,20.0773,21.9230,23.8571,25.8972,28.0656,30.3928];
0445 %        tv correspondant � XD38, 59-22 de haut en bas
0446 %        tv = [tv,32.9204,30.3928,28.0656,25.8972,23.8571,21.9230,20.0773,18.3060,16.5978,14.9433,13.3346,11.7648,10.2279,8.7187,7.2323,5.7644,4.3110,2.8681,1.4323,0.0,-1.4323];
0447 %        tv = [tv,-2.8681,-4.3110,-5.7644,-7.2323,-8.7187,-10.2279,-11.7648,-13.3346,-14.9433,-16.5978,-18.3060,-20.0773,-21.9230,-23.8571,-25.8972,-28.0656,-30.3928];
0448 %        tv = [tv,32.4170,29.9330,27.6413,25.5024,23.4876,21.5755,19.7492,17.9953,16.3029,14.6628,13.0673,11.5097,9.9843,8.4857,7.0094,5.5511,4.1068,2.6727,1.2452,-0.1790,-1.6036];
0449 %        tv = [tv,-3.0318,-4.4672,-5.9134,-7.3742,-8.8536,-10.3558,-11.8858,-13.4487,-15.0505,-16.6980,-18.3991,-20.1631,-22.0014,-23.9278,-25.9598,-28.1197,-30.4376];
0450 %
0451         kv = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%Petite camera
0452         kv = [kv,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,0,0,0,0,0,0];%Grande camera
0453 %
0454         Ri = 2360;ai = 800;fi = [1.0,0.0,0.0];        
0455 %
0456         sd = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];%Petite camera
0457         sd = [sd,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,2,2,2,2,2,2];%Grande camera
0458         r1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0459         r1 = [r1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0460         r2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0461         r2 = [r2,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0462         lc = 1*ones(1,59);
0463         lf = 1000*ones(1,59);
0464         lfp = 1000*ones(1,59);
0465         kdiag = [20,40,60,80,100,120,140,160,30;40,60,80,100,120,140,160,180,170];
0466         ef = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0467         ef = [ef,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,1,1,1,1,1,1];
0468         tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0469         tf = [tf;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0470         ea = [0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0471         ea = [ea,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0472         ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0473         ta = [ta;'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0474         ec = [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0475         ec = [ec,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0476         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0477         tc = [tc;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0478         ed = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];
0479         ed = [ed,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,2,2,2,2,2,2];
0480         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0481         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0482         lad = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0483         lad = [lad,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0484         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0485         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0486         lpm = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0487         lpm = [lpm,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,0,0,0,0,0,0];
0488         td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0489         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0490         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0491         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0492         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0493         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0494         kd = ones(59,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0495         phf = ones(59,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 � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0496         res = ones(59,1)*[6,-0.9];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0497         Gain = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];   
0498         Gain = [Gain,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,1,1,1,1,1,1];       
0499         Offset = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0500         Offset = [Offset,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,0,0,0,0,0,0];
0501         pur = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0502         pur = [pur,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,0,0,0,0,0,0];
0503 %
0504         chordstatus = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];%petite camera � la verticale
0505         chordstatus = [chordstatus,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,0,1,1,1,1,1,1,1];%grande camra horizontale
0506         EG = [2.1010 2.1422 2.1794 2.2160 2.2557 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597];%Etendue g�om�trique petite camera
0507         EG = [EG 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];        
0508 %
0509         EG = [EG 1.7150 1.7656 1.8101 1.8542 1.8980 1.9414 1.9812 2.0238 2.0627 2.1010 2.1422 2.1794 2.2160 2.2557];%Etendue g�om�trique grande camera
0510         EG = [EG 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];
0511         EG = [EG 2.0627 2.0238 1.9812 1.9414 1.8980 1.8542 1.8101 1.7656]*1e-3;    
0512         
0513     elseif (xdate >= 20021220& xdate<20050215),%choc >30855 &<=34190
0514         
0515 %        XD38 horizontale (voie 41 horizontale), XD21 verticale(voie 11 perpendiculaire)
0516 %        XD21, 21-1 (la 1 regarde l'int�rieur du plasma et dans la camra se trouve � gauche)
0517         mv = [80.5000,81.4500,82.4000,83.3500,84.3000,85.2500,86.2000,87.1500,88.1000,89.0500,90.0000,90.9500,91.9000,92.8500,93.8000,94.7500,95.7000,96.6500,97.6000,98.5500,99.5000];
0518 %        XD21, 1-21 (la 1 regarde l'ext�rieur du plasma et dans la camra se trouve � droite )
0519 %        mv = [99.5000,98.5500,97.6000,96.6500,95.7000,94.7500,93.8000,92.8500,91.9000,90.9500,90.0000,89.0500,88.1000,87.1500,86.2000,85.2500,84.3000,83.3500,82.4000,81.4500,80.5000];
0520 %        XD38, 22-59 de haut en bas, 22 regarde le bas du plasma
0521         mv = [mv,18.05,17.10,16.15,15.2,14.25,13.30,12.35,11.40,10.45,9.50,8.55,7.60,6.65,5.70,4.75,3.80,2.85,1.90,0.95,0,-0.95,-1.90,-2.85,-3.80,-4.75,-5.70,-6.65,-7.60,-8.55,-9.50,-10.45,-11.40,-12.35,-13.30,-14.25,-15.20,-16.15,-17.10];
0522 %        XD38, 59-22 de haut en bas, 22 regarde le haut du plasma
0523 %        mv = [mv,-18.05,-17.10,-16.15,-15.2,-14.25,-13.30,-12.35,-11.40,-10.45,-9.50,-8.55,-7.60,-6.65,-5.70,-4.75,-3.80,-2.85,-1.90,-0.95,0,0.95,1.90,2.85,3.80,4.75,5.70,6.65,7.60,8.55,9.50,10.45,11.40,12.35,13.30,14.25,15.20,16.15,17.10];
0524 %
0525 %        tv correspondant � XD21, 21-1
0526         tv = [109.4519,107.3820,105.3801,103.4349,101.5366,99.6768,97.8481,96.0436,94.2573,92.4834,90.7162,88.9505,87.1808,85.4017,83.6076,81.7924,79.9499,78.0729,76.1535,74.1829,72.1504];
0527 %        tv correspondant � XD21, 1-21
0528 %       tv = [72.9178,74.8560,76.7383,78.5741,80.3714,82.1373,83.8782,85.5998,87.3077,89.0070,90.7026,92.3996,94.1028,95.8173,97.5484,99.3018,101.0836,102.9004,104.7599,106.6706,108.6427];
0529 %        tv correspondant � XD38, 22-59 de haut en bas
0530         tv = [tv,-32.9550,-30.4376,-28.1197,-25.9598,-23.9278,-22.0014,-20.1631,-18.3991,-16.6980,-15.0505,-13.4487,-11.8858,-10.3558,-8.8536,-7.3742,-5.9134,-4.4672,-3.0318,-1.6036,-0.1790,1.2452];
0531         tv = [tv,2.6727,4.1068,5.5511,7.0094,8.4857,9.9843,11.5097,13.0673,14.6628,16.3029,17.9953,19.7492,21.5755,23.4876,25.5024,27.6413,29.9330];
0532 %        tv = [tv,-32.9204,-30.3928,-28.0656,-25.8972,-23.8571,-21.9230,-20.0773,-18.3060,-16.5978,-14.9433,-13.3346,-11.7648,-10.2279,-8.7187,-7.2323,-5.7644,-4.3110,-2.8681,-1.4323,0.0,1.4323];
0533 %        tv = [tv,2.8681,4.3110,5.7644,7.2323,8.7187,10.2279,11.7648,13.3346,14.9433,16.5978,18.3060,20.0773,21.9230,23.8571,25.8972,28.0656,30.3928];
0534 %        tv correspondant � XD38, 59-22 de haut en bas
0535 %        tv = [tv,32.9204,30.3928,28.0656,25.8972,23.8571,21.9230,20.0773,18.3060,16.5978,14.9433,13.3346,11.7648,10.2279,8.7187,7.2323,5.7644,4.3110,2.8681,1.4323,0.0,-1.4323];
0536 %        tv = [tv,-2.8681,-4.3110,-5.7644,-7.2323,-8.7187,-10.2279,-11.7648,-13.3346,-14.9433,-16.5978,-18.3060,-20.0773,-21.9230,-23.8571,-25.8972,-28.0656,-30.3928];
0537 %        tv = [tv,32.4170,29.9330,27.6413,25.5024,23.4876,21.5755,19.7492,17.9953,16.3029,14.6628,13.0673,11.5097,9.9843,8.4857,7.0094,5.5511,4.1068,2.6727,1.2452,-0.1790,-1.6036];
0538 %        tv = [tv,-3.0318,-4.4672,-5.9134,-7.3742,-8.8536,-10.3558,-11.8858,-13.4487,-15.0505,-16.6980,-18.3991,-20.1631,-22.0014,-23.9278,-25.9598,-28.1197,-30.4376];
0539 %
0540         kv = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%Petite camera
0541         kv = [kv,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,0,0,0,0,0,0];%Grande camera
0542 %
0543         Ri = 2360;ai = 800;fi = [1.0,0.0,0.0];        
0544 %
0545         sd = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];%Petite camera
0546         sd = [sd,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,2,2,2,2,2,2];%Grande camera
0547         r1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0548         r1 = [r1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0549         r2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0550         r2 = [r2,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0551         lc = 1*ones(1,59);
0552         lf = 1000*ones(1,59);
0553         lfp = 1000*ones(1,59);
0554         kdiag = [20,40,60,80,100,120,140,160,30;40,60,80,100,120,140,160,180,170];
0555         ef = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0556         ef = [ef,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,1,1,1,1,1,1];
0557         tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0558         tf = [tf;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0559         ea = [0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0560         ea = [ea,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0561         ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0562         ta = [ta;'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0563         ec = [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0564         ec = [ec,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0565         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0566         tc = [tc;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0567         ed = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];
0568         ed = [ed,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,2,2,2,2,2,2];
0569         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0570         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0571         lad = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0572         lad = [lad,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0573         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0574         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0575         lpm = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0576         lpm = [lpm,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,0,0,0,0,0,0];
0577         td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0578         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0579         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0580         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0581         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0582         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0583         kd = ones(59,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0584         phf = ones(59,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 � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0585         res = ones(59,1)*[6,-0.9];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0586         Gain = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];   
0587         Gain = [Gain,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,1,1,1,1,1,1];       
0588         Offset = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0589         Offset = [Offset,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,0,0,0,0,0,0];
0590         pur = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0591         pur = [pur,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,0,0,0,0,0,0];
0592 %
0593         %chordstatus = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%petite camera � la verticale
0594         chordstatus = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0595         chordstatus = [chordstatus,1,1,0,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,0,1,1,1,1,1,1,1];%grande camra horizontale
0596         EG = [2.1010 2.1422 2.1794 2.2160 2.2557 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597];%Etendue g�om�trique petite camera
0597         EG = [EG 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];        
0598 %
0599         EG = [EG 1.7150 1.7656 1.8101 1.8542 1.8980 1.9414 1.9812 2.0238 2.0627 2.1010 2.1422 2.1794 2.2160 2.2557];%Etendue g�om�trique grande camera
0600         EG = [EG 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];
0601         EG = [EG 2.0627 2.0238 1.9812 1.9414 1.8980 1.8542 1.8101 1.7656]*1e-3;    
0602     elseif (xdate >= 20050215 & xdate<20170101) ,%choc >=34190
0603         
0604 %        XD38 horizontale (voie 41 horizontale), XD21 verticale(voie 11 perpendiculaire)
0605 %        XD21, 21-1 (la 1 regarde l'int�rieur du plasma et dans la camra se trouve � gauche)
0606         mv = [80.5000,81.4500,82.4000,83.3500,84.3000,85.2500,86.2000,87.1500,88.1000,89.0500,90.0000,90.9500,91.9000,92.8500,93.8000,94.7500,95.7000,96.6500,97.6000,98.5500,99.5000];
0607 %        XD21, 1-21 (la 1 regarde l'ext�rieur du plasma et dans la camra se trouve � droite )
0608 %        mv = [99.5000,98.5500,97.6000,96.6500,95.7000,94.7500,93.8000,92.8500,91.9000,90.9500,90.0000,89.0500,88.1000,87.1500,86.2000,85.2500,84.3000,83.3500,82.4000,81.4500,80.5000];
0609 %        XD38, 22-59 de haut en bas, 22 regarde le bas du plasma
0610         mv = [mv,18.05,17.10,16.15,15.2,14.25,13.30,12.35,11.40,10.45,9.50,8.55,7.60,6.65,5.70,4.75,3.80,2.85,1.90,0.95,0,-0.95,-1.90,-2.85,-3.80,-4.75,-5.70,-6.65,-7.60,-8.55,-9.50,-10.45,-11.40,-12.35,-13.30,-14.25,-15.20,-16.15,-17.10];
0611 %        XD38, 59-22 de haut en bas, 22 regarde le haut du plasma
0612 %        mv = [mv,-18.05,-17.10,-16.15,-15.2,-14.25,-13.30,-12.35,-11.40,-10.45,-9.50,-8.55,-7.60,-6.65,-5.70,-4.75,-3.80,-2.85,-1.90,-0.95,0,0.95,1.90,2.85,3.80,4.75,5.70,6.65,7.60,8.55,9.50,10.45,11.40,12.35,13.30,14.25,15.20,16.15,17.10];
0613 %
0614 %        tv correspondant � XD21, 21-1
0615         tv = [109.4519,107.3820,105.3801,103.4349,101.5366,99.6768,97.8481,96.0436,94.2573,92.4834,90.7162,88.9505,87.1808,85.4017,83.6076,81.7924,79.9499,78.0729,76.1535,74.1829,72.1504];
0616 %        tv correspondant � XD21, 1-21
0617 %           tv = [72.9178,74.8560,76.7383,78.5741,80.3714,82.1373,83.8782,85.5998,87.3077,89.0070,90.7026,92.3996,94.1028,95.8173,97.5484,99.3018,101.0836,102.9004,104.7599,106.6706,108.6427];
0618 %        tv correspondant � XD38, 22-59 de haut en bas
0619         tv =[tv,-32.9763,-30.4649,-28.1525,-25.9977,-23.9706,-22.0488,-20.2149,-18.4552,-16.7583,-15.1150,-13.5174,-11.9586,-10.4328,-8.9346,-7.4594,-6.0029,-4.5610,-3.1300,-1.7063,-0.2865,1.1330];
0620         tv =[tv,2.5554,3.9843,5.4232,6.8759,8.3461,9.8383,11.3570,12.9073,14.4949,16.1265,17.8096,19.5532,21.3680,23.2671,25.2669,27.3885,29.6595];
0621 %        tv = [tv,-32.9204,-30.3928,-28.0656,-25.8972,-23.8571,-21.9230,-20.0773,-18.3060,-16.5978,-14.9433,-13.3346,-11.7648,-10.2279,-8.7187,-7.2323,-5.7644,-4.3110,-2.8681,-1.4323,0.0,1.4323];
0622 %        tv = [tv,2.8681,4.3110,5.7644,7.2323,8.7187,10.2279,11.7648,13.3346,14.9433,16.5978,18.3060,20.0773,21.9230,23.8571,25.8972,28.0656,30.3928];
0623 %        tv correspondant � XD38, 59-22 de haut en bas
0624 %        tv = [tv,32.9204,30.3928,28.0656,25.8972,23.8571,21.9230,20.0773,18.3060,16.5978,14.9433,13.3346,11.7648,10.2279,8.7187,7.2323,5.7644,4.3110,2.8681,1.4323,0.0,-1.4323];
0625 %        tv = [tv,-2.8681,-4.3110,-5.7644,-7.2323,-8.7187,-10.2279,-11.7648,-13.3346,-14.9433,-16.5978,-18.3060,-20.0773,-21.9230,-23.8571,-25.8972,-28.0656,-30.3928];
0626 %        tv = [tv,32.4170,29.9330,27.6413,25.5024,23.4876,21.5755,19.7492,17.9953,16.3029,14.6628,13.0673,11.5097,9.9843,8.4857,7.0094,5.5511,4.1068,2.6727,1.2452,-0.1790,-1.6036];
0627 %        tv = [tv,-3.0318,-4.4672,-5.9134,-7.3742,-8.8536,-10.3558,-11.8858,-13.4487,-15.0505,-16.6980,-18.3991,-20.1631,-22.0014,-23.9278,-25.9598,-28.1197,-30.4376];
0628 %
0629         kv = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%Petite camera
0630         kv = [kv,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,0,0,0,0,0,0];%Grande camera
0631 %
0632         Ri = 2360;ai = 800;fi = [1.0,0.0,0.0];        
0633 %
0634         sd = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];%Petite camera
0635         sd = [sd,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,2,2,2,2,2,2];%Grande camera
0636         r1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0637         r1 = [r1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0638         r2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0639         r2 = [r2,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0640         lc = 1*ones(1,59);
0641         lf = 1000*ones(1,59);
0642         lfp = 1000*ones(1,59);
0643         kdiag = [20,40,60,80,100,120,140,160,50;40,60,80,100,120,140,160,180,110];
0644         ef = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0645         ef = [ef,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,1,1,1,1,1,1];
0646         tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0647         tf = [tf;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0648         ea = [0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0649         ea = [ea,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0650         ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0651         ta = [ta;'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0652         ec = [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0653         ec = [ec,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0654         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0655         tc = [tc;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0656         ed = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];
0657         ed = [ed,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,2,2,2,2,2,2];
0658         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0659         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0660         lad = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0661         lad = [lad,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0662         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0663         lod = [lod,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0664         lpm = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0665         lpm = [lpm,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,0,0,0,0,0,0];
0666         td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0667         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0668         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0669         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0670         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0671         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0672         kd = ones(59,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0673         phf = ones(59,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 � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0674         res = ones(59,1)*[6,-0.9];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0675         Gain = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];   
0676         Gain = [Gain,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,1,1,1,1,1,1];       
0677         Offset = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0678         Offset = [Offset,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,0,0,0,0,0,0];
0679         pur = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0680         pur = [pur,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,0,0,0,0,0,0];
0681 %
0682         %chordstatus = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%petite camera � la verticale
0683         chordstatus = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0684         chordstatus =[chordstatus,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,1,1,1,1,1,1];%grande camra horizontale
0685         EG = [2.1010 2.1422 2.1794 2.2160 2.2557 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597];%Etendue g�om�trique petite camera
0686         EG = [EG 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];        
0687 %
0688         EG = [EG 1.7150 1.7656 1.8101 1.8542 1.8980 1.9414 1.9812 2.0238 2.0627 2.1010 2.1422 2.1794 2.2160 2.2557];%Etendue g�om�trique grande camera
0689         EG = [EG 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];
0690         EG = [EG 2.0627 2.0238 1.9812 1.9414 1.8980 1.8542 1.8101 1.7656]*1e-3;    
0691 
0692     elseif (xdate >= 20170101 ),%choc >=52000 (WEST tokamak)
0693         
0694 %        XD38 horizontale (voie 41 horizontale), XD21 verticale(voie 11 perpendiculaire)
0695 %        XD21, 21-1 (la 1 regarde l'int�rieur du plasma et dans la camra se trouve � gauche)
0696 %        mv = [80.5000,81.4500,82.4000,83.3500,84.3000,85.2500,86.2000,87.1500,88.1000,89.0500,90.0000,90.9500,91.9000,92.8500,93.8000,94.7500,95.7000,96.6500,97.6000,98.5500,99.5000];
0697 %        XD21, 1-21 (la 1 regarde l'ext�rieur du plasma et dans la camra se trouve � droite )
0698 %        mv = [99.5000,98.5500,97.6000,96.6500,95.7000,94.7500,93.8000,92.8500,91.9000,90.9500,90.0000,89.0500,88.1000,87.1500,86.2000,85.2500,84.3000,83.3500,82.4000,81.4500,80.5000];
0699 %        XD38, 22-59 de haut en bas, 22 regarde le bas du plasma
0700         mv = [18.05,17.10,16.15,15.2,14.25,13.30,12.35,11.40,10.45,9.50,8.55,7.60,6.65,5.70,4.75,3.80,2.85,1.90,0.95,0,-0.95,-1.90,-2.85,-3.80,-4.75,-5.70,-6.65,-7.60,-8.55,-9.50,-10.45,-11.40,-12.35,-13.30,-14.25,-15.20,-16.15,-17.10];
0701 %        XD38, 59-22 de haut en bas, 22 regarde le haut du plasma
0702 %        mv = [mv,-18.05,-17.10,-16.15,-15.2,-14.25,-13.30,-12.35,-11.40,-10.45,-9.50,-8.55,-7.60,-6.65,-5.70,-4.75,-3.80,-2.85,-1.90,-0.95,0,0.95,1.90,2.85,3.80,4.75,5.70,6.65,7.60,8.55,9.50,10.45,11.40,12.35,13.30,14.25,15.20,16.15,17.10];
0703 %
0704 %        tv correspondant � XD21, 21-1
0705 %        tv = [109.4519,107.3820,105.3801,103.4349,101.5366,99.6768,97.8481,96.0436,94.2573,92.4834,90.7162,88.9505,87.1808,85.4017,83.6076,81.7924,79.9499,78.0729,76.1535,74.1829,72.1504];
0706 %        tv correspondant � XD21, 1-21
0707 %           tv = [72.9178,74.8560,76.7383,78.5741,80.3714,82.1373,83.8782,85.5998,87.3077,89.0070,90.7026,92.3996,94.1028,95.8173,97.5484,99.3018,101.0836,102.9004,104.7599,106.6706,108.6427];
0708 %        tv correspondant � XD38, 22-59 de haut en bas
0709         tv =[-32.9763,-30.4649,-28.1525,-25.9977,-23.9706,-22.0488,-20.2149,-18.4552,-16.7583,-15.1150,-13.5174,-11.9586,-10.4328,-8.9346,-7.4594,-6.0029,-4.5610,-3.1300,-1.7063,-0.2865,1.1330];
0710         tv =[tv,2.5554,3.9843,5.4232,6.8759,8.3461,9.8383,11.3570,12.9073,14.4949,16.1265,17.8096,19.5532,21.3680,23.2671,25.2669,27.3885,29.6595];
0711 %        tv = [tv,-32.9204,-30.3928,-28.0656,-25.8972,-23.8571,-21.9230,-20.0773,-18.3060,-16.5978,-14.9433,-13.3346,-11.7648,-10.2279,-8.7187,-7.2323,-5.7644,-4.3110,-2.8681,-1.4323,0.0,1.4323];
0712 %        tv = [tv,2.8681,4.3110,5.7644,7.2323,8.7187,10.2279,11.7648,13.3346,14.9433,16.5978,18.3060,20.0773,21.9230,23.8571,25.8972,28.0656,30.3928];
0713 %        tv correspondant � XD38, 59-22 de haut en bas
0714 %        tv = [tv,32.9204,30.3928,28.0656,25.8972,23.8571,21.9230,20.0773,18.3060,16.5978,14.9433,13.3346,11.7648,10.2279,8.7187,7.2323,5.7644,4.3110,2.8681,1.4323,0.0,-1.4323];
0715 %        tv = [tv,-2.8681,-4.3110,-5.7644,-7.2323,-8.7187,-10.2279,-11.7648,-13.3346,-14.9433,-16.5978,-18.3060,-20.0773,-21.9230,-23.8571,-25.8972,-28.0656,-30.3928];
0716 %        tv = [tv,32.4170,29.9330,27.6413,25.5024,23.4876,21.5755,19.7492,17.9953,16.3029,14.6628,13.0673,11.5097,9.9843,8.4857,7.0094,5.5511,4.1068,2.6727,1.2452,-0.1790,-1.6036];
0717 %        tv = [tv,-3.0318,-4.4672,-5.9134,-7.3742,-8.8536,-10.3558,-11.8858,-13.4487,-15.0505,-16.6980,-18.3991,-20.1631,-22.0014,-23.9278,-25.9598,-28.1197,-30.4376];
0718 %
0719 %        kv = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%Petite camera
0720         kv = [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,0,0,0,0,0,0];%Grande camera
0721 %
0722         Ri = 2360;ai = 800;fi = [1.0,0.0,0.0];        
0723 %
0724 %        sd = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];%Petite camera
0725         sd = [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,2,2,2,2,2,2];%Grande camera
0726 %        r1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0727         r1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0728 %        r2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0729         r2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0730         lc = 1*ones(1,38);
0731         lf = 1000*ones(1,38);
0732         lfp = 1000*ones(1,38);
0733         kdiag = [20,40,60,80,100,120,140,160,50;40,60,80,100,120,140,160,180,110];
0734 %        ef = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0735         ef = [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,1,1,1,1,1,1];
0736 %        tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0737         tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0738 %        ea = [0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0739         ea = [0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4];
0740 %        ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0741         ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0742 %        ec = [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0743         ec = [0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5];
0744 %        tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0745         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0746 %        ed = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];
0747         ed = [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,2,2,2,2,2,2];
0748 %        lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0749         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0750 %        lad = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0751         lad = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0752 %        lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0753         lod = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5];
0754 %        lpm = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0755         lpm = [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,0,0,0,0,0,0];
0756 %        td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0757 %        td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0758         td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0759         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0760         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0761         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0762         kd = ones(38,1)*[10,30,50,70,90,110,130,150,170,190,210,250];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0763         phf = ones(38,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 � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0764         res = ones(38,1)*[6,-0.9];%Parametres � peu pres adapt�s aux spectres de 57Co et 241Am enregistr�s en labo.
0765 %        Gain = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0766         Gain = [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,1,1,1,1,1,1];       
0767 %        Offset = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0768         Offset = [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,0,0,0,0,0,0];
0769 %        pur = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0770         pur = [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,0,0,0,0,0,0];
0771 %
0772         %chordstatus = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%petite camera � la verticale
0773 %        chordstatus = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
0774         chordstatus =[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,1,1,1,1,1,1];%grande camra horizontale
0775 %        EG = [2.1010 2.1422 2.1794 2.2160 2.2557 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597];%Etendue g�om�trique petite camera
0776 %        EG = [EG 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];
0777 %
0778         EG = [1.7150 1.7656 1.8101 1.8542 1.8980 1.9414 1.9812 2.0238 2.0627 2.1010 2.1422 2.1794 2.2160 2.2557];%Etendue g�om�trique grande camera
0779         EG = [EG 2.2912 2.3261 2.3641 2.3978 2.4308 2.4597 2.4308 2.3978 2.3641 2.3261 2.2912 2.2557 2.2160 2.1794 2.1422 2.1010];
0780         EG = [EG 2.0627 2.0238 1.9812 1.9414 1.8980 1.8542 1.8101 1.7656]*1e-3;    
0781 
0782 
0783     end        
0784 elseif strcmp(tokname,'FTU')==1,
0785     tok = 'FTU';
0786     if (xdate >= 20000101 & xdate <= 20000701),
0787         mv = [NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,10.45,9.5,8.55,7.6,6.65,5.7,4.75,3.8,2.85,1.9,0.95,0,-0.95,-1.90,-2.85,-3.80,-4.75,-5.7,-6.65,-7.6,-8.55,-9.5,-10.45,NaN,NaN,NaN,NaN,NaN,NaN,NaN];
0788          tv = [NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,-56.929,-47.102,-39.662,-33.373,-27.774,-22.628,-17.795,-13.178,-8.71,-4.333,0,4.333,8.71,13.178,17.795,22.628,27.774,33.373,39.662,47.102,56.929,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN];
0789         kv = [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,0,0,0,0,0,0];%Horizontal camera
0790 %
0791         Ri = 933;ai = 300;fi = [1.0,0.0,0.0];            
0792         sd = 2*ones(1,38);%Horizontal camera
0793         r1 = 5*ones(1,38);
0794         r2 = 5*ones(1,38);
0795         lc = 1*ones(1,38);
0796         lf = 1000*ones(1,38);
0797         lfp= 1000*ones(1,38);
0798         kdiag = [20,40,60,80,100,120,140,160,30;40,60,80,100,120,140,160,180,170];
0799         ef = ones(1,38);
0800         tf = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0801         tf = [tf;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0802         ea = 0.4*ones(1,38);
0803         ta = ['Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0804         ta = [ta;'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe';'Fe'];
0805         ec = 0.5*ones(1,38);
0806         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0807         tc = [tc;'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al'];
0808         ed = 2*ones(1,38);
0809         lod = 5*ones(1,38);
0810         lad = 5*ones(1,38);
0811         lpm = zeros(1,38);
0812         td = ['CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0813         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0814         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0815         td = [td;'CdTe';'CdTe';'CdTe';'CdTe';'CdTe';'CdTe'];
0816 %
0817            kd = ones(59,1)*[10,30,50,70,90,110,130,150,170,190,210,250];
0818         phf = ones(59,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];
0819         res = ones(59,1)*[6,-0.9];%Voir cas TS
0820         Gain = ones(1,38);   
0821         Offset = zeros(1,38);
0822         pur = zeros(1,38);
0823         chordstatus = [0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0];
0824     end
0825 elseif strcmp(tokname,'TdV')==1,
0826     tok = 'TdV';
0827         if mode == 'N',
0828             infoyp(2,['Default values for ',tokname,' / last update: 29/03/1995']);
0829         end
0830         mv = [0.0,0.0,0.0,0.0];
0831         tv = [0,-10.2866,-20.9248,-32.3924];
0832         kv = [7.0,7.0,7.0,7.0];  
0833         Ri = 780;ai = 280;fi = [1.2,0.26,0.0];
0834         sd = [1,1,1,1];
0835         r1 = [1.1284,1.1284,1.1284,1.1284];
0836         r2 = [2,2,2,2];
0837         lc = [95,95,95,95];
0838         lf = [30,30,30,30];
0839         lfp= [510,510,510,510];
0840         kdiag = [10,20,30,40,50,60,70,80,90,15;20,30,40,50,60,70,80,90,100,35];
0841         ef = [0.051,0.051,0.051,0.051];
0842         tf = ['Be';'Be';'Be';'Be';];
0843         ea = [1.24,1.24,1.24,1.24];
0844         ta = ['Al';'Al';'Al';'Al'];
0845         ec = [0.75,0.75,0.75,0.75];
0846         tc = ['**';'**';'**';'**'];
0847         ed = [2,2,2,2];
0848         lod = [2,2,2,2];
0849         lad = [2,2,2,2];
0850         lpm = [0,0,0,0];
0851         td = ['CdTe';'CdTe';'CdTe';'CdTe'];
0852         kd = [10,30,50,70,90,110,130,150;
0853                   10,30,50,70,90,110,130,150;
0854                   10,30,50,70,90,110,130,150;
0855                   10,30,50,70,90,110,130,150];
0856         phf = [1.0,0.9985,0.9976,0.9934,0.9855,0.9662,0.9315,0.8839;
0857                    1.0,0.9985,0.9976,0.9934,0.9855,0.9662,0.9315,0.8839;
0858                    1.0,0.9985,0.9976,0.9934,0.9855,0.9662,0.9315,0.8839;
0859                    1.0,0.9985,0.9976,0.9934,0.9855,0.9662,0.9315,0.8839];
0860         res = [0.0,1.0;
0861                    0.0,1.0;
0862                    0.0,1.0;
0863                    0.0,1.0];
0864         pur = [0,0,0,0,0];
0865         chordstatus = [1,1,1,1];
0866 elseif strcmp(tokname,'JET')==1,
0867     tok = 'JET';
0868         if mode == 'N',
0869             infoyp(2,['Default values for ',tokname,' / last update: 27/06/1994']);
0870         end
0871         mv = [-18.47,-14.52,-10.47,-6.31,-1.96,2.43,6.70,10.94,15.05,18.94,77.58,80.62,83.72,86.85,90.0,93.15,96.28,99.38,102.42,0.0];
0872         tv = [14.52,11.01,7.74,4.58,1.41,-1.75,-4.87,-8.10,-11.46,-14.97,94.04,90.73,87.58,84.54,81.53,78.52,75.45,72.26,68.89,0.0];
0873         kv = [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,0.0,0.0,0.0,25.0];  %28 is better but problem with clarspyp
0874         Ri = 3021;ai = 1300;fi = [1.64,0.1538,0];
0875         sd = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];
0876 %
0877 %
0878 %r1 is adjusted in order to recover the right geometrical factor value with r1 < r2
0879 %r2 and lc are kept constant. The first day of the week is considered (ex: wk1494 -> 04/04/94)
0880 %
0881         if day == 1 & month == 1 & year == 91, 
0882             r1 = [5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.62,5.63,3.78,5.19,4.58,4.91,4.64,3.91,3.89,3.86,4.78,2.18];%wk40 -> 01/01/91
0883         elseif day == 1 & month == 6 & year == 91, 
0884             r1 = [5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.62,5.63,5.10,5.64,5.48,5.75,5.54,5.53,5.50,5.47,5.82,2.18];%june91 -> 01/06/91
0885         elseif day == 20 & month == 7 & year == 91,
0886             r1 = [5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.62,5.63,5.10,5.64,5.48,5.75,5.54,5.53,5.50,5.47,5.82,2.18];%s200791 -> 20/07/91
0887         elseif day == 22 & month == 7 & year == 91, 
0888             r1 = [5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.62,5.63,5.10,5.64,5.48,5.75,5.54,5.53,5.50,5.47,5.82,2.18];%wk3091 -> 22/07/91
0889         elseif day == 1 & month == 8 & year == 91, 
0890             r1 = [5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.62,5.63,5.10,5.64,5.48,5.75,5.54,5.53,5.50,5.47,5.82,2.18];%m010891 -> 01/08/91
0891         elseif day == 15 & month == 11 & year == 91, 
0892             r1 = [5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,4.79,5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,0.1454];%mise a jour 15/11/1991 (ref papier Bruxelles)
0893         elseif day == 20 & month == 1 & year == 92,
0894             r1 = [5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.64,5.62,5.63,5.10,5.64,5.48,5.75,5.54,5.53,5.50,5.47,5.82,2.18];%wk0492 -> 20/01/92
0895         elseif day == 3 & month == 2 & year == 92,     
0896             r1 = [2.97,2.97,3.76,3.76,3.76,3.76,3.76,3.76,2.97,2.97,5.10,5.64,5.48,5.75,5.54,5.53,5.50,5.47,5.82,2.18];%wk0492 -> 03/02/92
0897         elseif day == 4 & month == 4 & year == 94, 
0898             r1 = [4.21,4.21,5.31,5.32,5.33,5.33,5.32,5.32,4.19,4.20,4.88,5.34,2.95,3.58,3.58,3.58,3.57,3.56,2.33,2.18];%wk1494 -> 04/04/94
0899         elseif day == 23 & month == 5 & year == 94, 
0900             r1 = [4.21,4.21,5.31,5.32,5.33,5.33,5.32,5.32,4.19,4.20,4.88,5.34,2.95,3.58,3.58,3.58,3.57,3.56,2.33,2.18];%wk2194 -> 23/05/94
0901         elseif day == 30 & month == 5 & year == 94,     
0902             r1 = [4.21,4.21,5.31,5.32,5.33,5.33,5.32,5.32,4.19,4.20,4.88,5.34,2.95,3.58,3.58,3.58,3.57,3.56,2.33,2.18];%wk2294 -> 30/05/94
0903         elseif day == 27 & month == 6 & year == 94, 
0904             r1 = [1.95,1.96,2.48,2.48,2.48,2.48,2.48,2.48,1.96,1.96,4.88,5.34,2.95,3.58,3.58,3.58,3.57,3.56,2.33,2.18];%wk2694 -> 27/06/94
0905         elseif day == 5 & month == 9 & year == 94, 
0906             r1 = [1.95,1.96,2.48,2.48,2.48,2.48,2.48,2.48,1.96,1.96,4.88,5.34,2.95,3.58,3.58,3.58,3.57,3.56,2.33,2.18];%wk3694 -> 05/09/94
0907         else
0908             error('JET: Wrong calibration date !!')
0909         end
0910 %
0911         r2 = [10.70,10.70,8.46,8.46,8.46,8.46,8.46,8.46,10.70,10.70,8.38,9.03,10.22,8.46,8.46,8.46,8.46,8.46,12.84,0.1454];% mise a jour 15/11/1991
0912         lc = [1265,1239,1220,1207,1201,1201,1208,1222,1243,1268,1241,1228,1219,1214,1212,1214,1219,1228,1241,1];
0913         lf = [2044,2003,1972,1951,1940,1941,1952,1975,2008,2050,976,966,959,954,953,954,959,966,976,0];
0914         lfp = [2804,2748,2705,2676,2661,2662,2678,2709,2754,2812,3590,3553,3527,3511,3505,3511,3527,3553,3590,0];
0915 %
0916         if day == 1 & month == 1 & year == 91,
0917             kdiag = [100,150,200,250,125;150,200,250,300,275];%week40 -> 01/01/91
0918         elseif day == 1 & month == 6 & year == 91,
0919             kdiag = [100,150,200,250,125;150,200,250,300,275];%june91 -> 01/06/91
0920         elseif day == 20 & month == 7 & year == 91,
0921             kdiag = [100,150,200,250,125;150,200,250,300,275];%s200791 -> 20/07/91
0922         elseif day == 22 & month == 7 & year == 91, 
0923             kdiag = [100,150,200,250,125;150,200,250,300,275];%wk3091 -> 22/07/91
0924         elseif day == 1 & month == 8 & year == 91, 
0925             kdiag = [100,150,200,250,125;150,200,250,300,275];%m010891 -> 01/08/91
0926         elseif day == 15 & month == 11 & year == 91, 
0927             kdiag = [100,150,200,250,125;150,200,250,300,275];%mise a jour 15/11/1991 (ref papier Bruxelles)
0928         elseif day == 20 & month == 1 & year == 92, 
0929             kdiag = [100,150,200,250,125;150,200,250,300,275];%wk0492 -> 20/01/92
0930         elseif day == 3 & month == 2 & year == 92,
0931             kdiag = [100,150,200,250,125;150,200,250,300,275];%wk0692 -> 03/02/92
0932         elseif day == 4 & month == 4 & year == 94, 
0933             kdiag = [133,200,266,333,166.5;200,266,333,400,366.5];%wk1494 -> 04/04/94
0934         elseif day == 23 & month == 5 & year == 94, 
0935             kdiag = [133,200,266,333,166.5;200,266,333,400,366.5];%wk2194 -> 23/05/94
0936         elseif day == 30 & month == 5 & year == 94, 
0937             kdiag = [133,200,266,333,166.5;200,266,333,400,366.5];%wk2294 -> 30/05/94
0938         elseif day == 27 & month == 6 & year == 94, 
0939             kdiag = [133,200,266,333,166.5;200,266,333,400,366.5];%wk2694 -> 27/06/94
0940         elseif day == 5 & month == 9 & year == 94, 
0941             kdiag = [133,200,266,333,166.5;200,266,333,400,366.5];%wk3694 -> 05/09/94
0942         else
0943             error('JET: Wrong calibration date !!')
0944         end        
0945 %
0946         ef = [4,4,4,4,4,4,4,4,4,4,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,0.125];
0947         tf = ['In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'Be'];    
0948 %
0949         if day == 1 & month == 1 & year == 91,
0950             ea = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%wk40 -> 01/01/91
0951             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**'];
0952         elseif day == 1 & month == 6 & year == 91, 
0953             ea = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%june91 -> 01/06/91
0954             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**'];
0955         elseif day == 20 & month == 7 & year == 91, 
0956             ea = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%s200791 -> 20/07/91
0957             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**'];
0958         elseif day == 22 & month == 7 & year == 91,
0959             ea = [0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0];%wk3091 -> 22/07/91
0960             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'Pb';'**';'**';'**';'**';'**';'**'];
0961         elseif day == 1 & month == 8 & year == 91, 
0962             ea = [0,0,0,0,0,0,0,0,0,0,0,0,0,1.5,0,0,0,0,0,0];%m010891 -> 01/08/91
0963             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'Pb';'**';'**';'**';'**';'**';'**'];
0964         elseif day == 15 & month == 11 & year == 91, 
0965             ea = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%15/11/94 (ref papier Bruxelles)
0966             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**'];
0967         elseif day == 20 & month == 1 & year == 92,
0968             ea = [0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0];%wk0492 -> 20/01/92
0969             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'Pb';'**';'**';'**';'**';'**';'**'];
0970          elseif day == 3 & month == 2 & year == 92,
0971             ea = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%wk0692 -> 03/02/92
0972             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**'];
0973         elseif day == 4 & month == 4 & year == 94, 
0974             ea = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];%wk1494 -> 04/04/94
0975             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**'];
0976         elseif day == 23 & month == 5 & year == 94, 
0977             ea = [4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0];%wk2194 -> 23/05/94
0978             ta = ['In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'**';'**';'**';'**';'**';'**';'**';'**';'**';'**'];
0979         elseif day == 30 & month == 5 & year == 94, 
0980             ea = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0.125];%wk2294 -> 30/05/94
0981             ta = ['In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'In';'**'];
0982         elseif day == 27 & month == 6 & year == 94, 
0983             ea = [0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0.125];%wk2694 -> 27/06/94
0984             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'In';'In';'In';'In';'In';'In';'In';'In';'In';'**'];
0985         elseif day == 5 & month == 9 & year == 94, 
0986             ea = [0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0.125];%wk3694 -> 05/09/94
0987             ta = ['**';'**';'**';'**';'**';'**';'**';'**';'**';'**';'In';'In';'In';'In';'In';'In';'In';'In';'In';'**'];
0988         else
0989             error('JET: Wrong calibration date !!')
0990         end                
0991 %
0992         ec = [0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.125];
0993         tc = ['Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Al';'Be'];
0994         ed = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,20];
0995         lod = [10,10,10,10,10,10,10,10,10,10,8.5,10,10,10,10,10,10,10,10,25];
0996         lad = [10,10,10,10,10,10,10,10,10,10,8.5,10,10,10,10,10,10,10,10,25];
0997         lpm = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
0998         td = ['CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'CsI';'Ger'];
0999         kd = [20,40,122,400,511,660,834,1000;
1000                   20,40,122,400,511,660,834,1000;
1001                   20,40,122,400,511,660,834,1000;
1002                   20,40,122,400,511,660,834,1000;
1003                   20,40,122,400,511,660,834,1000;
1004                   20,40,122,400,511,660,834,1000;
1005                   20,40,122,400,511,660,834,1000;
1006                   20,40,122,400,511,660,834,1000;
1007                   20,40,122,400,511,660,834,1000;
1008                   20,40,122,400,511,660,834,1000;
1009                   20,40,122,400,511,660,834,1000;
1010                   20,40,122,400,511,660,834,1000;
1011                   20,40,122,400,511,660,834,1000;
1012                   20,40,122,400,511,660,834,1000;
1013                   20,40,122,400,511,660,834,1000;
1014                   20,40,122,400,511,660,834,1000;
1015                   20,40,122,400,511,660,834,1000;
1016                   20,40,122,400,511,660,834,1000;
1017                   20,40,122,400,511,660,834,1000;
1018                   20,40,122,400,511,660,834,1000];
1019         phf = [0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1020                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1021                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1022                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1023                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1024                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1025                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1026                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1027                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1028                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1029                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1030                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1031                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1032                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1033                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1034                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1035                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1036                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1037                    0.999,0.999,0.985,0.522,0.398,0.292,0.226,0.185;
1038                    0.999,0.997,0.950,0.431,0.343,0.271,0.234,0.213];
1039         res = [13.12,-0.795;
1040                    13.12,-0.795;
1041                    13.12,-0.795;
1042                    13.12,-0.795;
1043                    13.12,-0.795;
1044                    13.12,-0.795;
1045                    13.12,-0.795;
1046                    13.12,-0.795;
1047                    13.12,-0.795;
1048                    13.12,-0.795;
1049                    13.12,-0.795;
1050                    13.12,-0.795;
1051                    13.12,-0.795;
1052                    13.12,-0.795;
1053                    13.12,-0.795;
1054                    13.12,-0.795;
1055                    13.12,-0.795;
1056                    13.12,-0.795;
1057                    13.12,-0.795;
1058                    0.0,1];
1059            chordstatus = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
1060 else
1061     error(['The tokamak name: ',tokname,' is unknown']);
1062 end
1063 %
1064 nv = length(kv);
1065 test = find(kv);
1066 if ~isempty(test),
1067     nv0 = test(1)-1;
1068 else
1069     nv0 = nv;
1070 end

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