stella.adapter
Class GuiderStar

java.lang.Object
  extended by stella.adapter.GuiderStar
All Implemented Interfaces:
Serializable, Comparable<Guiding.RawStar>, Guiding.RawStar

public class GuiderStar
extends Object
implements Guiding.RawStar, Comparable<Guiding.RawStar>, Serializable

A simple implementation for Guiding.RawStar, needed for catalog entries or guider-ccd readouts. The methods getElongation(), getAngle(), getArea(), getFullWidthHalfMaximum() getSharpness(), and getSky() are only needed for ccd-image stars and return dummy entries for catalog entries.
Note: this class has a natural ordering that is inconsistent with equals.

See Also:
Serialized Form

Nested Class Summary
static class GuiderStar.Magnitude
          Note: This comparator imposes orderings that are inconsistent with equals.
 
Field Summary
private  double angle
          The angle of the elongated image.
private  double area
          The area of the star in a ccd image.
private  Point2D center
          Center of star on ccd pixel coordinates.
private  double elongation
          The elongation of the star in a ccd image.
private static String[] FIELDS
          Names of field to be set on string consrtuct.
private  double fwhm
          The fwhm of a star in a ccd image.
private  double inst
          Estimated instrumental magnitude.
private  double sharp
          The sharpness of the star in a ccd image.
private  double sky
          The sky of the star in a ccd image.
private  double strip
          An estimate for read-out stripes.
 
Constructor Summary
GuiderStar(Point2D xy, double mag)
          Constructs a new ccd star specifying parameters known for catalog stars.
GuiderStar(Point2D xy, double mag, double sharpness, double elong, double theta, double size, double skypix, double ff, double stripness)
          Constructs a new ccd star from an image, giving all parameters.
GuiderStar(String raw)
          Constructs a guider star from a string, e.g.
 
Method Summary
 int compareTo(Guiding.RawStar that)
          Compares two raw stars.
 boolean equals(Object other)
          Returns true if coordinates and magnitude are the same.
 double getAngle()
          Returns zero.
 double getArea()
          Returns the area, zero for catalog entries.
 Point2D getCenter()
          Returns the central pixel coordinates with double precission.
 double getElongation()
          Returns one for perfect roundness.
 double getFullWidthHalfMaximum()
          Returns the full width half maximum, zero for catalog entries.
 double getInstrumentalMagnitude()
          Returns the estimated instrumental magnitude.
 double getSharpness()
          Returns 1.
 double getSky()
          Returns 2^15.
 double getStroke()
          Returns an estimate of the likelyhood of this raw star to be a readout strip.
private  void readObject(ObjectInputStream stream)
          Deprecated. Since Java 6, Point2D.Double is serializable
 String toFullString()
          Prints the coordinates and the magnitude, separated by spaces.
 String toString()
          Prints the coordinates and the magnitude, separated by spaces.
private  void writeObject(ObjectOutputStream stream)
          Deprecated. Since Java 6, Point2D.Double is serializable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FIELDS

private static final String[] FIELDS
Names of field to be set on string consrtuct.


center

private transient Point2D center
Center of star on ccd pixel coordinates.


inst

private double inst
Estimated instrumental magnitude.


elongation

private double elongation
The elongation of the star in a ccd image.


angle

private double angle
The angle of the elongated image.


sharp

private double sharp
The sharpness of the star in a ccd image.


area

private double area
The area of the star in a ccd image. Minus for unknown


sky

private double sky
The sky of the star in a ccd image.


fwhm

private double fwhm
The fwhm of a star in a ccd image.


strip

private double strip
An estimate for read-out stripes. Column-stripes have low values.

Constructor Detail

GuiderStar

public GuiderStar(Point2D xy,
                  double mag)
Constructs a new ccd star specifying parameters known for catalog stars.


GuiderStar

public GuiderStar(Point2D xy,
                  double mag,
                  double sharpness,
                  double elong,
                  double theta,
                  double size,
                  double skypix,
                  double ff,
                  double stripness)
Constructs a new ccd star from an image, giving all parameters.


GuiderStar

public GuiderStar(String raw)
Constructs a guider star from a string, e.g. after printing. Must have at least x y mag. The remaining string is decomposed into tokens, these are parsed into doubles and assigned to the star's field according to the array in FIELDS.

Method Detail

getCenter

public Point2D getCenter()
Returns the central pixel coordinates with double precission.

Specified by:
getCenter in interface Guiding.RawStar

getElongation

public double getElongation()
Returns one for perfect roundness. Might be changed in future to match the expected elongation due to optical putty in beam splitter.

Specified by:
getElongation in interface Guiding.RawStar

getAngle

public double getAngle()
Returns zero. Might be changed in future to match the expected elongation due to optical putty in beam splitter.

Specified by:
getAngle in interface Guiding.RawStar
Returns:
The position angle of the major axis of the star ellipsoid.

getSharpness

public double getSharpness()
Returns 1. Might be changed in future to match the expected sharpness.

Specified by:
getSharpness in interface Guiding.RawStar

getSky

public double getSky()
Returns 2^15.

Specified by:
getSky in interface Guiding.RawStar

getArea

public double getArea()
Returns the area, zero for catalog entries.

Specified by:
getArea in interface Guiding.RawStar

getStroke

public double getStroke()
Returns an estimate of the likelyhood of this raw star to be a readout strip. Column strips, as we have in our guider, have a low value here.

Specified by:
getStroke in interface Guiding.RawStar

getFullWidthHalfMaximum

public double getFullWidthHalfMaximum()
Returns the full width half maximum, zero for catalog entries.

Specified by:
getFullWidthHalfMaximum in interface Guiding.RawStar

getInstrumentalMagnitude

public double getInstrumentalMagnitude()
Returns the estimated instrumental magnitude.

Specified by:
getInstrumentalMagnitude in interface Guiding.RawStar

toString

public String toString()
Prints the coordinates and the magnitude, separated by spaces.

Overrides:
toString in class Object

toFullString

public String toFullString()
Prints the coordinates and the magnitude, separated by spaces.


equals

public boolean equals(Object other)
Returns true if coordinates and magnitude are the same.

Overrides:
equals in class Object

compareTo

public int compareTo(Guiding.RawStar that)
Compares two raw stars. Orders according to the instrumental magnitude.

Specified by:
compareTo in interface Comparable<Guiding.RawStar>

writeObject

private void writeObject(ObjectOutputStream stream)
                  throws IOException
Deprecated. Since Java 6, Point2D.Double is serializable

We customize object serialization. We serialize out the central position, as Point2D is strangely not serializable.

Throws:
IOException

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
Deprecated. Since Java 6, Point2D.Double is serializable

On deserialization, first read the hidden object definitions, then the prosition of the center.

Throws:
IOException
ClassNotFoundException