Documentation for  xaid_calib.pro

----- Documentation for xaid_calib.pro -----
 =================================  xaid_calib ===============================

		
   xaid_calib is a widget based graphical interface to perform the
   XAFS calibration. It allows to load two spectra (reference spectrum
   and spectrum to calibrate) and allows to interactively shift the
   one to be calibrated over the reference one. The calibration is
   done with the formula:
   t[i] = Xuncalibrated[i]-Xuncalibrated[0]
   Xcalibrated[i] = a + b*( t[i] ) + c*(t[i])^2
	
   (The substraction of Xuncalibrated[0] is essential for TurboXAS).
		

 ----------------------------------------------------------------------

	NAME:
		XAID_CALIB
	PURPOSE:
		 Calibrate Dispersive EXAFS data.
 	CATEGORY:
		Widgets. XAFS data analysis.
	CALLING SEQUENCE:
		XAID_CALIB 
	KEYWORD PARAMETERS:
		GROUP = The widget ID of the widget that calls Xplot.
		When this ID is specified, a death of the caller results 
		in a death of XAID_Mu2Chi.
		DELIAID = a structure with the widget id's from DELIA
		  application. To be used when XAID_CALIB is called from DELIA.
		XPLOTID = the id of an existing xplot window where XAID_CALIB
		  will send the plots. If undefined, XAID_CALIB creates a new
		  xplot window.
	OUTPUTS:
		Opens XPLOT windows and allows changing interactively the 
		calibration coefficients a,b and c. The results are 
		automatically copied to the DELIA application when DeliaId 
		keyword is used.
	SIDE EFFECTS:
		If not active, starts Xmanager
	RESTRICTIONS:
		Unknown.
	PROCEDURE:
		Uses Xplot
	MODIFICATION HISTORY:
		Written by  Manuel Sanchez del Rio. ESRF. 2 October 1998
		2006-03-01 srio@esrf.fr Use Max(Deriv) to set the x0
			(following the ideas of Moniek Tromp). 
			Some other small improvements.
		2006-07-19 srio@esrf.fr Some changes to automatic adjust
			Y clipping, etc. (after Gemma Guilera)
		2009-05-15 srio@esrf.eu adds Example and fixes
                       automatic calculation of a and x[0] from max(Deriv)


