----- file created by makedoc on: Thu Sep 11 15:03:13 2014
----- Documentation for /scisoft/xop2.4/extensions/shadowvui/src/lib/slopes.pro -----

 NAME:
	SLOPES
 PURPOSE:
       This function calculates the slope errors of a surface along the mirror 
       length Y and mirror width X. 
 CATEGORY:
	SHADOW tools
 CALLING SEQUENCE:
	out = slopes(surface_str) or out = slopes(z,x,y)
 INPUTS:
	surface_str: a structure with the surface in the format {x:x, y:y, z:z) 
         or
	x: the width array of dimensions (NX)
	y: the length array of dimensions (NY)
	z: the surface array of dimensions (NX,NY)
 OUTPUTS:
       out: an array of dimension (2,NX,NY) with the slopes errors in rad
            along Y in out[0,*,*] and along Y in out[1,*,*]
 KEYWORDS
	slopesrms: set to a named variable to receive the a 4-dim array with 
       [slopeErrorRMS_X_arcsec,slopeErrorRMS_Y_arcsec, 
        slopeErrorRMS_X_urad,slopeErrorRMS_Y_urad]

 MODIFICATION HISTORY:
       MSR 1994 written
       08-04-15 srio@esrf.eu makes calculations in double precision.
       2014-09-11 documented

