gov.nist.microanalysis.NISTMonte
Class PhiRhoStats

java.lang.Object
  extended by gov.nist.microanalysis.NISTMonte.PhiRhoStats
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class PhiRhoStats
extends java.lang.Object
implements java.awt.event.ActionListener

Creates an accumulator for the x-ray generation and transmission statistics for a single x-ray transition.

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

Constructor Summary
PhiRhoStats(int nX, int nY, int nZ, XRayTransition xrt)
          MCSS_PhiRhoStats - Create a phi-rho-* accumulator with the specified number of bins for the specified transition.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
           
 void dump(java.io.PrintWriter pw)
           
static void dumpToFiles(PhiRhoStats[] prs, java.lang.String dest)
          dumpToFiles - A helper to dump a list of phi-rho-* stats to disk files.
 AtomicShell getAtomicShell()
           
 double[] getGeneratedPhiRho(int axis)
          getGeneratedPhiRho - Get the accumulated phi-rho-x, phi-rho-y or phi-rho-z curves.
 int getMemoryRequirements()
          getMemoryRequirements - A rough estimate of the memory requirements for this object.
 double getRangeMax(int axis)
          getRangeMax
 double getRangeMin(int axis)
          getRangeMin
 XRayTransition getTransition()
          getTransition - Get the XRayTransition object associated with these statistics.
 double[] getTransmittedPhiRho(int axis)
          getTransmittedPhiRho - Get the accumulated phi-rho-x, phi-rho-y or phi-rho-z curves.
 void setRange(int axis, double min, double max)
          setRange - One of MonteCarloSS.XAxis, MonteCarloSS.YAxis or MonteCarloSS.ZAxis
 void setShape(MonteCarloSS.Shape shape)
          setShape - To constrain the statistics to within a certain volume, specify a MonteCarloSS.Shape interface defining the volume.
static PhiRhoStats[] watchDefaultTransitions(XRayEventListener xrel, double zMin, double zMax)
          watchAllTransitions - A helper to attach phi-rho-z listeners to an MCSS_XRayEventListener object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhiRhoStats

public PhiRhoStats(int nX,
                   int nY,
                   int nZ,
                   XRayTransition xrt)
MCSS_PhiRhoStats - Create a phi-rho-* accumulator with the specified number of bins for the specified transition.

Parameters:
nX - int
nY - int
nZ - int
xrt - XRayTransition
Method Detail

watchDefaultTransitions

public static PhiRhoStats[] watchDefaultTransitions(XRayEventListener xrel,
                                                    double zMin,
                                                    double zMax)
watchAllTransitions - A helper to attach phi-rho-z listeners to an MCSS_XRayEventListener object.

Parameters:
xrel - MCSS_XRayEventListener
zMin - double
zMax - double
Returns:
MCSS_PhiRhoStats[]

dumpToFiles

public static void dumpToFiles(PhiRhoStats[] prs,
                               java.lang.String dest)
                        throws java.io.FileNotFoundException,
                               java.io.IOException
dumpToFiles - A helper to dump a list of phi-rho-* stats to disk files.

Parameters:
prs - MCSS_PhiRhoStats[]
dest - String
Throws:
java.io.FileNotFoundException
java.io.IOException

getAtomicShell

public AtomicShell getAtomicShell()

setShape

public void setShape(MonteCarloSS.Shape shape)
setShape - To constrain the statistics to within a certain volume, specify a MonteCarloSS.Shape interface defining the volume. (null clears the constraint and collects statistics over the full volume)

Parameters:
shape - Shape

setRange

public void setRange(int axis,
                     double min,
                     double max)
setRange - One of MonteCarloSS.XAxis, MonteCarloSS.YAxis or MonteCarloSS.ZAxis

Parameters:
axis - int
min - double
max - double

getRangeMin

public double getRangeMin(int axis)
getRangeMin

Parameters:
axis - int - One of MonteCarloSS.XAxis, MonteCarloSS.YAxis or MonteCarloSS.ZAxis
Returns:
double

getRangeMax

public double getRangeMax(int axis)
getRangeMax

Parameters:
axis - int - One of MonteCarloSS.XAxis, MonteCarloSS.YAxis or MonteCarloSS.ZAxis
Returns:
double

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getGeneratedPhiRho

public double[] getGeneratedPhiRho(int axis)
getGeneratedPhiRho - Get the accumulated phi-rho-x, phi-rho-y or phi-rho-z curves.

Parameters:
axis - int - One of MonteCarloSS.XAxis, MonteCarloSS.YAxis or MonteCarloSS.ZAxis
Returns:
double[] - An array of bins as doubles.

getTransmittedPhiRho

public double[] getTransmittedPhiRho(int axis)
getTransmittedPhiRho - Get the accumulated phi-rho-x, phi-rho-y or phi-rho-z curves.

Parameters:
axis - int - One of MonteCarloSS.XAxis, MonteCarloSS.YAxis or MonteCarloSS.ZAxis
Returns:
double[] - An array of bins as doubles.

getMemoryRequirements

public int getMemoryRequirements()
getMemoryRequirements - A rough estimate of the memory requirements for this object.

Returns:
int - The memory requirements in bytes

getTransition

public XRayTransition getTransition()
getTransition - Get the XRayTransition object associated with these statistics.

Returns:
XRayTransition

dump

public void dump(java.io.PrintWriter pw)