----- file created by makedoc on: Tue Mar  3 17:24:53 2009
----- Documentation for /scisoft/xop2.3/extensions/shadowvui/src/lib/div_grid.pro -----

 NAME:
	DIV_GRID

 PURPOSE:
       This procedure creates a SHADOW source. It is a point source
	with a grid divergence space. The grid can be a combination of:
	  i) circles
	  ii) radial sticks
	  iii) horizontal sticks
	  iv) vertical sticks

 CATEGORY:
	SHADOW

 CALLING SEQUENCE:
       Div_Grid,maxAperture

 OPTIONAL INPUTS:
       
	maxAperture: the angle defining the maximal aperture for
		any grid.

 KEYWORD PARAMETERS (** AT LEAST ONE MUST BE DEFINED**)
	nCTheta: the number of circles to be creates. The nCTheta
		circles will range from 0 rad to maxAperture
	nRTheta: the number of radial sticks to be creates. The nRTheta
		sticks will have inclination from 0 to 2 pi rads.
	nHTheta: the number of horizontal sticks to be creates. The nHTheta
		sticks will be spaced from -maxAperture to maxAperture
	nHTheta: the number of vertical sticks to be creates. The nVTheta
		sticks will be spaced from -maxAperture to maxAperture

	cTheta: array with the angular values for circles.
		If cTheta is defined the nCTheta keyword is irrelevant.
	rTheta: array with the angular values for radial sticks.
		If rTheta is defined the nRTheta keyword is irrelevant.
	hTheta: array with the angular values for horizontal sticks.
		If hTheta is defined the nHTheta keyword is irrelevant.
	vTheta: array with the angular values for vertical sticks.
		If vTheta is defined the nVTheta keyword is irrelevant.

	Group: The widget ID of the caller. 
	V: A named variable where the velocities are optionally returned
		( 3xnPoints array )
	File: The name of SHADOW file (for output) (Defautl='begin.dat')

 OUTPUTS:
       Writes a shadow file.

 PROCEDURE:
       
	Calls div_circle.pro div_radial.pro and div_line.pro

 EXAMPLE:

	Div_Grid,1.,nHTheta=10,nVTheta=10,nCTheta=10,nRTheta=10
	plotxy,'begin.dat',4,6,Cart=1,Histo=3

 MODIFICATION HISTORY:
 	Written by:	Manuel Sanchez del Rio (srio@esrf.fr), 99-12-23


