mR  ver3.3
7-OCT-94  MJF
02-04-96  MJF
03-20-96  MJF
04-09-99  MJF
01-09-99  MJF
02-10-13  MJF

	Determination of mR from the spectra at a specific distance 
	from an x-ray source. 

example:

	mR

	note: The <<EOF construction is not needed for this routine
	      since there is no standard input.
	      mR followed by a carriage return can be used
	      if the command is not in a script.

standard output:
	
	The following line is returned:

	Exposure = ??? mR/mAs at ___ cm

	where ??? is the computed mR exposure at the indicated distance

	Multiply the result by 8.76 for uG/mas (SI, microgray/mas)

associated files:

	read: spectra.tmp

	write: none

method:
	The method used is based on the approach described in the textbook by
	Johns and Cunningham (Pg. 301, 3rd Edition).
	Values of the air energy absorption coefficient published by NIST 
	in 1993 and based on the reference by Hubbel (see _database/air.doc)
	were interpolated from log(coef) versus log(E) tables and used to 
	compute the ergs absorbed in air by the spectra read in spectra.tmp.
	Spectral units are converted from #/cm^2 to ergs/cm^2 if necessary
	(i.e. multiply by e_i * 1.60219E-09) and then 
	the exposure computed as:

	  mR = 1000/87.643 SUM_over_i{ (ergs/cm^2/kev)_i * (Mu/rho)_i * dkeV }

	where (Mu/rho)_i is the energy dependent air energy absorption
	coefficient in cm^2/gm at the i'th energy of the discrete spectra, e_i,
	and (ergs/cm^2/kev)_i is the discrete energy fluence spectra.
	The factor 1000/87.643 accounts for the conversion of energy 
	deposited to milliRoentgens (ionization) as noted below.

	Input spectra must be in /cm^2 units or an error will be
	returned. Spectra can be in either photons/ or ergs/ units
	and the program will do the necessary conversion.

	Note1: Conversion units
		1 Roentgen = 2.58E-04 Coulombs/kg (SI unit).
		33.97 Joules/Coulomb ( or eV/ion pair) for air ionization.
			(see _database/airW.doc)
		1 keV = 1.60219E-09 ergs
		1 erg = 1E-07 joules
	Note2: Method from John & Cunningham
		The method described in Johns & Cunningham uses the
		factor 86.9 (ergs/gm)/Roentgen.
		From the above more recent conversion units,
		this factor becomes 87.643 (ergs/gm)/Roentgen.
			2.58E-07        * 33.97          * 1E+07
			(Coulombs/kg)/R * Joules/Coulomb * ergs/joule
