----- file created by makedoc on: Tue May 29 14:44:08 2012

----- Documentation for /sware/exp/xop-2.3/extensions/shadowvui/src/vui/xsh_srcomp.pro -----

   ===========================  XSh_srcomp   =========================

   Xsrcomp is an widget based graphical interface to calculate
   the spectrum of a Bending Magnet Synchrotron Radiation source.
   It interfaces the program SRCOMP, a part of the ray-tracing package SHADOW.
   It creates an intermediate file SRCOMP which can be used as a source
   for TRANSMIT. The SRCOMP file is deleted when QUITing Xsrcomp.

   The main window contains four buttons:

	FILE:
		LOAD INPUT FILE: Reads a srcomp input file.
		SAVE INPUT DATA AS: Writes a srcomp input data into a file.
		WRITE FILES FOR XOP/OPTICS: This option permits to
		  write the files XSH_SRCOMPE and XSH_SRCOMPW to disk. These 
		  files contain the spectra in #photons/sec/0.1%bw and in 
		  Watts/eV respectively. They may be used by other applications
		  as for example, transmit, or for any other purpose.
		QUIT: to exit from the program

	SET PARAMETERS: to define the parameters for the calculation
		MACHINE NAME:	just fill the name.
		B FROM: For selecting B field from either Magnetic
			radius of the bending magnet or magnetic field.
		MAGNETIC FIELD: The magnetic field of the bending 
			magnet in Tesla.
		MACHINE RADIUS:	The radius of the Bending 
			Magnet in meters. 
		BEAM ENERGY:	The electron energy in GeV.
		(The three precedent parameters are related by:
			Radius [m] = 3.336 * Energy[GeV] / B[Tesla])
		BEAM CURRENT:	The electron beam current in Ampers.
		HORIZ DIV:	The horizontal divergence in mrad.
		MIN PHOTON ENERGY: 	Minimum photon energy for the 
					calculated spectrum, in eV.
		MAX PHOTON ENERGY: 	Maximum photon energy for the 
					calculated spectrum, in eV.
		PHOTON ENERGY STEP: 	Step energy for the calculated	
					spectrum, in eV.
		VERT DIV:  Vertical divergence of the photon beam
		accepted (write a big number for considering all the beam).
		
	SHOW: Produces a graphic of the Bending Magnet spectrum. The
		user can select the units. 

	HELP:   Shows this text


 ----------------------------------------------------------------------
       Author: M. Sanchez del Rio (srio@esrf.fr) , ESRF, Nov 1993
       Modification history:
	20/9/94	F.L add "load input file" option
	29/9/94	F.L add "save input file as..." option
	25/10/94 MSR remove common blocks and makes some cosmetics.
		Reads default input structure from XOP_DEFAULTS.
       96/01/19 MSR changes labels Xtransmit -> XOP/Optics
       96/06/26 MSR includes the possibility of setting the magnetic
		field instead the magnetic radius. Xplot log default graphs.
       97/01/23 MSR ports to Windows95. Cosmetics. Version 1.2.
       97/10/01 MSR renames read_ascii by rascii. Get the default
		structure from shadow_defaults() instead of xop_defaults()
		Makes use of SDEP(). Considered obsolete XOP application 
		(substituted by BM).
       97/10/02 MSR makes use of xop_wd,/default
       97/12/05 MSR renames to xsh_srcomp and adapts it for being used in 
		the SHADOW-GUI. Version 1.3.
       00/29/06 MSR allows passing input parameters as an argument
		(to be called from xsh_source)


