stella.adapter
Class RectangularMatcher

java.lang.Object
  extended by stella.adapter.RectangularMatcher

public class RectangularMatcher
extends Object


Nested Class Summary
static class RectangularMatcher.FileMatch
          Test class to read image and catalog data from a file and try to match.
static class RectangularMatcher.Thorough
          More ambitious test.
 
Field Summary
private  List catalog
          Pixel coordinates as deduced from the catalog.
private  Point2D[][] catalogdist
          Distance of star at first index to star on second, catalog space.
private static double CATALOGRANGE
          The magnitude range in the catalog.
private  double delta
          The expected uncertainity of the catalog positions in pixels.
private  double deltamag
          The expected uncertainty in catalog to image magnitudes.
private  List[] freq
          For each star in the image the indices of the catalog matches.
private  List image
          Pixel coordinates of the stars on the image.
private  Point2D[][] imagedist
          Distance of star at first index to star on second, image space.
private  List[] match
          For each star in the image the indices of the catalog matches.
 
Constructor Summary
RectangularMatcher(List im, List cat)
          Constructs a new rectangluar matcher and calculates all distances.
 
Method Summary
private static Point2D[][] calcDistances(List pix)
          Calculates all distances between pixels.
 Point2D findMatches()
          Assumption: all the stars can be seen in the image can also be found in the catalog.
 void setDelta(double _deltaPix)
          Sets the expected uncertainty of the catalog plus image positions in pixels.
 void setDeltaMag(double dm)
          Sets the expected uncertainty of the catalog to image magnitudes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

image

private List image
Pixel coordinates of the stars on the image.


catalog

private List catalog
Pixel coordinates as deduced from the catalog.


imagedist

private Point2D[][] imagedist
Distance of star at first index to star on second, image space.


catalogdist

private Point2D[][] catalogdist
Distance of star at first index to star on second, catalog space.


delta

private double delta
The expected uncertainity of the catalog positions in pixels.


deltamag

private double deltamag
The expected uncertainty in catalog to image magnitudes.


match

private List[] match
For each star in the image the indices of the catalog matches.


freq

private List[] freq
For each star in the image the indices of the catalog matches.


CATALOGRANGE

private static final double CATALOGRANGE
The magnitude range in the catalog.

See Also:
Constant Field Values
Constructor Detail

RectangularMatcher

public RectangularMatcher(List im,
                          List cat)
Constructs a new rectangluar matcher and calculates all distances. Prior to matching, the uncertainty should be set.

Parameters:
im - The pixel x/y from the image, as Guiding.RawStar list.
cat - The pixel x/y list from the catalog.
Method Detail

calcDistances

private static final Point2D[][] calcDistances(List pix)
Calculates all distances between pixels.


setDelta

public void setDelta(double _deltaPix)
Sets the expected uncertainty of the catalog plus image positions in pixels. This uncertainty defines a match, see findMatches().


setDeltaMag

public void setDeltaMag(double dm)
Sets the expected uncertainty of the catalog to image magnitudes. Used to deal with multiple shifts.


findMatches

public Point2D findMatches()
Assumption: all the stars can be seen in the image can also be found in the catalog.