+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 DEMO file for power density calculations

 F.Cerrina, 26 July 1988

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 	CXRO MicroVMS V4.5    
 
 Username: CERRINA
 Password: 
  		Welcome to CXRO Microvax
 **************************************************************************
 
     Last interactive login on Tuesday, 26-JUL-1988 19:13
     Last non-interactive login on Sunday, 17-JUL-1988 23:52
 
 
 
 
 $ 
 $ 
 $ setup_shadow
  
  
  
  
  
 Defining Logical Names and Environmental Parameters
 Graphic device set at TT:. Enter $SETPLOT to modify.
 
 
 
 
 
 
 All SHADOW logical names and command defined.
 Type $NEWS for more info on SHADOW.
 
 
 $ 
 $ 		!	We then run SHADOW through the optical system
 $ 		!	using FULL POLARIZATION DEPENDENCE of the reflectivity
 $ 
 $ 		!	A typical case is found in this subdirectory
 $ 
 $ sd [cerrina.power.noemitt]
 $ 
 $ dir
 
 Directory DUB0:[CERRINA.POWER.NOEMITT]
 
 ANSYS.DAT;1              64  18-JUL-1988 08:58  (RWED,RWED,RE,RE)
 AUREFL.DAT;1             16  15-JUN-1988 12:28  (RWED,RWED,RE,RE)
 BEGIN.DAT;102          1410  18-JUL-1988 09:01  (RWED,RWED,RE,RE)
 BEGIN.DAT;101          1410  18-JUL-1988 08:56  (RWED,RWED,RE,RE)
 BEGIN.DAT;100          1410  18-JUL-1988 08:50  (RWED,RWED,RE,RE)
 DOIT.COM;1                1  17-JUL-1988 23:45  (RWED,RWED,RE,RE)
 EFFIC.01;102              1  18-JUL-1988 09:02  (RWED,RWED,RE,RE)
 EFFIC.01;101              1  18-JUL-1988 08:57  (RWED,RWED,RE,RE)
 EFFIC.01;100              1  18-JUL-1988 08:51  (RWED,RWED,RE,RE)
 END.00;102                7  18-JUL-1988 09:02  (RWED,RWED,RE,RE)
 END.00;101                7  18-JUL-1988 08:56  (RWED,RWED,RE,RE)
 END.00;100                7  18-JUL-1988 08:50  (RWED,RWED,RE,RE)
 END.01;102               11  18-JUL-1988 09:03  (RWED,RWED,RE,RE)
 END.01;101               11  18-JUL-1988 08:57  (RWED,RWED,RE,RE)
 END.01;100               11  18-JUL-1988 08:52  (RWED,RWED,RE,RE)
 MACHINE.DAT;1             3  14-JUL-1988 11:45  (RWED,RWED,RE,RE)
 MIRR.01;102            1410  18-JUL-1988 09:02  (RWED,RWED,RE,RE)
 MIRR.01;101            1410  18-JUL-1988 08:57  (RWED,RWED,RE,RE)
 MIRR.01;100            1410  18-JUL-1988 08:51  (RWED,RWED,RE,RE)
 OPTAX.01;102              2  18-JUL-1988 09:02  (RWED,RWED,RE,RE)
 OPTAX.01;101              2  18-JUL-1988 08:56  (RWED,RWED,RE,RE)
 OPTAX.01;100              2  18-JUL-1988 08:51  (RWED,RWED,RE,RE)
 POWER.DAT;100            53  18-JUL-1988 08:52  (RWED,RWED,RE,RE)
 POWER_1.DAT;1            53  17-JUL-1988 23:52  (RWED,RWED,RE,RE)
 PWR_DENS.PAR;101          3  18-JUL-1988 08:58  (RWED,RWED,RE,RE)
 PWR_DENS.PAR;100          3  18-JUL-1988 08:52  (RWED,RWED,RE,RE)
 REPEAT.COM;1              1  17-JUL-1988 23:42  (RWED,RWED,RE,RE)
 SAVE.DAT;2               13  19-JUL-1988 19:05  (RWED,RWED,RE,RE)
 SAVE.DAT;1               11  17-JUL-1988 23:19  (RWED,RWED,RE,RE)
 SOURCE.FIL;1              4  14-JUL-1988 17:27  (RWED,RWED,RE,RE)
 SRCOMP.DAT;1             25  14-JUL-1988 11:45  (RWED,RWED,RE,RE)
 STAR.01;102            1410  18-JUL-1988 09:03  (RWED,RWED,RE,RE)
 STAR.01;101            1410  18-JUL-1988 08:57  (RWED,RWED,RE,RE)
 STAR.01;100            1410  18-JUL-1988 08:51  (RWED,RWED,RE,RE)
 START.00;101              7  18-JUL-1988 08:58  (RWED,RWED,RE,RE)
 START.00;100              7  18-JUL-1988 08:52  (RWED,RWED,RE,RE)
 START.00;99               7  18-JUL-1988 08:47  (RWED,RWED,RE,RE)
 START.01;1               11   5-JUL-1988 08:45  (RWED,RWED,RE,RE)
 SYSTEMFILE.DAT;1          1   5-JUL-1988 08:45  (RWED,RWED,RE,RE)
 TRANSMIT.DAT;1            0  14-JUL-1988 11:45  (RWED,RWED,RE,RE)
 TRANSMIT.LOG;1            3  13-JUL-1988 21:28  (RWED,RWED,RE,RE)
 
 Total of 47 files, 13123 blocks.
 $ 
 $ 
 $ ! This run was created by the REPEAT.COM command file:
 $ 
 $ type repeat.com
 $ASSIGN SYS$COMMAND TT:
 $@[CERRINA.POWER]SETUP
 $YES_TYPE == "SECOND"
 $ASSIGN SYS$COMMAND TT:
 $pwr_dens :== run [cerrina.power]pwr_dens
 $ASSIGN SYS$COMMAND TT:
 $seed :== run [cerrina.power]seed
 $SET DEF [CERRINA.POWER.NOEMITT]
 $I = 0
 $AGAIN:
 $GO
 SOURCE
 BATCH
 START.00
 TRACE
 BATCH
 0
 START.01
 0
 %EXIT
 EXIT
 $PWR_DENS
 1
 $PURGE/EXC=TRY.DAT/KEEP=2
 $SEED
 $I = I + 1
 $SHOW SYMBOL I
 $IF I .EQS. 200 THEN $EXIT
 $GOTO AGAIN
 $EXIT
 $ 
 $ 
 $ 		!	We will now demonstrate how to compute the
 $ 		!	power density in a file
 $ 		!	Create dummy directory
 $
 $ create/directory [.demo]
 $ 
 $ dir demo.dir
 
 Directory DUB0:[CERRINA.POWER.NOEMITT]
 
 DEMO.DIR;1                1  26-JUL-1988 19:35  (RWE,RWE,RE,RE)
 
 Total of 1 file, 1 block.
 $ set def [.demo]
 $ dir
 %DIRECT-W-NOFILES, no files found
 $ 
 $ 		!	Get the start files
 $ 
 $ copy [-]start.*
 _To: *.*/log
 %COPY-S-COPIED, DUB0:[CERRINA.POWER.NOEMITT]START.00;101 copied to 
     DUB0:[CERRINA.POWER.NOEMITT.DEMO]START.00;101 (7 blocks)
 %COPY-S-COPIED, DUB0:[CERRINA.POWER.NOEMITT]START.01;1 copied to 
     DUB0:[CERRINA.POWER.NOEMITT.DEMO]START.01;1 (11 blocks)
 %COPY-S-NEWFILES, 2 files created
 $ copy [-]systemfile.dat *.*
 $ 
 $ 		!	Run Shadow
 $ 
 $ go
 
 
 
   :::::::  :::    ::            :::    :::::::        :::::     :::  ::  ::
  ::::::::  :::    ::           ::::    ::::::::      :::::::    :::  ::  ::
 :::        :::    ::          ::: :    :::   :::    :::    ::   :::  ::  ::
 :::        :::    ::         ::: ::    :::    ::    :::    ::   :::  ::  ::
  :::::::   :::::::::        :::  ::    :::    ::    :::    ::   :::  ::  ::
   :::::::  :::::::::       :::   ::    :::    ::    :::    ::   :::  ::  ::
        ::  :::    ::      :::    ::    :::    ::    :::    ::   :::  ::  ::
       :::  :::    ::     :::     ::    :::   :::    :::   :::   ::: ::: :::
 ::::::::   :::    ::    :::      ::    ::::::::      :::::::     :::::::::
 :::::::    :::    ::   :::       ::    :::::::        :::::       ::: :::
 
 
 
 
 VERSION     88.2                                               1 June  1988
 
 
 
 
 Hit <RETURN> when ready: 
 
 
 
 
 
 
 
 
                             S H A D O W
 
 
 Commands Available at this level:
 
 HELP              More informations on the following commands
 SOURCE            Generates a source file
 TRACE             Starts the tracing of an Optical System from a specified
                   source file
 MENU              Begins the process of defining an Optical System
 INIT              Defines scratch directories and set default to scratch
 EXIT              Returns to DCL
 
 
 
 
 
 
 
 Shadow:: source
 
 
 SOURCE selected. Begin procedure.
 
 
 This procedure generates a SOURCE for SHADOW.
 Mode selected [ ? <ret> for HELP ] ? : batch
 File containing source description [ START.00 ] ?: start.00
 Generated          250 rays out of         5000
                    500
                    750
                   1000
                   1250
                   1500
                   1750
                   2000
                   2250
                   2500
                   2750
                   3000
                   3250
                   3500
                   3750
                   4000
                   4250
                   4500
                   4750
                   5000
 Exit from SOURCE
 SOURCE => Source has been succesfully generated.
 
 SOURCE procedure completed.
 
 Shadow:: trace
 
 
 Ray Tracing Selected. Begin procedure.
 
 
 Mode selected [ ? <ret> for HELP ] ? : batch
 BATCH selected.
 Call to RESET
 Exit from RESET
 
 
 Mode selected is: 
 BATCH                                                                           
 Options: to start anew                 [ 0 ] 
             to restart from a given OE [ 1 ] 
 Then ? 
 0
 Input file [ ^Z or %EXIT terminates OS ] ?
 start.01
 Tracing optical element #            1
 Call to SETSOUR
 Exit from SETSOUR
 Call to IMREF
 Exit from IMREF
 Call to OPTAXIS
 Exit from OPTAXIS
 Call to MSETUP
 Exit from MSETUP
 Call to RESTART
 Exit from RESTART
 Call to MIRROR
 
 %FOR-F-FILNOTFOU, file not found  unit 23  file DUB0:[CERRINA.POWER.NOEMITT.DEMO]AUREFL.DAT;  user PC 002AD7EB
 -RMS-E-FNF, file not found
 %TRACE-F-TRACEBACK, symbolic stack dump follows
 module name     routine name                     line       rel PC    abs PC
                                                            002BE2C2  002BE2C2
                                                            002BE1CF  002BE1CF
                                                            002B8FD3  002B8FD3
                                                            002B7C9A  002B7C9A
 REFLEC          REFLEC                            170      00000027  002AD7EB
 MIRROR          MIRROR                            200      00000146  002AA4A2
 SHADOW          SHADOW                            288      000000E7  002A98E7
 $ 
 $ 		!		Whoops. Better have a file with optical
 $ 		!		constants ready
 $ 
 $ prerefl	!		There we go.
 Element [0] or compound [1] ? 
 0
 Density [ g/cm3 ] ?
 17.8
 Enter 2-letters (capitalized) atomic symbol ? 
 AU
 Enter starting photon energy,end and step
 100,10000,20
 Output file ?
 aurefl.dat
 $ 
 $ 		!		There we go again
 $ 
 $ go trace
 
 
 
 Ray Tracing Selected. Begin procedure.
 
 
 Mode selected [ ? <ret> for HELP ] ? : batch
 BATCH selected.
 Call to RESET
 Exit from RESET
 
 
 Mode selected is: 
 BATCH                                                                           
 Options: to start anew                 [ 0 ] 
             to restart from a given OE [ 1 ] 
 Then ? 
 
 Input file [ ^Z or %EXIT terminates OS ] ?
 start.01
 Tracing optical element #            1
 Call to SETSOUR
 Exit from SETSOUR
 Call to IMREF
 Exit from IMREF
 Call to OPTAXIS
 Exit from OPTAXIS
 Call to MSETUP
 Exit from MSETUP
 Call to RESTART
 Exit from RESTART
 Call to MIRROR
 Exit from MIRROR
 Call to IMAGE
 Exit from IMAGE
 Call to RESET
 Exit from RESET
 
 Do you want to change input mode ? 
 n
 Input file [ ^Z or %EXIT terminates OS ] ?
 Input file [ ^Z or %EXIT terminates OS ] ?
  
 Procedure completed. Return to COMMAND level
  
 
 
 Procedure completed.
 
 Shadow:: exit
 
 
 
 Exit to DCL
 
 $ 
 $ 
 $ 		!		Now, that's better. Let's see what we have.
 $ 
 $ dir
 
 Directory DUB0:[CERRINA.POWER.NOEMITT.DEMO]
 
 AUREFL.DAT;1             16  26-JUL-1988 19:43  (RWED,RWED,RE,RE)
 BEGIN.DAT;1            1410  26-JUL-1988 19:40  (RWED,RWED,RE,RE)
 EFFIC.01;1                1  26-JUL-1988 19:44  (RWED,RWED,RE,RE)
 END.00;1                  7  26-JUL-1988 19:40  (RWED,RWED,RE,RE)
 END.01;1                 11  26-JUL-1988 19:44  (RWED,RWED,RE,RE)
 MIRR.01;1              1410  26-JUL-1988 19:44  (RWED,RWED,RE,RE)
 OPTAX.01;2                2  26-JUL-1988 19:43  (RWED,RWED,RE,RE)
 OPTAX.01;1                2  26-JUL-1988 19:41  (RWED,RWED,RE,RE)
 STAR.01;1              1410  26-JUL-1988 19:44  (RWED,RWED,RE,RE)
 START.00;101              7  18-JUL-1988 08:58  (RWED,RWED,RE,RE)
 START.01;1               11   5-JUL-1988 08:45  (RWED,RWED,RE,RE)
 SYSTEMFILE.DAT;1          1   5-JUL-1988 08:45  (RWED,RWED,RE,RE)
 
 Total of 12 files, 4288 blocks.
 $ 
 $ minmax
 Input file ? 
 begin.dat
 Options --- Enter
 0 for excluding the losses
 1 for including losses at a particular O.E.
 2 for including all the losses.
 Then ? 
 
 Comment ?
 Source file for power density calculations
 ***********
 File examined is :
 DUB0:[CERRINA.POWER.NOEMITT.DEMO]BEGIN.DAT;1                
 Was created :
 26-JUL-1988 19:40
 ***********
 Found         5000 good points out of        5000
 Here we are.
 X max is  0.1075879    
 X min is -1.8872529E-02
 Y max is   9.617151    
 Y min is  -9.618714    
 Z max is  9.5307752E-03
 Z min is -9.5332414E-03
 X prime max is  1.9994261E-02
 X prime min is -1.9997584E-02
 Y prime max is   1.000000    
 Y prime min is  0.9998000    
 Z prime max is  1.3427724E-03
 Z prime min is -1.2790854E-03
 $ 
 $ sourcinfo
 
 
                          Program SOURCE_INFO -- Vers. 1.1
                                     May 1984
  
 INPUT> File containing source specs ?
 end.00
 INPUT> Title ? 
 DEMO
 INPUT> Comment ? 
 Source to demonstrate power density
 INPUT> Output file-name ? 
 source.fil
 SYSINF> Prepare output to file : source.fil
 SOURCE_INFO> File 
 end.00
  read correctly.
 $ 
 $ 
 $ type source.fil
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 DEMO
 Source to demonstrate power density
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 Input file specified:
 end.00
 Full file Specification :DUB0:[CERRINA.POWER.NOEMITT.DEMO]END.00;1                   
 Creation Date           :26-JUL-1988 19:40
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 Random Source.
 Generated total         5000 rays.
 Source assumed TRIDIMENSIONAL.
 Source Spatial Characteristics: GAUSSIAN            
 Sigma X     :   0.550000000E-02 Sigma Z   :   0.250000000E-02
 Depth:  SYNCHROTRON SOURCE.
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 Source Emission Characteristics
 Distribution Type: SYNCHROTRON         
 Distribution Limits. +X :   0.200000000E-01 -X:   0.200000000E-01 rad
                      +Z :   0.250000000E-02 -Z:   0.250000000E-02 rad
 Magnetic Radius =    4.81000000     m.  Beam Energy =   1.5000     GeV.
 Beam Emittancies. EPSI_X:   0.000000000E+00 EPSI_Z:   0.000000000E+00
 Distance from Waist.   X:   0.000000000E+00      Z:   0.000000000E+00
 Polarization Used: SR TOTAL    
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 Source Photon Energy Distribution: BOX DISTR.  
 From Photon Energy:    101.000000     or    122.757624     Angs.
  to  Photon Energy:    9999.00000     or    1.23997600     Angs.
 Angular difference in phase is   90.000    
 Degree of polarization is  0.72414    
 Source points have INCOHERENT phase.
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 $ 
 $ 
 $ mirinfo
 
 
 MINFO> Input file MUST be an ERF (Exit Record File) type from SHADOW
 MINFO> Please input filename: 
 end.01
 MINFO> File read correctly.
 MINFO> Title ?
 DEMO
 MINFO> Comment ?
 Mirror for power density calculations
 MINFO> Output file ?
 mirr_01.fil
 MINFO> Prepare output to file : mirr_01.fil                     
 $ 
 $ 
 $ type mirr_01.fil
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 ********************   MIRROR  DESCRIPTION   ********************
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 DEMO                                                                            
 Mirror for power density calculations                                           
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 Input file specified:end.01                                  
 Full file Specification :DUB0:[CERRINA.POWER.NOEMITT.DEMO]END.01;1                   
 Creation Date           :26-JUL-1988 19:44
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 
 Surface figure was defined as:        PLANE               
 Cylindrical figure                      NO
 Element type                            REFLECTOR
 Reflectivity      ON     coefficients from: 
 AUREFL.DAT                                                                      
 Polarization dependence                 YES
 Mirror dimensions ( rectangular ):
         X plus              X minus             Y plus              Y minus
           15.000             -15.000              5.0000             -5.0000    
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 Central Axis parameters :
 Source Plane Distance                      1000.000000000000    
 Image  Plane                               1000.000000000000    
 Incidence Angle                           0.0000000000000000E+00
 Reflection/Diffraction Angle              0.0000000000000000E+00
  
 Mirror parameters                       COMPUTED
 Same configuration as Central Axis      YES
 Objective focus at                         1000.000000000000    
 Image focus at                             1000.000000000000    
 Incidence angle                           0.0000000000000000E+00
 Parameters used follow:
    Plane mirror 
 Source of this O.E. moved               NO
 Mirror at pole position ( no mov. )     YES
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
 $ 
 $ 
 $ 		!		This should have clarified all the points
 $ 		!		on the source/mirror.
 $ 		!		
 $ 		!		For power calculations, the MORE RAYS THE
 $ 		!		BETTER. Use 5000 (the max).
 $ 
 $ 		!		Let's compute some important data.
 $ 		!		In particular, we need the total power radiated
 $ 		!		into the beamline
 $ 
 $		!		For this we run a program called TRANSMIT.
 $		!		It computes the total power radiated by an SR
 $		!		through an optical system. The program accesses
 $		!		B.Henke's tables and is very useful in 
 $		!		following the progression of the total and
 $		!		spectral power along the beamline.
 $
 $
 $ transmit
 Do you want to generate a source file ?: y
 Machine name ?
 Advanced Light Source
 Title ?
 Power density calculations
 Machine Radius [ m ] and Beam Energy [ GeV ] ?
 4.81
 1.5
 Current [ A ] and milliradians of orbit (horizontal) ?
 .400
 40
 Minimum photon energy, maximum, step :
 100,10000,20
 Spectrum type:
 dE = constant		0	[ Photons/sec/eV ]
 dL = constant		1	[ Photons/sec/Angs ]
 dL/L = constant		2	[ Photons/sec/%bandwidth ]
 dE/E = constant         3	[ Photons/sec/%bandwidth ]
 Power dL=const		4	[ Watt/Angs ]
 Power dE=const		5	[ Watt/eV ]
 Then ? 
 5
 Do you want to specify the vertical acceptance ? 
 0
 Read         1001 records.
 +++++++++++++++++++++++++++++++++++++++++++
  Spectrum completed 
 +++++++++++++++++++++++++++++++++++++++++++
 : DATA file roots for local properties ?                                          
 > 
 local
 : CUMULATIVE DATA file roots ?                                                    
 > 
 total
 Do you want a conversion to Watts/cm^2 ? [Y/N] ? > 
 n
 Is the source spectrum in function of : [1] eV  [2] Angs ? 
 1
 Read          496 records.
 Initial power is:    233.3808    
 
 Currently at Element N.      0
 
 : Enter a negative number to exit, zero to cancel; OE ?                           
 > 
 1
 : Enter [ 0 ] for pure element, [ 1 ] for compound                                
 > 
 0
 Enter 2-letters (capitalized) atomic symbol ? 
 AU
 Density ?
 17.8
 Mirror [ 1 ] or filter [ 0 ] ?
 1
 Incidence angle [ degrees ] ?
 0
 OUT > Total flux is:   4.8926454E-03		! reflected; not much left
     						! of the 233 Watts!
 Comment for this OE > 
 Total power REFLECTED from mirror
 
 Currently at Element N.      1
 
 : Enter a negative number to exit, zero to cancel; OE ?                           
 > 
 -1
 $ 
 $ dir/since=-00:05
 
 Directory DUB0:[CERRINA.POWER.NOEMITT.DEMO]
 
 LOCAL1.DAT;1             31  26-JUL-1988 19:52  (RWED,RWED,RE,RE)
 >> This file contains the average reflectivity
 MACHINE.DAT;1             3  26-JUL-1988 19:52  (RWED,RWED,RE,RE)
 >> This file is appended into TRANSMIT.LOG
 SRCOMP.DAT;1             31  26-JUL-1988 19:52  (RWED,RWED,RE,RE)
 >> This file is the SR spectrum [ watts/eV ]
 TOTAL1.DAT;1             31  26-JUL-1988 19:53  (RWED,RWED,RE,RE)
 >> This file contains the reflected power
 TRANSMIT.DAT;1            2  26-JUL-1988 19:52  (RWED,RWED,RE,RE)
 >> Output from TRANSMIT, appended to TRANSMIT.LOG
 TRANSMIT.LOG;1            4  26-JUL-1988 19:53  (RWED,RWED,RE,RE)
 >> Main output file.
 
 Total of 7 files, 107 blocks.
 $ 
 $ 		!	This is the SR spectrum
 $ 
 $ type srcomp.dat
   100.0000      7.1203411E-02
   120.0000      7.4164025E-02
   140.0000      7.6586969E-02
   160.0000      7.8601263E-02
   180.0000      8.0285348E-02
   200.0000      8.1703603E-02
   220.0000      8.2900517E-02
   240.0000      8.3906971E-02
   260.0000      8.4756985E-02
   280.0000      8.5465744E-02
   300.0000      8.6053185E-02
   320.0000      8.6533748E-02
   340.0000      8.6919524E-02
   360.0000      8.7221071E-02
   380.0000      8.7445483E-02
   400.0000      8.7599553E-02
   420.0000      8.7697476E-02
   440.0000      8.7734155E-02
   460.0000      8.7721609E-02
   480.0000      8.7663755E-02
   500.0000      8.7562136E-02
   520.0000      8.7420806E-02
   540.0000      8.7247849E-02
   560.0000      8.7039575E-02
   580.0000      8.6799189E-02
   600.0000      8.6534515E-02
   620.0000      8.6242355E-02
   640.0000      8.5923322E-02
   660.0000      8.5588709E-02
   680.0000      8.5232146E-02
   700.0000      8.4856160E-02
   720.0000      8.4462754E-02
   740.0000      8.4053472E-02
   760.0000      8.3629422E-02
   780.0000      8.3191372E-02
   800.0000      8.2739756E-02
   820.0000      8.2276881E-02
   840.0000      8.1807420E-02
   860.0000      8.1325695E-02
   880.0000      8.0831170E-02
   900.0000      8.0334887E-02
   920.0000      7.9827473E-02
   940.0000      7.9312608E-02
   960.0000      7.8793809E-02
   980.0000      7.8266032E-02
   1000.000      7.7736139E-02
   1020.000      7.7199772E-02
   1040.000      7.6658063E-02
   1060.000      7.6116353E-02
   1080.000      7.5566128E-02
   1100.000      7.5016506E-02
   1120.000      7.4465036E-02
   1140.000      7.3907934E-02
   1160.000      7.3348038E-02
   3740.000      2.0581741E-02
 $ 
 $ 		!	This is the record of the interesting stuff
 $ 
 $ type transmit.log
 --------------------------------------------------------------------------------
 Power density calculations                                                      
 Parameters of Advanced Light Sourc
 --------------------------------------------------------------------------------
 Magnetic Radius    :    4.810000     meters
 Beam energy        :    1.500000     GeV
 Gamma              :    2935.500    
 Magnetic Field     :    1.039936     tesla
 --------------------------------------------------------------------------------
 Critical ENERGY    :    1556.619     eV
          WAVELENGTH:    7.965030     Angstroms
 Power/Amp          :    93.14579     kilowatts/amp
 Total Power        :    37.25832     kilowatts
      at current of :   0.4000000     Amperes.
 Total Power/mrad   :    5.929845     watts/mrad
 For unlimited vertical acceptance,
   power accepted   :    237.1938     watts
   hori. acceptance :    40.00000     mrads
 --------------------------------------------------------------------------------
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
          PROGRAM   TRANSMIT V1.0 -- SEPTEMBER 1984  
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 
 
 Photon energy range used:
        start            :    100.0000    
        end              :    10000.00    
        step             :    20.00000    
 
 
 Incoming power          :    233.3808    
 
 
 ===============================================
 ===============================================
 Optical Element :            1
 Defined MIRROR at  0.00000E+00 degrees
 Working with    Z =  79       Symbol: AU
 Atomic Weight:    197.0000     and density    17.80000     g/cm3
 
 ---------------------------
 OE #            1
 Total power REFLECTED from mirror                                               
 OUT > Total flux is:   4.8926454E-03
 
 
 $ 
 $ 		!		The important number is 233.38 W
 $ 
 $ run [cerrina.power]pwr_dens
 Interactive [0] or namelist mode [1] : 
 0
 This program needs a file containing the source spectrum computed within the lim
 its used. Or you can  specify the total power.
 Source file [0] or total power [1] : 
 1
 Total power in Watt : 
 233.38
  
 Please specify now the file containing the SOURCE array (e.g., BEGIN.DAT) 
 Then ? 
 begin.dat
 Read         5000 rays. The file has           18 columns.
 Computing renormalizing factor.
  
 All preliminaries completed. 
 Ready to proceed with density analysis.
  
 File for analysis ? 
 mirr.01
 Data ready. Read         5000 points.
 Options --- Enter
 0 for excluding the losses
 1 for including losses at a particular O.E.
 2 for including all the losses.
 Then ? 
 0
 ***********
 File examined is :
                                                             
 Was created :
                  
 ***********
 Found         3794 good points out of        5000
 Found: 
 Column 1: X max is   14.98811484378145    
        1: X min is  -14.98595796739574    
        2: Y max is   1.338708191429720    
        2: Y min is  -1.282736029850028    
        3: Z max is  0.0000000000000000E+00
        3: Z min is  0.0000000000000000E+00
  for a photon energy range: 
   101.1461900438109     to    9145.389447415027    
 I need to define the two-dimensional histogram for the power density. Please spe
 cify: 
 Columns for x-axis and y-axis?
 1,2
 Limits to use for the histogram. 
 To use           scaling, enter: 
        automatic                 0
        external                  1
 Then? 
 1
 X min, X max and number of bins :
 -16,16,33
 Y min, Y max and number of bins :
 -1.5,1.5,13
 Optical Properties options.
  
 To select                          enter
  
 Power transmitted/reflected ........ 0
 Power absorbed ..................... 1
 Local reflectivity/transmission .... 2
 Incoming Power ..................... 3
  
 Then ?
 1
 File to use for Io ? 
 begin.dat
 No. of time this power density case has run : 
 0
 How many times will you be looping through ? 
 100
 There were         1206 lost out of         5000 rays.
 Begin verification.
 Total power in file:    177.5852381870675    
 Compare with:           233.3800000000000    
 Computations done. Ready to store output data.
 The files contain the power density at the nodes but
 for the case of ANSYS, that stores power.
 File for: 
  TOP DRAWER          [ 0 ] 
  NCAR                [ 1 ] 
  Generic             [ 2 ] 
  For ANSYS           [ 3 ] 
 2
 Output file ? 
 power.dat
 All done.
 $ 
 $ 
 $ dir/since=-00:05
 
 Directory DUB0:[CERRINA.POWER.NOEMITT.DEMO]
 
 POWER.DAT;1              46  26-JUL-1988 19:58  (RWED,RWED,RE,RE)
 PWR_DENS.PAR;1            3  26-JUL-1988 19:58  (RWED,RWED,RE,RE)
 
 Total of 2 files, 49 blocks.
 $ 
 $ type pwr_dens.par
 $SAVE_PAR
 IGO     =           1,
 PWRT    =   233.3800000000000    ,
 INFIL0  = '
 ',
 INFIL1  = 'begin.dat                                                            
            ',
 INFIL2  = 'mirr.01                                                              
            ',
 INFIL3  = 'begin.dat                                                            
            ',
 INFIL4  = 'power.dat                                                            
            ',
 OUTFIL  = 'power.dat                                                            
            ',
 K_LOSS  =           0,
 CHECK   =  0.0000000000000000E+00,
 XMIN    =  -16.00000000000000    ,
 XMAX    =   16.00000000000000    ,
 N_X     =          33,
 YMIN    =  -1.500000000000000    ,
 YMAX    =   1.500000000000000    ,
 N_Y     =          13,
 I_X     =           1,
 I_Y     =           2,
 ISCALE  =           1,
 K_ACT   =           1,
 ITER    =           1,
 IANSW   =           2,
 ILOOP   =         100
 $END
 $ 
 $ 
 $ 		!	This is the Namelist file that PWR_DENS uses to
 $ 		!	communicate between successive runs. Notices the
 $ 		!	variables ITER (# of iterations executed) and ILOOP
 $ 		!	(# of iterations to perform), as well as the names of
 $		!	the files.
 $ 
 $ type power.dat
  -15.515      -1.3846      0.00000000E+00        0
  -15.515      -1.1538      0.00000000E+00        0
  -15.515     -0.92308      0.00000000E+00        0
  -15.515     -0.69231      0.00000000E+00        0
  -15.515     -0.46154      0.00000000E+00        0
  -15.515     -0.23077      0.00000000E+00        0
  -15.515     -0.69389E-17  0.00000000E+00        0
  -15.515      0.23077      0.00000000E+00        0
  -15.515      0.46154      0.00000000E+00        0
  -15.515      0.69231      0.00000000E+00        0
  -15.515      0.92308      0.00000000E+00        0
  -15.515       1.1538      0.00000000E+00        0
  -15.515       1.3846      0.00000000E+00        0
  -14.545      -1.3846      0.00000000E+00        0
  -14.545      -1.1538      0.23973092E-01        1
  -14.545     -0.92308      0.15540395            4
  -14.545     -0.69231      0.44996969            8
  -14.545     -0.46154       1.2215964           16
  -14.545     -0.23077       3.5852626           22
  -14.545     -0.69389E-17   14.113690           37
  -14.545      0.23077       8.6410836           30
  -14.545      0.46154       1.6723464           17
  -14.545      0.69231      0.35993567            7
  -14.545      0.92308      0.41676713E-01        1
  -14.545       1.1538      0.00000000E+00        0
  -14.545       1.3846      0.00000000E+00        0
  -13.576      -1.3846      0.00000000E+00        0
  -13.576      -1.1538      0.00000000E+00        0
  -13.576     -0.92308      0.89616760E-01        3
  -13.576     -0.69231      0.54342322            8
  -13.576     -0.46154       2.3024622           19
  -13.576     -0.23077       6.4111745           28
  -13.576     -0.69389E-17   17.208752           45
  -13.576      0.23077       3.8642511           21
  -13.576      0.46154      0.61556070            7
  -13.576      0.69231      0.38149287            7
  -13.576      0.92308      0.85998459E-01        2
  -13.576       1.1538      0.55512790E-01        1
  -13.576       1.3846      0.00000000E+00        0
  -12.606      -1.3846      0.00000000E+00        0
  -12.606      -1.1538      0.00000000E+00        0
  -12.606     -0.92308      0.69270126E-01        2
  -12.606     -0.69231      0.23527899            5
  -12.606     -0.46154       1.2358119           10
  -12.606     -0.23077       6.7547319           23
  -12.606     -0.69389E-17   8.4732089           34
  -12.606      0.23077       3.7160209           25
  -12.606      0.46154      0.65032794            8
  -12.606      0.69231      0.22880330            3
  -12.606      0.92308      0.26714693E-01        1
  -12.606       1.1538      0.00000000E+00        0
  -12.606       1.3846      0.00000000E+00        0
  -11.636      -1.3846      0.00000000E+00        0
  -11.636      -1.1538      0.00000000E+00        0
  -11.636     -0.92308      0.80388084E-01        2
  -11.636     -0.69231      0.13807639            3
  -11.636     -0.46154       1.0462331           12
  -11.636     -0.23077       3.7838449           19
  -11.636     -0.69389E-17   7.1383986           31
  -11.636      0.23077       6.6430723           25
  -11.636      0.46154       1.6847331           16
 $
 $ 		!		Notice the large fluctuations in the
 $ 		!		power density. This is way we have to repeat
 $ 		!		and accumulate the data several times.
 $ 
 $ 		!		We recommend about 100 iterations or more.
 $ 		!		Remember that the % error is given by
 $ 		!			1 / SQRT (N)
 $ 		!		where N is the number of rays into each bin.
 $ 
 $ 		!		The comamd file REPEAT.COM performs these
 $ 		!		calculations automatically. Notice that
 $ 		!		REPEAT uses another program, SEED, that is 
 $ 		!		used to update the random number generator:
 $ 
 $ run [cerrina.power]seed
 $ dir start
 
 Directory DUB0:[CERRINA.POWER.NOEMITT.DEMO]
 
 START.00;102              7  26-JUL-1988 20:05  (RWED,RWED,RE,RE)
 START.00;101              7  18-JUL-1988 08:58  (RWED,RWED,RE,RE)
 START.01;1               11   5-JUL-1988 08:45  (RWED,RWED,RE,RE)
 
 Total of 3 files, 25 blocks.
 $ 
 $ diff start.00
 ************
 File DUB0:[CERRINA.POWER.NOEMITT.DEMO]START.00;102
    14    ISTAR1  = -1160516176,
    15    NPOINT  =        5000,
 ******
 File DUB0:[CERRINA.POWER.NOEMITT.DEMO]START.00;101
    14    ISTAR1  =  -124440472,
    15    NPOINT  =        5000,
 ************
 
 Number of difference sections found: 1
 Number of difference records found: 1
 
 DIFFERENCES /IGNORE=()/MERGED=1-
     DUB0:[CERRINA.POWER.NOEMITT.DEMO]START.00;102-
     DUB0:[CERRINA.POWER.NOEMITT.DEMO]START.00;101
 $ 
 $ 
 $ 		!		SEED reads in the END.00 file and puts the
 $ 		!		random number seed variable (ISTAR1) back into
 $ 		!		START.00
 $ 		!		In case you worry, the pseudo-random number
 $ 		!		generator repeats itself after an exceedingly
 $ 		!		large number of iterations (10**13, but I may
 $ 		!		be wrong).
 $ 
 $ 
 $ copy [-]repeat.com
 $ type repeat.com


 $ASSIGN SYS$COMMAND TT:
 $@[CERRINA.POWER]SETUP
 $YES_TYPE == "SECOND"
 $ASSIGN SYS$COMMAND TT:
 $pwr_dens :== run [cerrina.power]pwr_dens
 $ASSIGN SYS$COMMAND TT:
 $seed :== run [cerrina.power]seed
 $SET DEF [CERRINA.POWER.NOEMITT]
 $I = 0
 $AGAIN:
 $GO
 SOURCE
 BATCH
 START.00
 TRACE
 BATCH
 0
 START.01
 0
 %EXIT
 EXIT
 $PWR_DENS
 1
 $PURGE/EXC=TRY.DAT/KEEP=2
 $SEED
 $I = I + 1
 $SHOW SYMBOL I
 $IF I .EQS. 200 THEN $EXIT
 $GOTO AGAIN
 $EXIT


 $ 
 $ 		!		To prepare for a succesful run:
 $ 		!
 $ 		!	1. Use your default directories in REPEAT
 $ 		!	2. Make sure that the numer of iterations is the
 $ 		!	   same as what you specified in PWR_DENS the first
 $ 		!	   time you run it (if not the program will crash
 $ 		!	   after ILOOP iterations, without however affecting
 $ 		!	   the validity of the calculations).
 $ 
 $ dir [-]*.com
 
 Directory DUB0:[CERRINA.POWER.NOEMITT]
 
 DOIT.COM;1                1  17-JUL-1988 23:45  (RWED,RWED,RE,RE)
 REPEAT.COM;1              1  17-JUL-1988 23:42  (RWED,RWED,RE,RE)
 
 Total of 2 files, 2 blocks.
 $ 
 $ 		!	3. Use the following command:
 $ 
 $ 
 $ type [-]doit.com
 $submit/notify/noprinter/log=noemitt.log/cputime=infinite repeat
 $ 
 $ 		!	where you should replace the log file name with
 $ 		!	whatever you like.
 $ 
 $		!	Happy tracings.
