optics
Class RefractiveIndex

java.lang.Object
  extended by optics.Optics
      extended by optics.WaveLengthFunction
          extended by optics.RefractiveIndex
Direct Known Subclasses:
AirIndex, CauchyIndex, FixedIndex, HoyaIndex, OharaIndex, SchottIndex, SellmeirIndex

public abstract class RefractiveIndex
extends WaveLengthFunction

Abstract class for refractive index being a scalar. This also contains static classes to specify a Refractive Index by a String/Tokens.


Field Summary
static RefractiveIndex air
          Static RefractiveIndex to represent air, being an AirIndex with a default index of Constants.AIR.
protected  double currentIndex
          Current numerical value of the index, used to prevent multiple calcualations of complex index calcualtions.
protected  double currentWaveLength
          The current value of the wavelength, used to prevent multiple calcualations of complex index calcualtions.
 
Fields inherited from class optics.WaveLengthFunction
maxPlotLambda, minPlotLambda, plotPoints
 
Fields inherited from class optics.Optics
DEFAULT_WAVELENGTH, errorStream, fmt, MICRONS, version
 
Constructor Summary
RefractiveIndex()
           
 
Method Summary
static RefractiveIndex fromString(String s)
          Static method to get a Refractive Index from a specifying String.
static RefractiveIndex fromTokens(StringTokenizer tokens)
          Static method to get a Refractive Index set of Tokens.
 double getIndex()
          Method to return the refarctive index at the current DEFAULT_WAVELENGTH.
abstract  double getIndex(double lambda)
          Method to return the value of the refractive index.
 double getIndex(Ray r)
          Method to return value of the refrective index with wavelength specifed by a Ray, or one it extending classes.
 double getnd()
          Method to get the index at the Helium-d line.
 double getne()
          Metho to ge tthe index at the Mercury e-line
 double getValue(double lambda)
          Overload of method for WavelengthFunction
 double getVd()
          Method to get the index at the Abbe, or Vd number.
 double getVe()
          Method to get the index at the Mercury e-line Abbe, or Ve number.
static void main(String[] args)
          Test method to read a Refractive Index from a String and plot as a degault graph.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

air

public static RefractiveIndex air
Static RefractiveIndex to represent air, being an AirIndex with a default index of Constants.AIR.

See Also:
AirIndex

currentIndex

protected double currentIndex
Current numerical value of the index, used to prevent multiple calcualations of complex index calcualtions.


currentWaveLength

protected double currentWaveLength
The current value of the wavelength, used to prevent multiple calcualations of complex index calcualtions.

Constructor Detail

RefractiveIndex

public RefractiveIndex()
Method Detail

getIndex

public abstract double getIndex(double lambda)
Method to return the value of the refractive index.

Parameters:
lambda - the wavelength.
Returns:
double the refractive index value.

getIndex

public double getIndex()
Method to return the refarctive index at the current DEFAULT_WAVELENGTH.

Returns:
double the refractive index value.

getIndex

public double getIndex(Ray r)
Method to return value of the refrective index with wavelength specifed by a Ray, or one it extending classes.

Parameters:
r - the ray.

getValue

public double getValue(double lambda)
Overload of method for WavelengthFunction

Specified by:
getValue in class WaveLengthFunction
Parameters:
lambda - the wavelength.
Returns:
double the refractive index value.

getnd

public double getnd()
Method to get the index at the Helium-d line.

Returns:
double index at He-d line

getne

public double getne()
Metho to ge tthe index at the Mercury e-line

Returns:
double index at Hg e line

getVd

public double getVd()
Method to get the index at the Abbe, or Vd number. it will be zero if the matial is no dispersive.

Returns:
double the Vd number

getVe

public double getVe()
Method to get the index at the Mercury e-line Abbe, or Ve number. it will be zero if the matial is no dispersive.

Returns:
double the Vd number

fromString

public static RefractiveIndex fromString(String s)
Static method to get a Refractive Index from a specifying String.

Parameters:
s - specifying String
Returns:
RefractiveIndex fails to Air

fromTokens

public static RefractiveIndex fromTokens(StringTokenizer tokens)
Static method to get a Refractive Index set of Tokens. The number of tokens expected (and read) depends on the index type requested.

Parameters:
tokens - set of tokens
Returns:
RefractiveIndex fails to Air

main

public static void main(String[] args)
Test method to read a Refractive Index from a String and plot as a degault graph.