gov.nist.microanalysis.EPQLibrary
Class EDSDetector

java.lang.Object
  extended by gov.nist.microanalysis.EPQLibrary.BaseSpectrum
      extended by gov.nist.microanalysis.EPQLibrary.EditableSpectrum
          extended by gov.nist.microanalysis.EPQLibrary.EDSDetector
All Implemented Interfaces:
ISpectrumData, java.awt.event.ActionListener, java.lang.Comparable, java.util.EventListener

public class EDSDetector
extends EditableSpectrum
implements java.awt.event.ActionListener

Models the behavior of an EDS detector. X-ray events are input and as output comes a typical EDS spectrum sullied by (some of) the imperfections associated with the technology.

Copyright: Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain

Company: National Institute of Standards and Technology

Version:
1.0
Author:
Nicholas W. M. Ritchie

Field Summary
 
Fields inherited from class gov.nist.microanalysis.EPQLibrary.BaseSpectrum
mHashCode, NULL_HASH, NullSpectrum
 
Constructor Summary
EDSDetector(int nChannels, double chWidth, double fwhmAtMnKA)
          EDSDetector - Construct a new EDSDetector object to represent an energy dispersive x-ray detector.
EDSDetector(int nChannels, double chWidth, double fwhmAtMnKA, double goldLayer, double deadLayer, double thickness, double solidAngle)
          EDSDetector - Construct a new EDSDetector object to represent an energy dispersive x-ray detector.
EDSDetector(ISpectrumData spec, double fwhmAtMnKA)
          EDSDetector - Construct a new EDSDetector object to represent an energy dispersive x-ray detector.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed - Implements actionPerformed for the ActionListener abstract class.
 void addEvent(double energy, double intensity)
          addEvent - Add x-ray events of the specified energy and intensity.
 void addEvent(int channel, double intensity)
          addEvent - Add x-ray events of the specified energy and intensity.
 void clear()
          clear - Clear the spectral data.
 double FWHM(double e)
           
 double getCounts(int n)
          getCounts - See ISpectrumData
 double getGain(double g)
          getGain - Returns the current gain (default =1.0)
 void setGain(double g)
          setGain - Sets a constant which is multiplied by the intensity in addEvent.
 void setWindow(IXRayWindowProperties window)
          setWindow - Specify the window to use in front of the detector.
 
Methods inherited from class gov.nist.microanalysis.EPQLibrary.EditableSpectrum
clearChannels, getChannelCount, getChannelWidth, getCounts, getProperties, getZeroOffset, setCounts, setProperties
 
Methods inherited from class gov.nist.microanalysis.EPQLibrary.BaseSpectrum
compareTo, equals, hashCode, initializeSpectrumIndex, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EDSDetector

public EDSDetector(ISpectrumData spec,
                   double fwhmAtMnKA)
            throws EPQException
EDSDetector - Construct a new EDSDetector object to represent an energy dispersive x-ray detector. The goldLayer=7.0e-9, deadLayer=1.0e-8, thickness=3.0e-3, solidAngle=50.0/1.25e5.

Parameters:
spec - ISpectrumData - The base x-ray events which to process
fwhmAtMnKA - double - The FWHM performance of the detector measured at Mn K-alpha (K-LIII) (eV)
Throws:
EPQException

EDSDetector

public EDSDetector(int nChannels,
                   double chWidth,
                   double fwhmAtMnKA)
            throws EPQException
EDSDetector - Construct a new EDSDetector object to represent an energy dispersive x-ray detector. The goldLayer=7.0e-9, deadLayer=1.0e-8, thickness=3.0e-3, solidAngle=50.0/1.25e5.

Parameters:
nChannels - int - The number of bins
chWidth - double - The width of each bin
fwhmAtMnKA - double - The FWHM performance of the detector measured at Mn K-alpha (K-LIII) (eV)
Throws:
EPQException

EDSDetector

public EDSDetector(int nChannels,
                   double chWidth,
                   double fwhmAtMnKA,
                   double goldLayer,
                   double deadLayer,
                   double thickness,
                   double solidAngle)
EDSDetector - Construct a new EDSDetector object to represent an energy dispersive x-ray detector.

Parameters:
nChannels - int - The number of bins
chWidth - double - The width of each bin
fwhmAtMnKA - double - The FWHM performance of the detector measured at Mn K-alpha (K-LIII) (eV)
goldLayer - double - The thickness of the conductive gold layer on the surface of the detector
deadLayer - double - The thickness of the dead layer on the surface of the detector
thickness - double - The thickness of the detector diode
solidAngle - double - The solid angle subtended by the detector (stetradians)
Method Detail

clear

public void clear()
clear - Clear the spectral data.


setWindow

public void setWindow(IXRayWindowProperties window)
setWindow - Specify the window to use in front of the detector.

Parameters:
window - XRayWindow

addEvent

public void addEvent(double energy,
                     double intensity)
addEvent - Add x-ray events of the specified energy and intensity.

Parameters:
energy - double - The energy of the x-ray (in Joules)
intensity - double - The (possibly-fractional) number of x-rays

addEvent

public void addEvent(int channel,
                     double intensity)
addEvent - Add x-ray events of the specified energy and intensity.

Parameters:
channel - int - The channel into which to place the x-ray
intensity - double - The (possibly-fractional) number of x-rays

FWHM

public double FWHM(double e)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed - Implements actionPerformed for the ActionListener abstract class. This implementation looks to see if the ActionEvent.getSource() implements XRaySource then uses this interface to populate the spectrum.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - ActionEvent

setGain

public void setGain(double g)
setGain - Sets a constant which is multiplied by the intensity in addEvent.

Parameters:
g - double

getGain

public double getGain(double g)
getGain - Returns the current gain (default =1.0)

Parameters:
g - double
Returns:
double

getCounts

public double getCounts(int n)
Description copied from class: EditableSpectrum
getCounts - See ISpectrumData

Specified by:
getCounts in interface ISpectrumData
Overrides:
getCounts in class EditableSpectrum
Parameters:
n - int
Returns:
double