******************************************************************************
  This is a demo on how to simulate a multilayers mirror with SHADOW.
******************************************************************************

System PSLC (vms 4.7)

Username: XRAYOP
Password: 
                    Welcome to VAX/VMS Version 4.7
                  University of Wisconsin - Madison
                     Physical Sciences Laboratory

 
    Last interactive login on Friday, 19-FEB-1988 16:22
    Last non-interactive login on Friday, 19-FEB-1988 11:03

    You are logged into _RTA2:

  
 
Defining Logical Names and Environmental Parameters
Graphics device [e.g. TTD3: ] ? : TT

 All logical names and command defined.

Enter $GO to activate SHADOW.

Enter HELPSHA for help.

Type NEWS for recent modifications.: 
$ CREATE/DIR [.MLAYER]
$ SD [.MLAYER]
$ DIR
%DIRECT-W-NOFILES, no files found
!
! PRE_MLAYER is the utility program which asks the users for the multilayers
! parameters, and generates an output file suitable for SOURCE.
!
$ PRE_MLAYER
Name of output file :  MLAYER.PAR
Photon energy (eV) from :  100
                     to :  300
********************************************************
Specify the substrate material :			!
Density [ g/cm3 ] ? 					! Si substrate
2.32							!
How many atomic species (up to 5) ? 
1
H2O would be: HH,2 and OO,1. Then ? 
Enter 2-letters (capitalized) atomic symbol and formula index for :            1
SI
1
Formula:  
SI( 1) 

Molecular weight is :    28.10000     Number of molecules/cm3:   4.9719812E+22
Atoms/Cm3 of each species:
    SI
 0.49720E+23
 Density    2.320000     g/cm3
********************************************************
Right above the substrate is the even layer material.
Specify the even layer material :			!
Density [ g/cm3 ] ? 					! Carbon on top of Si.
2.26							!
How many atomic species (up to 5) ? 
1
H2O would be: HH,2 and OO,1. Then ? 
Enter 2-letters (capitalized) atomic symbol and formula index for :            1
CC
1
Formula:  
CC( 1) 

Molecular weight is :    12.00000     Number of molecules/cm3:   1.1341619E+23
Atoms/Cm3 of each species:
    CC
 0.11342E+24
 Density    2.260000     g/cm3
********************************************************
Odd layer material is on top of the even layer.
Specify the odd layer material :			!
Density [ g/cm3 ] ? 					! Then tungsten.
19.3							!
How many atomic species (up to 5) ? 
1
H2O would be: HH,2 and OO,1. Then ? 
Enter 2-letters (capitalized) atomic symbol and formula index for :            1
WW
1
Formula:  
WW( 1) 

Molecular weight is :    184.0000     Number of molecules/cm3:   6.3166570E+22
Atoms/Cm3 of each species:
    WW
 0.63167E+23
 Density    19.30000     g/cm3
********************************************************
No. of layer pairs : 
40
Now specify the thickness (angstroms) of each pair starting from the substrate s
urface.  Type two -1 whenever you want the remaining layers to assume the thickn
esses of the previous one.
Even and odd thicknesses of layer            1		! C = 20 Angstroms
20,15							! W = 15 Angstroms
Even and odd thicknesses of layer            2		! and all layers have 
-1,-1							! same thicknesses.
$ DIR

Directory D13:[XRAYOP.MLAYER]

MLAYER.PAR;1             11  19-FEB-1988 16:33  (RWED,RWED,RE,RE)

Total of 1 file, 11 blocks.
$ GO



  :::::::  :::    ::            :::    :::::::        :::::     :::  ::  ::
 ::::::::  :::    ::           ::::    ::::::::      :::::::    :::  ::  ::
:::        :::    ::          ::: :    :::   :::    :::    ::   :::  ::  ::
:::        :::    ::         ::: ::    :::    ::    :::    ::   :::  ::  ::
 :::::::   :::::::::        :::  ::    :::    ::    :::    ::   :::  ::  ::
  :::::::  :::::::::       :::   ::    :::    ::    :::    ::   :::  ::  ::
       ::  :::    ::      :::    ::    :::    ::    :::    ::   :::  ::  ::
      :::  :::    ::     :::     ::    :::   :::    :::   :::   ::: ::: :::
::::::::   :::    ::    :::      ::    ::::::::      :::::::     :::::::::
:::::::    :::    ::   :::       ::    :::::::        :::::       ::: :::




VERSION     87.3                                               1 December 1987




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 ] ? : PROMPT
Call to INPUT


---------------------------------- S H A D O W  ------------------------------- 
Mar 1987                                         F.Cerrina        ECE - UW      

Defining source : 
When prompted for a yes/no answer, you may enter:
for   YES  answer      Y, 1
for   NO   answer      anything else




Do you want a verbose [ 1 ] or terse [ 0 ] output ?
1

------------- SOURCE SPECS ------------------
Options available:
Random in  BOTH REAL and MOMENTUM space      0
Grid       BOTH      1
Grid       REAL, random  MOMENTUM              2
Random     REAL,  grid   MOMENTUM      3
Ellipses in PHASE space, random around each ellipse   4
Ellipses in PHASE space,   grid around each ellipse   5
Source modelling type [ 0-5 ] ?  0
How many rays [ 1 - 5 000 ] ?  500
Seed [ odd, 1000 - 1 000 000 ] ?  2457
Do you want to optimize the source ?  0

Is this a wiggler source ?  0

 The source is specified in the laboratory reference frame. The program will then rotate the set of 
rays in the mirror frame.

Type of source,now.

         use  ( 0 ) for point source  
              ( 1 ) for rectangular s.
              ( 2 ) for elliptical  s.
              ( 3 ) for gaussian    s.

X-Z plane source type [ 0-3 ] ?  0

Source depth. The actual source will be centered on the no-depth position. Use 
         (1) for no depth,
         (2) for flat depth distribution,
         (3) for gaussian depth distribution,
                (4) for a synchrotron source depth distr.

                   Then ? 
Source Depth [ 1-4 ] ?  1


O.K., got it so far.
         Source distribution now. We may use 
             ( 1 ) for a flat source
             ( 2 )       uniform   s.
             ( 3 )       gaussian  s.
             ( 4 )       synchrotron 
             ( 5 )       conical 
             ( 6 )       exact synchrotron 

Source Angle Distribution [ 1-6 ] ?  2
Horizontal half-divergence [ (+)x, rads ] ?  .005
                           [ (-)x, rads ] ?  .005
Vertical                   [ (+)z, rads ] ?  .005
                           [ (-)z, rads ] ?  .005
Do you want a Photon energy [ Y/N ] ? 
Y
We have these choices :
Single line ......................... 1
Several lines ....................... 2
Uniform source....................... 3
Energy distribution [ 1-3 ] ?  3
Photon Energy [ 0 ] or Angstroms [ 1 ] ?  0
From photon energy or wavelength ... 
 ?  195
... to photon energy or wavelength :
 ?  205

Do you want to store the optical paths (OPD) [Y/N] ?  0
Do you want to generate the A vectors (electric field) [Y/N] ? 0
Exit from INPUT_SOURCE


Generated          250 rays out of          500
                   500
Exit from SOURCE
SOURCE => Source has been succesfully generated.

SOURCE procedure completed.

Shadow:: TRACE


Ray Tracing Selected. Begin procedure.


Mode selected [ ? <ret> for HELP ] ? : PROMPT
PROMPT selected.
Call to RESET
Exit from RESET


Mode selected is: 
PROMPT                                                                          
Options: to start anew                 [ 0 ] 
            to restart from a given OE [ 1 ] 
Then ? 
0
Call to INPUT_OE



---------------------------------- S H A D O W  ------------------------------- 
Mar 1987                                         F.Cerrina        ECE - UW      
 
When prompted for a yes/no answer, you may enter:
for   YES  answer      Y, 1
for   NO   answer      anything else
 

Defining Optical Element:  1
Continue ? [ ^Z or %EXIT to terminate OS ] 
1




Do you want a verbose [ 1 ] or terse [ 0 ] output ?
1

Let's define the optical or central axis of the system
for this particular optical element.
By this I mean a "virtual" line that runs throughout
the optical system. Along this line are located the 
"continuation" planes, where the OS is subdivided in the
individual OE. This line does not have to coincide with the
true optical axis, as it is used mainly for bookeeping the
data, but it helps greatly in the data analysis if this
identity is preserved as everything in the program is referredto it.
Once established, you still have complete freedom of
"moving" around the mirrors. 
In the case of a grating, you will have several choices. The 
program may override your specifications for the central axis 
and locate the source and image at the "best" position. 
You will be prompted later for this option.
It is recommended to use CM as units. This is not critical for
 most cases, but it is in the case of diffraction elements.
Optical Element definition:
Incidence Angle ?  27
Source Distance ?  100
Reflection Angle?  27
Image Distance  ?  100
Reflector [ 0 ] or refractor [ 1 ] ?  0

Lets define the mirror. I may compute its parameters, like the
radius or the axes. This will not affect the rest of the calcu
lations; all the geometrical parameters may be modified later.
Or, you may wish to specify the mirror parameters yourself.


What kind of surface are we dealing with ?
spherical    = 1
elliptical   = 2
toroidal     = 3
paraboloid   = 4
plane        = 5
Codling slit = 6
hyperbolical = 7
cone      = 8
polynomial   = 9

Mirror surface [ 1-9] ?  5
Is the mirror Cylindrical ?  1
Angle of cylinder axis from x axis [ 0 ] ? 0
Is this optical element a Fresnel Zone Plate ?  0
Are we dealing with a Grating ?  0

Are we dealing with a crystal [ Y/N ] ?  0
Is the mirror convex [ Y/N ] ?  0
Reflectivity of Surface. SHADOW may solve the Fresnel equations locally.
Available options:'No reflectivity              .......... 0 
Full polarization dependence .......... 1 
No        "           "      .......... 2 
Reflectivity mode [ 0,1,2 ] ?  2

Optical constants from file  ( for multi-line source ) ..... 0
Optical constants from keyboard  (single-line source ) ..... 1
Define multilayer from file                            ..... 2
Optical Constant Source: [file=0,tt:=1], multilayer [2] ? 2
File with thicknesses and refractive indices of multilayer ? MLAYER.PAR


Mirror orientation angle. Angles are measured CCW, in deg,
referring to the mirror normal. Alpha=0 is the mirror
sitting at the origin, facing up. Alpha = 90 is the 
mirror standing at your right and facing left when you 
look along the beam STANDING ON THE PREVIOUS MIRROR and so on.
Orientation Angle [ Alpha ] ?  0

Mirror Dimensions finite [ Y/N ] ? 0

 The Optical Element and the the relative mirror are now fully 
defined. The mirror pole is now located at the "center" of the 
optical element. It is possible to override this situation and 
"move" the mirror without affecting the rest of the system.
 It is also possible to move the "source" without affecting the
rest of the system.
 The movements are expressed in the DEFAULT Mirror Ref. Frame.
 so that if you move BOTH source and mirror the relative
movement is the vector sum of the individual ones.
A word of caution: SOURCE movements and MIRROR movements are
NOT equivalent from the point of view of the whole system.
Do you want to move the Source [ Y/N ] ?  0
   
--- Mirror rotations and position. ---
We define three angles, as rotations around the three axis.
These rotation are  defined in the program as corrections to
the mirror nominal position; that is, they modify the mirror
position relative to the Default Mirror Reference Frame, where
all the calculations are performed. Remember that rotations
do NOT commute. I apply them in the same order of entry.
CW ROTATIONS are (+) angles. A translation can be also applied to the mirror.
Do you want to move the mirror itself [ Y/N ] ?  0
Rippled surface [ Y/N ] ?  0

Any screens in this OE [ Y/N ] ?  0

Slit at continuation plane [ Y/N ] ?  0
Extra Image plates [ Y/N ] ?  0
File containing the source array ?  BEGIN.DAT
Exit from INPUT
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 ?  0
Call to INPUT_OE



---------------------------------- S H A D O W  ------------------------------- 
Mar 1987                                         F.Cerrina        ECE - UW      

Defining Optical Element:  2
Continue ? [ ^Z or %EXIT to terminate OS ] 
%EXIT
End of session


 
Procedure completed. Return to COMMAND level
 


Procedure completed.

Shadow:: EXIT



Exit to DCL

$ DIR

Directory D13:[XRAYOP.MLAYER]

BEGIN.DAT;1              94  19-FEB-1988 16:44  (RWED,RWED,RE,RE)
EFFIC.01;1                1  19-FEB-1988 16:47  (RWED,RWED,RE,RE)
END.00;1                  7  19-FEB-1988 16:44  (RWED,RWED,RE,RE)
END.01;1                 11  19-FEB-1988 16:47  (RWED,RWED,RE,RE)
MIRR.01;1                94  19-FEB-1988 16:47  (RWED,RWED,RE,RE)
MLAYER.PAR;1             11  19-FEB-1988 16:33  (RWED,RWED,RE,RE)
OPTAX.01;1                2  19-FEB-1988 16:47  (RWED,RWED,RE,RE)
STAR.01;1                94  19-FEB-1988 16:47  (RWED,RWED,RE,RE)
START.00;1                7  19-FEB-1988 16:44  (RWED,RWED,RE,RE)
START.01;1               11  19-FEB-1988 16:47  (RWED,RWED,RE,RE)

Total of 10 files, 332 blocks.
!
! This shows the average reflectivity across the photon energy window 
! of the source (195 eV to 205 eV).
!
$ TY EFFIC.01
Of a total of    500 rays, of which    500 formed the input set 
     0 were out of the mirror N.    1
The mirror collects   1.0000     of the incoming flux.
The average reflectivity is : 0.43724E-01
The overall efficiency of the mirror is : 0.43724E-01
$ PREPLOT
PREPLOT> Input file ? 
STAR.01
Read                  500 rays.
Each ray has           12 entries.
PREPLOT> How many columns to write out ?  2
Row [1-12]  : the individual column
Row   [20]  : R = SQRT(X**2 + Y**2 + Z**2)
Row   [21]  : angle from the Y-axis
Row   [22]  : the magnitude of A vector
Row   [23]  : A**2
PREPLOT> Row # 1 :  11				! Photon energy
PREPLOT>       2 :  23				! Intensity
Option:    Angstroms        [ 0 ] 
           Electronvolts    [ 1 ] 
           Cm-1             [ 2 ] 
PREPLOT> Then ?  1
Options --- Enter
0 for excluding the losses
1 for including losses at a particular O.E.
2 for plotting all the rays .
3 for plotting ONLY the losses (all of them)
4 for plotting ONLY the losses at a given O.E.
PREPLOT> Then ?  0
***********
Found          500 good points out of         500
Output options :
  [ 0 ] store rays in a file
  [ 1 ] plot directly on screen
  [ 2 ] both
Then ?  2
PREPLOT> Output file ? 
STAR.PLT
PREPLOT> Terminal type: [ 0 ] VT240, [ 1 ] TEK 40xx, [ 2 ] HIREZ, [ 3 ] TEK 4107
$LOG
