----- file created by makedoc on: Tue Apr  1 15:29:53 2008
----- Documentation for /scisoft/xop2.3/extensions/shadowvui/src/lib/intens.pro -----

 NAME:
	INTENS
 PURPOSE:
	calculates the intensity from a file or set of files
 CATEGORY:
	SHADOW's utilities.
 CALLING SEQUENCE:
	intens,shadow_in,intens_out,Keyword_parameters
 INPUTS:
	shadow_in  may be:
          a SHADOW file (between quotes): eg. 'begin.dat' or
          an IDL-SHADOW structure (without quotes)
 OPTIONAL INPUT PARAMETERS:
	intens_out the name of an IDL variable with the intensity values
 KEYWORD PARAMETERS:
		NOLOST = consider losses
			0 all rays (default option)
			1 exclude losses;
               POLARIZATION = when set to 1 calculates the polarization 
                              parameters:
                              Is (total intensity for s-polarization)
                              Ip (total intensity for p-polarization)
                              S0-stokes = |Es|^2 + |Ep|^2
                              S1-stokes = |Es|^2 - |Ep|^2
                              S2-stokes = 2 |Es| |Ep| cos(phase_s-phase_p)
                              S3-stokes = 2 |Es| |Ep| sin(phase_s-phase_p)
 OUTPUTS:
 COMMON BLOCKS:
	None.
 SIDE EFFECTS:
	None.
 RESTRICTIONS:
	None.
 PROCEDURE;
	Similar to SHADOW's original.
 MODIFICATION HISTORY:
	M. Sanchez del Rio. ESRF. Grenoble, Oct 1992
	96/04/16 MSR change fix() by long() in line 16 (to work for
		large number of rays)
       2006/12/08 srio@esrf.fr fixes a bug when nolost=1

