Changeset 2904 for branches/mcstas-1.x

Show
Ignore:
Timestamp:
07/15/10 10:15:18 (23 months ago)
Author:
pkwi
Message:

High-energy tail edit from Jonas Birk (Source_gen4 from PSI) added. Other patches left out for now as their implications are not clear...

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/mcstas-1.x/lib/sources/Source_gen.comp

    r2699 r2904  
    99* 
    1010* %I 
    11 * Written by: Emmanuel Farhi, Kim Lefmann 
     11* Written by: Emmanuel Farhi, Kim Lefmann, edits Jonas O Birk 
    1212* Date: Aug 27, 2001 
    1313* Version: $Revision: 1.41 $ 
     
    1818* Modified by: EF, Oct 30, 2001 ; minor changes. mccompcurname replaced 
    1919* 
    20 * Circular/squared neutron source with flat or Maxwellian energy/wavelength 
    21 * spectrum 
     20* Circular/squared or spatially gaussian neutron source with flat or  
     21* Maxwellian energy/wavelength spectrum. 
    2222* 
    2323* %D 
     
    3030* be either arbitrary (I1=0), or specified in neutrons per steradian per 
    3131* square cm per Angstrom. A Maxwellian spectra may be selected if you give 
    32 * the source temperatures (up to 3). Finally, a file with the flux as a 
     32* the source temperatures (up to 3). A high-energy tail of shape  
     33* A/(lambda0-lambda) is added by setting the HEtailA and HEtailL0 parameters. 
     34* Finally, a file with the flux as a 
    3335* function of the wavelength [lambda(AA) flux(n/s/cm^2/st/AA)] may be used 
    3436* with the 'flux_file' parameter. Format is 2 columns free text. 
     
    103105* T3:       [K]   Third Maxwellian source Temperature, 0=none 
    104106* I3:       [1/(cm**2*st*AA)] Third Maxwellian Source flux 
    105 * flux_file:[str] Name of a two columns [lambda flux] text file that contains 
     107* HEtailA:  [1/(cm**2*st*AA**2)] Amplitude of heigh energy tail 
     108* HEtailL0  [AA]  Offset of heigh energy tail 
     109flux_file:[str] Name of a two columns [lambda flux] text file that contains 
    106110*                 the wavelength distribution of the flux in [1/(s*cm**2*st*AA)]. 
    107111*                 Comments (#) and further columns are ignored. Format is 
     
    133137                    h=0, w=0, verbose=0, T1=0, 
    134138                    flux_file_perAA=0, flux_file_log=0, 
    135                     Lmin=0,Lmax=0,Emin=0,Emax=0,T2=0,I2=0,T3=0,I3=0,length=0) 
     139                    Lmin=0,Lmax=0,Emin=0,Emax=0,T2=0,I2=0,T3=0,I3=0,length=0, 
     140                    HEtailA=0,HEtailL0=0) 
    136141OUTPUT PARAMETERS (p_in, lambda0, lambda02, L2P, lambda0b, lambda02b, L2Pb,lambda0c, lambda02c, L2Pc, pTable, pTable_x, pTable_y,pTable_xmin, pTable_xmax, pTable_xsum, pTable_ymin, pTable_ymax, pTable_ysum, pTable_dxmin, pTable_dxmax, pTable_dymin, pTable_dymax) 
    137142STATE PARAMETERS (x,y,z,vx,vy,vz,t,s1,s2,p) 
     
    526531        Maxwell += I3 * L2Pc/lambda5 * exp(-lambda02c/lambda2); 
    527532      } 
     533      if (HEtailA>0) 
     534      { 
     535        Maxwell+=HEtailA/(lambda-HEtailL0)/(lambda-HEtailL0); 
     536      } 
    528537      p *= Maxwell; 
    529538    }