mu_eff vers3.3
10-06-97 MJF
03-31-99 MJF

	Evaluation of the effective attenuation coefficient for
	a material based on the x-ray spectrum recorded by
	a specified detector.	

example:

	mu_eff << EOF
	mat_file 
	det_file 
	labelflag
	EOF

standard output:

        The following is returned:

		 # Effective attenuation coefficient, cm-1 
		 #    Material: bone2.2  
		 #    Detector: ideal                                   
		 #    Spect_gen: 42  16.000  1   30.00
		 #    Attenuation History:
		 #        0
		 # CM-1 =
  		 116.4333    

	Within the comment lines the material and detector are identified
        along with the key parameters defining the spectrum including
        the attenuation history.

directories/links:
        _materials: path to directory of material files
        _database: path to database directory

arguments:

	mat_file:	file name for a specific material descriptor
	det_file:	file name for a specific detector 
	labelflag:      0 to suppress comment lines, 1 otherwise

	Note, unlike the attenuation routines this does not require
	a thickness to be entered for the material.

associated files:

	read:  spectra.tmp (see spect.tmp.doc for format)

	Note: the user must be sure to set up the desired spectra
 	      in spectra.tmp before calling mu_eff. In general this
	      will involve application of appropriate filtration for
	      the conditions under which mu_eff is relevant.

method:	
	The effective attenuation coefficient is defined as that
	coefficient which correctly predicts the reduction of
	the response of a detector when recording the x-ray
	beam transmitted through an object when an additional
	"thin" amount of material is added.  The detector
	response with and without the "thin" material of thickness
	dx is;

		S_o  = INTEGRAL{E * PHI(E) * Ds(E) *dE}                    (1)

		S_dx = INTEGRAL{E * PHI(E) * Ds(E) * EXP(-dx*mu(E)) * dE}  (2)

	where PHI(E) is the x-ray beam flux, Ds(E) is the signal detection
	efficiency of the detector, mu(E) is the linear attenuation
        coefficient of the material and E is the x-ray energy.

	For small values of dx*mu(E), the value of S_dx
	can be approximated as;

		S_dx ~= INTEGRAL{E * PHI(E) * Ds(E) * (1-dx*mu(E)) * dE}   (3)

 		     ~= S_o - dx*INTEGRAL{E * PHI(E) * Ds(E) * mu(E) * dE} (4)

	The effective attenuation coefficient is obtained by defining
	the relative reduction in signal as an exponential function
	in the form of Beer's law;

		S_dx/S_o = exp(-mu_eff * dx)                               (5)

		     ~= 1 - dx*mu_eff                                      (6)

	If we devide equation 4 by S_o and compare it to equation 6,
	it is clear that mu_eff is defined as the average of the
	material attenuation coefficient, mu(E), weighted by the
	energy, the x-ray spectrum, and the detector response;

			  INTEGRAL{E * PHI(E) * Ds(E) * mu(E) * dE}
		mu_eff =  -----------------------------------------         (7)
			       INTEGRAL{E * PHI(E) * Ds(E) *dE}

	For this program, this integration is evaluated for the current
	content of spectra.tmp. The values for mu(E) are obtained 
	as is described for the attenuation routines, atten and atten_coeff.  
	The detector efficiencies used are the same as those described 
	in the detect routine.
