----- file created by makedoc on: Tue Feb 11 14:15:23 2003
----- Documentation for /scisoft/IDL/scisoft/xaid/src//e2k.pro -----

 NAME:
	E2K

 PURPOSE:
	This function change the scale from E (energy eV) to 
	K (wavenumber, arstroms^(-1) ) of an input set, creating an output set

 CATEGORY:
	XAID xafs data analysis package. 

 CALLING SEQUENCE:

	outset = E2K (inset)

 INPUTS:
	inset:fltarr(2,npoints) set of data

 OPTIONAL INPUTS:
	
 KEYWORD PARAMETERS:
	e0:	 value of the edge (in eV)

 OUTPUTS:
	outset: the new outpot set with 1st column in K
	input array."  

 OPTIONAL OUTPUTS:

 COMMON BLOCKS:

 SIDE EFFECTS:
	The points with energy less than e0 are translated to points
	with negative wavenumber, even if physically is not true
	(Kinematical energy negative?)

 RESTRICTIONS:
	None

 PROCEDURE:
	Uses the standard formula: k = A sqrt(E-Eo) with A= 2 m (2 pi)^2 / h^2 
	A=0.5123147 if E units are eV and k in A^(-1)

 EXAMPLE:

	set_k = E2K (set_ev,e0=7765)		

 MODIFICATION HISTORY:
 	Written by:	Manuel Sanchez del Rio. ESRF
	January, 1993	

