
--------------------------------------------------------------------------------
SURFACE ERRORS

Shadow may use two types of figure errors:

		a) sinusoidal
		b) gaussian

both correspond to the geometrical optics limits, in which the defect wavelength
is much larger than the radiation wavelength.
The sinusoidal errors are obvious, and they are normally specified in the I/O
session.
The gaussian defects (up to 10) are of more complex specification, as they are
defined by:

     	CORR	=   CORR 
     $ + SIGNUM(I)*AMPLI(I)*EXP( - (V_IN(1) - X_GR(I))**2*SIG_X(I)**2
     $		 		-  (V_IN(2) - Y_GR(I))**2*SIG_Y(I)**2 )

CORR is the correction (in Z) due to the I-th ripple. Notice that each defect
is specified by:

	a. position       x_gr(i), y_gr(i)
	b. amplitude      ampli(i)
	c. witdh          1/sig_x(i), 1/sig_y(i)
	d. sign           signum(i)

a and b are obvious; they must be in the same units as the rest of the OS. c
is the 'sharpness' of the defect: sig_x = 0 gives a flat defect, the larger
is sig_x the sharper will be the hill (or hollow). d specifies if the defect is
a hollow (-1) or hill (+1).


 These paramters may be all specified by the user (f_r_ran=0) or generated by
SHADOW within some given limits.
BB As up to 10 ripples may be specified, a file input is taken to be the normal
I/O way.
[B
 The ordering of quantities in the file is critical.

----------------------------------------
- 1) f_r_ran = 1
- 
- The program will read 3 surface defects (gaussians). Two are hollows and one is
- a hill. The file follows:
3,		//   n_rip, Number of 'ripples'
0,		//   f_r_ran =1 random, =0 fixed
1919111,        //   Random number seed
9.35,		//   Center of 1st ripple (X)
3.75,		//                        (Y)
1.0E-6,		//   Amplitude
1.0E2,		//   Sigma X
1.0E2,		//   Sigma Y
-1,		//   Sign of ripple (hollow)
3.12,		//   Center of 2nd ripple (X)
9.53,		//                        (Y)
1.0E-6,		//   Amplitude
1.0E2,		//   Sigma X
1.0E2,		//   Sigma Y
1,		//   Sign of ripple (hill)
19.35,		//   Center of 3rd ripple (X)
3.75,		//                        (Y)
11.0E-6,		//   Amplitude
1.0E2,		//   Sigma X
1.0E2,		//   Sigma Y
-1,		//   Sign of ripple (hollow)
------------------------------------------------------
- 2) f_r_ran = 1
-
-  The program will generate n_rip random defects, within the mirror dimensions.
-  The amplitude will be randomly selected between +/- amplitude in file
-  The 'sharpness' limits (1/standard deviation) for each direction
-  The file structure is:
3,		//   N_rip, 3 defects
1,		//   f_r_ran, =1 = random
191919, 	//   seed
1.2e-6,		//   amplitude (peak to peak) of 1st ripple
0,		//   minimum 'sharpness'  in X
0.1,		//   maximum 'sharpness'  in X
0,		//                           Y
0.2,		//                           Y
1.2e-4,		//   amplitude (peak to peak) of 2nd ripple
0,		//   minimum 'sharpness'  in X
0.5,		//   maximum 'sharpness'  in X
0,		//                           Y
0.4,		//                           Y
.2e-3,		//   amplitude (peak to peak) of 3rd ripple
0,		//   minimum 'sharpness'  in X
0.5,		//   maximum 'sharpness'  in X
0,		//                           Y
1.0,		//                           Y
--------------------------------------------------------------------------------

The surface defects used will be stored in a file called "ripples.in"

--------------------------------------------------------------------------------
It is possible to examine the surface defects by running a PLANE mirror with the
same set of defects and with a source as:

           	grid, 21 x 21 (or whatever), 
		rectangular
		divergence = 0		//   This will generate a collimated
source with
		incidence = 0
		source distance = 100 (or whatever)

After running SHADOW, execute MESH on MIRR.01. This will generate a 3-d file
of the surface. Execute then TopDrawer ($TDTEK) and issue:
		set three
		@mesh.plt
		join
This will generate the actual plot to the screen. Consult the Top Drawer manual
for more info on 3-d plots
