optics.analysis
Class GeometricPsf

java.lang.Object
  extended by javax.vecmath.Tuple3d
      extended by javax.vecmath.Point3d
          extended by optics.Position
              extended by optics.analysis.Psf
                  extended by optics.analysis.GeometricPsf
All Implemented Interfaces:
Serializable, Cloneable, Diagram2DComponent

public class GeometricPsf
extends Psf

Class to form and calcualte the Geometric PSF as a best fitting ellipse in the x/y plane

See Also:
Serialized Form

Field Summary
 
Fields inherited from class optics.analysis.Psf
intensity, psfColour
 
Fields inherited from class javax.vecmath.Tuple3d
x, y, z
 
Constructor Summary
GeometricPsf()
          Form a default psf being at position (0,0,0) or radius and intensity also set to zero.
GeometricPsf(Position p, double i, double r)
          Form a circular geometric Psf with
GeometricPsf(Position p, double i, double a, double b, double alpha)
          Form a geometric Psf with all parameters speficied
GeometricPsf(RayPencil p, double plane)
          Form the Geometric PSF from where a RayPencil intersects a specifed plane.
GeometricPsf(RayPencil p, OpticalPlane plane)
          Form the Geometric PSF from where a RayPencil intersects a specifed OpticalPlane
 
Method Summary
 void draw(Graphics2D g)
          Method to draw the component in Graphics2D context.
 double getAngle()
          Method to get the angle of the ellipse wrt to the x axis.
 double getArea()
          Method to get the area of the PSF
 double getEccentricity()
          Method to get the eccentricity of the PSF
 double getRadius()
          Method to get average radius
 void set(Moments m, double plane)
          Method to set the Psf from moments (to second order) in a spefied plane.
 void set(RayPencil pencil, double plane)
          Method set the psf from a RayPencil in a specified plane.
 void set(RayPencil pencil, OpticalPlane plane)
          Method set the psf from a RayPencil in a specified OpticalPlane
 String toString()
          Method format the PSF as a String
 
Methods inherited from class optics.analysis.Psf
getBounds, getIntensity, setColour, setIntensity
 
Methods inherited from class optics.Position
add, clone, direction, fromString, fromTokens, getPoint2d, length, lengthSquared, main, max, min, propagate
 
Methods inherited from class javax.vecmath.Point3d
distance, distanceL1, distanceLinf, distanceSquared, project
 
Methods inherited from class javax.vecmath.Tuple3d
absolute, absolute, add, add, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, epsilonEquals, equals, equals, get, get, getX, getY, getZ, hashCode, interpolate, interpolate, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, scaleAdd, set, set, set, set, setX, setY, setZ, sub, sub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeometricPsf

public GeometricPsf(Position p,
                    double i,
                    double a,
                    double b,
                    double alpha)
Form a geometric Psf with all parameters speficied

Parameters:
p - position
i - the intensity
a - the major axis
b - the minor axis
alpha - the ellipse angle

GeometricPsf

public GeometricPsf(Position p,
                    double i,
                    double r)
Form a circular geometric Psf with

Parameters:
p - position
i - the intensity
r - radius

GeometricPsf

public GeometricPsf()
Form a default psf being at position (0,0,0) or radius and intensity also set to zero.


GeometricPsf

public GeometricPsf(RayPencil p,
                    double plane)
Form the Geometric PSF from where a RayPencil intersects a specifed plane.

Parameters:
p - the Raypencil
plane - the z-plane

GeometricPsf

public GeometricPsf(RayPencil p,
                    OpticalPlane plane)
Form the Geometric PSF from where a RayPencil intersects a specifed OpticalPlane

Parameters:
p - the Raypencil
plane - the OpticalPlane
Method Detail

set

public void set(RayPencil pencil,
                double plane)
Method set the psf from a RayPencil in a specified plane.

Parameters:
pencil - RayPencil containing the rays.
plane - plane where PSF is to be calculated

set

public void set(RayPencil pencil,
                OpticalPlane plane)
Method set the psf from a RayPencil in a specified OpticalPlane

Parameters:
pencil - RayPencil containing the rays.
plane - OpticalPlane withe the PSF is specfified.

set

public void set(Moments m,
                double plane)
Method to set the Psf from moments (to second order) in a spefied plane.

Parameters:
m - the Monenst to secton order.
plane - the z-location of the plane.

getEccentricity

public double getEccentricity()
Method to get the eccentricity of the PSF

Returns:
double the eccentricity of the ellipse

getAngle

public double getAngle()
Method to get the angle of the ellipse wrt to the x axis. For circular psf this may be arbitrary.

Returns:
double the angle of the ellipse

getArea

public double getArea()
Method to get the area of the PSF

Returns:
double the area of the ellipse.

getRadius

public double getRadius()
Method to get average radius

Returns:
double the radius

toString

public String toString()
Method format the PSF as a String

Overrides:
toString in class Tuple3d
Returns:
String formatted string.

draw

public void draw(Graphics2D g)
Method to draw the component in Graphics2D context.

Specified by:
draw in interface Diagram2DComponent
Specified by:
draw in class Psf
Parameters:
g - the Graphics2D context