net.aerith.misao.pixy.pairing
Class SupplementaryPairMaker

java.lang.Object
  |
  +--net.aerith.misao.util.OperationObservable
        |
        +--net.aerith.misao.util.Operation
              |
              +--net.aerith.misao.pixy.pairing.SupplementaryPairMaker

public class SupplementaryPairMaker
extends Operation

The SupplementaryPairMaker is a class to make pairs between the single (not paired) stars among two lists of stars. From the brightest star to the faintest star, a single star in the first list is getting paired with a single star in the second list. But if the second star has a closer candidate in the first list, it is paired with the closer one. Note that only bright stars, brighter than the specified threshold, are considered.

The search radius is determined based on the magnitude as:

      7 mag : 4'
9 mag : 2'
11 mag : 1'
13 mag : 30"
15 mag : 15"
The upper limit is 3'. The lower limit is 5 pixels.

The (x,y) position and magnitude of stars in the both lists must be set properly. The two lists are sorted in the constructor.


Field Summary
protected  ChartMapFunction cmf
          The chart composition of catalog stars.
protected  StarList first_list
          The first list of stars.
protected  double minimum_radius
          The minimum search radius.
protected  java.util.Vector pair_list
          The list of pairs.
protected  StarList second_list
          The second list of stars.
protected  double threshold
          The threshold.
 
Fields inherited from class net.aerith.misao.util.Operation
monitor_set, stopped
 
Fields inherited from class net.aerith.misao.util.OperationObservable
observer_list
 
Constructor Summary
SupplementaryPairMaker(StarList first_list, StarList second_list, ChartMapFunction cmf)
          Constructs a SupplementaryPairMaker with two lists of stars.
 
Method Summary
 java.util.Vector getPairList()
          Gets the list of pairs.
private  double getSearchRadius(double mag)
          Gets the search radius.
 void operate()
          Operates.
 boolean ready()
          Returns true if the operation is ready to start.
 void setMinimumSearchRadius(double radius)
          Sets the minimum search radius.
 void setThreshold(double threshold)
          Sets the threshold.
 
Methods inherited from class net.aerith.misao.util.Operation
addMonitor, isStopped, perform, run, stop
 
Methods inherited from class net.aerith.misao.util.OperationObservable
addObserver, deleteObserver, notifyEnd, notifyFailed, notifyStart, notifySucceeded, notifyWarned
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

first_list

protected StarList first_list
The first list of stars.

second_list

protected StarList second_list
The second list of stars.

cmf

protected ChartMapFunction cmf
The chart composition of catalog stars.

threshold

protected double threshold
The threshold.

minimum_radius

protected double minimum_radius
The minimum search radius.

pair_list

protected java.util.Vector pair_list
The list of pairs.
Constructor Detail

SupplementaryPairMaker

public SupplementaryPairMaker(StarList first_list,
                              StarList second_list,
                              ChartMapFunction cmf)
Constructs a SupplementaryPairMaker with two lists of stars.
Parameters:
first_list - the first list of stars.
second_list - the second list of stars.
cmf - the chart composition of catalog stars.
Method Detail

setThreshold

public void setThreshold(double threshold)
Sets the threshold.
Parameters:
threshold - the threshold.

setMinimumSearchRadius

public void setMinimumSearchRadius(double radius)
Sets the minimum search radius.
Parameters:
radius - the minimum search radius.

getPairList

public java.util.Vector getPairList()
Gets the list of pairs.
Returns:
the list of pairs.

getSearchRadius

private double getSearchRadius(double mag)
Gets the search radius.
Parameters:
mag - the magnitude.
Returns:
the search radius.

ready

public boolean ready()
Returns true if the operation is ready to start.
Overrides:
ready in class Operation
Returns:
true if the operation is ready to start.

operate

public void operate()
             throws java.lang.Exception
Operates.
Overrides:
operate in class Operation
Throws:
java.lang.Exception - if an error occurs.