kstp =0: Calculations continue until the 
         determined propagation distance dnt.
     =1: Calculations terminate when the 
         stability factor stably falls below 
         0.001.
kskp Number of skips when light intensity is 
     output to i_*_td.out. The larger the 
     number, the faster the calculations, but 
     the coarser the single frame advance.
lp   Number of layers of absorbing boundary 
     PML. The smaller the number,the faster
     the calculations, the larger the 
     reflection from the boundaries.
clp  Boundary conditions of x and y 
     surfaces, where 1st digit is for 
     x-direction and 2nd digit is for 
     y-direction.
     =0 : PML,  =1 : PBC.
crn  Courant index,i.e., time ratio to 
     Courant criterion. Normally about 
     0.99, smaller (about 0.9) for dispersed 
     materials to suppress divergence in 
     calculations.
kfl  = 0 : Drawing without PML.
     = 1 : Drawing with PML.
kot  Distributions such as intensity, 
     absorption, and refractive index are 
     output in a maximum of (kot+5) digits.
ity  Definition of intensity distribution.
    =0 : magnitude of Poynting Vector,
    =1 : electric & magnetic fielf intensity, 
    =2 : electric fielf intensity,
    =3 : magnetic fielf intensity.
---------------------------------------------
kpls Light source oscillation conditions.
     = 0: Continuous wave CW, which 
          increases around cosine curve 
          before tw, peaks at tw, and 
          becomes constant after tw. It's 
          suitable for light amount 
          analysis.
     = 1: Gauss-pulse modulated, which
          peaks at tw and becomes 1/e maxmum 
          full width at tw/2.
     = 2: Sin^2-pulse modulated, which
          peaks at tw and becomes 1/2 maxmum 
          full width at tw/2.
     = 3: Sin^3-pulse modulated, which
          peaks at 0.5*tw and 1.5*tw and 
          becomes 1/√8 maxmum full width 
          around each peaks.
     = 4: Gauss-envelope sin-modulated, 
          which peaks at tw and becomes 1/e 
          maximum full width at tw/2. As it 
          includes no DC component, suitable 
          for frequency response analysis.
     = 5: Gauss-envelope cos-modulated, 
          which peaks at tw and becomes 1/e 
          maxmum full width at tw/2.
tw   peak time distance or pulse width (um, 
     converted by propagation distance)
kdip Radiation direction of light source.
     = 0: Single direction (EH-oscillation)
     = 1: Dual direction (E-oscillation)
     = 2: Dual direction (H-cscillation)
kdr  Spread direction of Light source.
     = 0: in xy-plane
     = 1: in yz-plane
     = 2: in xz-plane
dnt  Propagation distance(µm, in vacuum),
     which equals step numbers by time step.
nd1  In case of CW-oscilation (kpls=0), 
     number where the stability factor 
     approaching to zero crosses over 
     zero-line with light propagation.
nd2  In case of Pulse-oscilation (kpls<>0), 
     minimum value (10^nd2) of the stability 
     factor approaching to zero with light 
     propagation.
--------------------------------------------
  (Operated for kdr=0)
ksct = 0 : Without scattering field.
     = 1 : With scattering field.
lx   Number of layers of scattering zone 
     in x-direction.
ly   Number of layers of scattering zone 
     in y-direction.
lz   Number of layers of scattering zone 
     in z-direction.
--------------------------------------------
   (Operated for CW-oscillation kpls=0)
kff  Far-field analysis of 360-degrees.
     =0 : Not be conducted. =1: Be conducted.
nff  Number of azimuth angles in the far 
     field, or a partition number per single 
     rotation. Calculated results are output 
     to 360far.out.
thf  Starting azimuth angle in the far field 
     (deg).
fif  Argument angle in the far field (deg).

   (Operated for Pulse-oscillation kpls<>0)
krm  Frequency spectrum analysis.
     =0: Not be conducted. =1: Be conducted.
nrm  Division number of frequency spectrum. 
     Calculated results of time-domain and 
     frequency-domain for six boundaries of 
     analytic region and specified materials 
     are output to flow_t.out and flow_f.out, 
     respectively.
rm1  Analyzed starting wavelength (um).
rm2  Analyzed final wavelength (um).

--------------------------------------------
wdx  Analysis width in the x direction (um).
     wdx=0 becomes a 2-dimensional problem.
     The center of the width is the 
     positional basis for the light source 
     and structures. The number of grid 
     intervals is nx=int(wx/dx).
wdx  Analysis width in the y direction (um).
     wdy=0 becomes a 2-dimensional problem.
     The center of the width is the 
     positional basis for the light source 
     and structures. The number of grid 
     intervals is ny=int(wy/dy).
dx   Grid interval in x-direction (um).
dy   Grid interval in y-direction (um).
dz   Grid interval in z-direction (um).
     For layers where the layer thickness tk 
     divided by dz is not an integer, the 
     grid interval becomes tk divided by an 
     integer obtained by rounding up tk/dz.
---------------------------------------------
Lam  Wavelength (um).
th   Azimuth angle of incident light with 
     z-axis (deg). 
fi   Argument angle of incident light (deg).
     kdr=0 : with x-axis in xy-plane.
     kdr=1 : with y-axis in yz plain.
     kdr=2 : with x-axis in xz-plain.
gm   Angle gm (deg) shows polarization 
     direction of light source that the 
     electric vector E makes with the axis.
     kdr=0 : an angle between E and x-axis
             on xy plane.
     kdr=1 : an angle between E and y-axis
             on yz plane.
     kdr=2 : an angle between E and x-axis
             on xz plane.
--------------------------------------------
wx0  Light source spread in x-direction (um).
wy0  Light source spread in y-direction (um).
xrm  =1 : uniform intensity in x-direction.
     =0 : cos-intensity distribution.
          Full width half maximum = wx0/2
     =0～1 : rim intensity ratio of Gaussian 
          distribution in x-direction.          
yrm  =1 : uniform intensity in y-direction.
     =0 : cos-intensity distribution.
          Full width half maximum = wy0/2.
     =0～1 : rim intensity ratio of Gaussian 
          distribution in y-direction.      
sx0  Shift length of light source center in 
     x-direction (um).
sy0  Shift length of light source center in 
     y-direction (um).
kpx  Curvature type of light source amplitude 
     spread in x-direction.
kpy  Curvature type of light source amplitude 
     spread in y-direction.
--------------------------------------------
stx  Shift length of overall structure 
     center in x-direction (um).
     Not applicable for light source 
     position.
sty  Shift length of overall structure 
     center in y-direction (um).
     Not applicable for light source 
     position.
csx  Cross sectional position of graphics
     in x-direction (um).
csy  Cross sectional position of graphics
     in y-direction (um).
--------- km designation field -------------
           (for optical materials)
     The first 4 digits are serial line 
     numbers, up to 200 lines can be input.
Name Material name (within 8 digits)
     SiO2,Ag,Al,Au,Be,Cr,Cu,Ni,Pd,Pt,Ti,W 
     have internal data. For others, by 
     entering the wavelength, refractive 
     index, and extinction coefficient in 
     the file of nk.dat as external data, 
     the refractive index and extinction 
     coefficient are automatically 
     interpolated. If no data exists in 
     nk.dat, the values defined by the 
     right-side parameters of 'an' are given 
     priority. The nk.dat should be created 
     by each user and stored in the same 
     folder as wsf.exe.
ko   Whether to output detected light amount 
     to wsf1.out or not.
     =0 : not output, =1 : output.
an   Refractive index.
ab   Abbe number, if =0, no dispersion 
     (fixed to refractive index).
ak   Extinction coefficient.

--------- kr designation field ------------
         (for restricting shapes)
     The first 4 digits are serial line 
     numbers, up to 1000 lines can be input.
kd   How to input shape data of structures.
     =0: by internal definition.
     =1,-1: by external data using sub.dat.
         Applied to all except for wx and 
         wy, sub.dat can be input up to 400 
         types (up to 1000 lines for each 
         type).
kt   Selection of shape type.
     When kd=1, kt=Pattern No. in sub.dat.
     kd=-1 shows an inverted shape for kd=1.
     When kd=0,-kt shows an inverted shape
          for kt.
      kt=0 No area restriction.
        =1 Restricted by rectangular areas 
           of width wx*wy centered on a 
           square grid position of period 
           px*py.
        =2 Restricted by elliptic shape of 
           width wx*wy and elliptic index xp
           centered on a square grid 
           position of period px*py,
           where xp=-2.0 to -1.0 for star, 
                   =-1.0 for diamond, 
                   = 0.0 for ellipse,
                   > 0.0 for square.
        =3 Restricted by hexagons shape (top
           /bottom vertex angles) of width 
           wx*wy centered on a square grid 
           position of period px*py.
        =4 Restricted by hexagon shape (left
           /right vertex angles) of width 
           wx*wy centered on a square grid 
           position of period px*py.
        =5 Restricted by diamond shape of 
           width wx*wy centered on a square 
           grid position of period px*py.
        =6 Restricted by a right-angled 
           triangular shape (diagonal 1st 
           quadrant) of width wx*wy centered 
           on a square grid position of 
           period px*py.
        =7 Restricted by a right-angled 
           triangular shape (diagonal 2nd 
           quadrant) of width wx*wy centered 
           on a square grid position of 
           period px*py.
        =8 Restricted by a right-angled 
           triangular shape (diagonal 3rd 
           quadrant) of width wx*wy centered 
           on a square grid position of 
           period px*py.
        =9 Restricted by a right-angled 
           triangular shape (diagonal 4th 
           quadrant) of width wx*wy centered 
           on a square grid position of 
           period px*py.
ps   Rotation angle of all structures around 
     the region center (deg).
px   Structure period in x-direction (um).
     When =0, it is an isolated pattern.
py   Structure period in y-direction (um).
     When =0, it is an isolated pattern.
wx   Structure width in y-direction (µm). 
wy   Structure width in y-direction (µm). 
sx   Shift length of the structure center 
     in x-direction (um).
sy   Shift length of the structure center 
     in y-direction (um).
xp   Elliptic exponent index for kt=2.
     Lattice duty ratio for kt=10 to 17. 

--------- kf designation field ------------
         (for foreground structures) 
     The first 4 digits are serial line 
     numbers, up to 9999 lines can be input.
km   Construction material number referred in 
     km designation field.
     km=0 means vacuum (n=1.0).
kr   Restriction shape number referred in 
     kr designation field.
     kr=0 means restriction free.
kd   How to input shape data of structures.
     =0: by internal definition.
     =1,-1: by external data using sub.dat.
         Applied to all except for wx and 
         wy, sub.dat can be input up to 400 
         types (up to 1000 lines for each 
         type).
kt   Selection of shape type.
     When kd=1, kt=Pattern No. in sub.dat.
     kd=-1 shows an inverted shape for kd=1.
     When kd=0,-kt shows an inverted shape
          for kt.
      kt=0 No area definition.
        =1 Rectangular areas of width wx*wy 
           centered on a square grid position
           of period px*py.
        =2 Elliptic shape of width wx*wy and
           elliptic index xp centered on a 
           square grid position of period 
           px*py, where xp=-2.0 to -1.0 for
           star, 
                   =-1.0 for diamond, 
                   = 0.0 for ellipse,
                   > 0.0 for square.
        =3 Hexagons shape (top/bottom vertex
           angles) of width wx*wy centered 
           on a square grid position of 
           period px*py.
        =4 Hexagon shape (left/right vertex 
           angles) of width wx*wy centered 
           on a square grid position of 
           period px*py.
        =5 Diamond shape of width wx*wy 
           centered on a square grid position
           of period px*py.
        =6 Right-angled triangular shape 
           (diagonal 1st quadrant) of 
           width wx*wy centered on a square 
           grid position of period px*py.
        =7 Right-angled triangular shape 
           (diagonal 2nd quadrant) of 
           width wx*wy centered on a square 
           grid position of period px*py.
        =8 Right-angled triangular shape 
           (diagonal 3rd quadrant) of width
           wx*wy centered on a square grid 
           position of period px*py.
        =9 Right-angled triangular shape 
           (diagonal 4th quadrant) of 
           width wx*wy centered on a square 
           grid position of period px*py.
       =10 Linear lattice of period wx, angle 
           wy, duty ratio xp, starting point 
           xq included in each square grid 
           of period px*py.
       =11 Concentrically elliptic lattice 
           of period wx, angle wy, duty 
           ratio xp, starting point xq 
           included in each square px*py of 
           period px*py.
       =12 Concentrically dodecagonal 
           lattice of period wx, angle wy, 
           duty ratio xp, starting point xq 
           included in each square grid of 
           period px*py.
       =13 15-degrees-rotated lattice for 
           kt=12.
       =14 Concentrically 18-corner 
           polygonal lattice of period wx, 
           angle wy, duty ratio xp, starting 
           point xq included in each square 
           grid of period px*py.
       =15 10-degrees-rotated lattice for 
           kt=14.
       =16 Concentrically hexagonal lattice 
           of period wx, angle wy, duty 
           ratio xp, starting point xq 
           included in each square grid of 
           period px*py.
       =17 30-degrees-rotated lattice for 
           kt=16.
ps   Rotation angle of all structures around 
     the region center (deg).
px   Structure period in x-direction (um).
     When =0, it is an isolated pattern.
py   Structure period in y-direction (um).
     When =0, it is an isolated pattern.
wx   Structure width in y-direction (um). 
wy   Structure width in y-direction (um). 
sx   Shift length of the structure center 
     in x-direction (um).
sy   Shift length of the structure center 
     in y-direction (um).
xp   Elliptic exponent index for kt=2.
     Lattice duty ratio for kt=10 to 17. 
xq   Starting point of lattice for kt=10 
     to 17.

--------- Background layers -----------
     Up to 10000 lines can be input as far 
     as the last line or the line starting 
     from "c" appears. Optical constants 
     above the top layer or below the bottom 
     layer is the same ones as the top or the 
     bottom layer, respectively, and then no 
     boundary reflections from there.
kl   =1: light source at the central layer.
         If all of kl are 0, the top surface 
         of the first layer for cos(th)>0, 
         or the lower surface of the last 
         layer for cos(th)<0 is the light 
         source position.
     =2: The intensity distribution is 
         output to i_xy_t.out at the upper 
         surface of the layer.
km   Construction material number referred in 
     km designation field.
     km=0 means vacuum (n=1.0).
kp   Not operated (operated in wsb).
tk   Layer thickness (um)
kf   =0: No reference
     >0: Structure shape number referred in 
     kf designation field. The referred shape 
     structures are overwritten on the layer. 
     This numbers are represented by four 
     digits, up to 100 set per line.
