net.aerith.misao.pixy.pairing
Class ProgressivePairMaker

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

public class ProgressivePairMaker
extends Operation

The ProgressivePairMaker is a class to make pairs among two lists of stars progressively. First, it makes pairs roughly only based on the brightness. Then it makes pairs based on the similarity calculated using both the brightness and the position. Finally, it makes pairs precisly based on the position.

The (x,y) position and magnitude of stars in the both lists must be set properly. The (x,y) position in the first list and the magnitude in the second list are regarded as the base value. The (x,y) position in the second list and the magnitude in the first list will be changed after the operation.

After the operation, the two lists will be sorted.

The elements in the first list must be StarImage objects.


Field Summary
protected  boolean assume_flat
          True when not to calculate the distortion field.
protected  PositionMap catalog_map
          The position map of the catalog.
protected  ChartMapFunction cmf
          The chart composition of catalog stars.
protected  StarImageList first_list
          The first list of stars.
protected  boolean fix_limiting_mag
          True when not to calculate the limiting magnitude automatically.
protected  double fixed_limit_mag
          The fixed limiting magnitude.
protected  PositionMap image_map
          The position map of the image.
protected  java.util.Vector pair_list
          The list of pairs.
private static int PAIR_MAKER_BRIGHTNESS_BASED
          The type of a pair maker which represents the BrightnessBasedPairMaker.
private static int PAIR_MAKER_DEFAULT
          The type of a pair maker which represents the DefaultPairMaker.
private static int PAIR_MAKER_FINAL
          The type of a pair maker which means the pairing step is final.
private static int PAIR_MAKER_POSITION_BASED
          The type of a pair maker which represents the PositionBasedPairMaker.
private static int PAIR_MAKER_SIMILARITY_BASED
          The type of a pair maker which represents the SimilarityBasedPairMaker.
protected  StarList second_list
          The second list of stars.
 
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
ProgressivePairMaker(StarImageList first_list, StarList second_list, ChartMapFunction cmf, PositionMap image_map, PositionMap catalog_map)
          Constructs a ProgressivePairMaker with two lists of stars.
 
Method Summary
 void assumeFlat()
          Sets the flag not to calculate the ditortion field.
 void fixLimitingMagnitude(double limit_mag)
          Fixes the limiting magnitude.
 ChartMapFunction getChartMapFunction()
          Gets the refined chart map function.
 java.util.Vector getPairList()
          Gets the list of pairs.
 void operate()
          Operates.
 boolean ready()
          Returns true if the operation is ready to start.
 
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 StarImageList first_list
The first list of stars.

second_list

protected StarList second_list
The second list of stars.

image_map

protected PositionMap image_map
The position map of the image.

catalog_map

protected PositionMap catalog_map
The position map of the catalog.

cmf

protected ChartMapFunction cmf
The chart composition of catalog stars.

pair_list

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

assume_flat

protected boolean assume_flat
True when not to calculate the distortion field.

fix_limiting_mag

protected boolean fix_limiting_mag
True when not to calculate the limiting magnitude automatically.

fixed_limit_mag

protected double fixed_limit_mag
The fixed limiting magnitude.

PAIR_MAKER_DEFAULT

private static final int PAIR_MAKER_DEFAULT
The type of a pair maker which represents the DefaultPairMaker.

PAIR_MAKER_BRIGHTNESS_BASED

private static final int PAIR_MAKER_BRIGHTNESS_BASED
The type of a pair maker which represents the BrightnessBasedPairMaker.

PAIR_MAKER_SIMILARITY_BASED

private static final int PAIR_MAKER_SIMILARITY_BASED
The type of a pair maker which represents the SimilarityBasedPairMaker.

PAIR_MAKER_POSITION_BASED

private static final int PAIR_MAKER_POSITION_BASED
The type of a pair maker which represents the PositionBasedPairMaker.

PAIR_MAKER_FINAL

private static final int PAIR_MAKER_FINAL
The type of a pair maker which means the pairing step is final.
Constructor Detail

ProgressivePairMaker

public ProgressivePairMaker(StarImageList first_list,
                            StarList second_list,
                            ChartMapFunction cmf,
                            PositionMap image_map,
                            PositionMap catalog_map)
Constructs a ProgressivePairMaker 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.
image_map - the position map of the image.
catalog_map - the position map of the catalog.
Method Detail

assumeFlat

public void assumeFlat()
Sets the flag not to calculate the ditortion field.

fixLimitingMagnitude

public void fixLimitingMagnitude(double limit_mag)
Fixes the limiting magnitude.
Parameters:
limit_mag - the limiting magnitude to fix.

getChartMapFunction

public ChartMapFunction getChartMapFunction()
Gets the refined chart map function. This method must be invoked after operate method is invoked.
Returns:
the refined chart map function.

getPairList

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

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.