optics
Class ConstantSpectrum

java.lang.Object
  extended by optics.Optics
      extended by optics.WaveLengthFunction
          extended by optics.WaveLengthSpectrum
              extended by optics.ConstantSpectrum
Direct Known Subclasses:
GaussianSpectrum

public class ConstantSpectrum
extends WaveLengthSpectrum

Class to implement constant spectral response independent of wavelength.


Field Summary
protected  double brightness
          Brightness variable
 
Fields inherited from class optics.WaveLengthFunction
maxPlotLambda, minPlotLambda, plotPoints
 
Fields inherited from class optics.Optics
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS, version
 
Constructor Summary
ConstantSpectrum()
          Form a default ConstantSpectrum with brightness of unity.
ConstantSpectrum(double b)
          Form a ConstantSpectrum with specified brightness.
ConstantSpectrum(WaveLengthSpectrum s)
          Constructor with parameters set by WaveLebgthSpectrum.
 
Method Summary
 ConstantSpectrum clone()
          Method to clone the current ConstantSpectrum
 double getIntensity(double lambda)
          Public method to get the intensity.
 void setBrightness(double b)
          Public method to set the intensity
 String toString()
          Public toString to report useful information.
 
Methods inherited from class optics.WaveLengthSpectrum
getValue
 
Methods inherited from class optics.WaveLengthFunction
getPlot, getPlotPoints, setPlot, setPlotPoints, setPlotRange, setPlotRange, toGraph, toPlot, toPlot, toPlot
 
Methods inherited from class optics.Optics
getDefaultWaveLength, getErrorStream, getFormatString, getName, getStaticName, getVersion, printError, setDefaultWaveLength, setErrorStream, setFormatString, setMicrons
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

brightness

protected double brightness
Brightness variable

Constructor Detail

ConstantSpectrum

public ConstantSpectrum()
Form a default ConstantSpectrum with brightness of unity.


ConstantSpectrum

public ConstantSpectrum(double b)
Form a ConstantSpectrum with specified brightness.

Parameters:
b - the brigthness

ConstantSpectrum

public ConstantSpectrum(WaveLengthSpectrum s)
Constructor with parameters set by WaveLebgthSpectrum. The brighntess is set by the value of the specifed spectrum at Constants.GREEN.

Parameters:
s - specifying spectrum.
Method Detail

clone

public ConstantSpectrum clone()
Method to clone the current ConstantSpectrum

Overrides:
clone in class Object
Returns:
ConstantSpectrum clone of current.

setBrightness

public void setBrightness(double b)
Public method to set the intensity

Parameters:
b - the brightness

getIntensity

public double getIntensity(double lambda)
Public method to get the intensity.

Specified by:
getIntensity in class WaveLengthSpectrum
Parameters:
lambda - the wavelength (is ignored)
Returns:
double the intensity

toString

public String toString()
Public toString to report useful information.

Overrides:
toString in class Object
Returns:
String information String.