net.aerith.misao.pixy.pairing
Class PairingOperator

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

public class PairingOperator
extends Operation

The PairingOperator is a class to operate pairing process. This invokes the ProgressivePairMaker#run and ExperiencedPairRefiner#run. Finally it creates the XML document.


Field Summary
protected  boolean assume_flat
          True when not to calculate the distortion field.
protected  AstrometricError astrometric_error
          The astrometric error.
protected  CatalogReader catalog_reader
          The catalog reader.
protected  ChartMapFunction cmf
          The chart map function.
protected  DistortionField df
          The distortion field.
protected  boolean fix_limiting_mag
          True when not to calculate the limiting magnitude automatically.
protected  boolean fix_mag_formula_gradient
          True when to fix the gradient of the magnitude translation formula as -1.
protected  double fixed_limit_mag
          The fixed limiting magnitude.
protected  double fixed_upper_limit_mag
          The fixed upper-limit magnitude.
protected  MonoImage image
          The image.
protected  XmlImage image_file
          The image file.
protected  double limit_mag
          The limiting_magnitude.
protected  StarList list_catalog
          The list of catalog stars.
protected  StarImageList list_detected
          The list of detected stars.
protected  MagnitudeTranslationFormula mag_formula
          The magnitude translation formula.
protected  java.util.Vector pair_list
          The list of pairs between the detected stars and the catalog data.
protected  java.awt.Container pane
          The content pane.
protected  PhotometricError photometric_error
          The photometric error.
protected  XmlReport report
          The XML document.
protected  boolean reversed_image
          True if the image is a reversed image.
protected  boolean sbig_image
          True if the image is an SBIG ST-4/6 image.
protected  double upper_limit_mag
          The upper-limit magnitude.
 
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
PairingOperator(MonoImage image, CatalogReader catalog_reader, ChartMapFunction cmf, StarImageList list_detected, XmlImage image_file, boolean sbig_image, boolean reversed_image)
          Constructs a PairingOperator.
 
Method Summary
 void assumeFlat()
          Sets the flag not to calculate the ditortion field.
private  void createXmlReportDocument()
          Creates the XML report document.
 void enableInteractive(java.awt.Container pane)
          Enables the interactive catalog reading.
 void fixLimitingMagnitude(double limit_mag, double upper_limit_mag)
          Fixes the limiting magnitude.
 void fixMagnitudeTranslationFormulaGradient()
          Sets the flag to fix the gradient of the magnitude translation formula as -1.
 StarList getCatalogList()
          Gets the list of catalog stars.
 StarImageList getDetectedList()
          Gets the list of detected stars.
 double getLimitingMag()
          Gets the limiting magnitude.
 MagnitudeTranslationFormula getMagnitudeTranslationFormula()
          Gets the magnitude translation formula.
 double getUpperLimitMag()
          Gets the upper-limit magnitude.
 XmlReport getXmlReportDocument()
          Gets the XML report document.
 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

pane

protected java.awt.Container pane
The content pane. In the case of null, the pairing process is operated without GUI components.

report

protected XmlReport report
The XML document.

image

protected MonoImage image
The image.

catalog_reader

protected CatalogReader catalog_reader
The catalog reader.

cmf

protected ChartMapFunction cmf
The chart map function.

list_detected

protected StarImageList list_detected
The list of detected stars.

list_catalog

protected StarList list_catalog
The list of catalog stars.

pair_list

protected java.util.Vector pair_list
The list of pairs between the detected stars and the catalog data.

df

protected DistortionField df
The distortion field.

mag_formula

protected MagnitudeTranslationFormula mag_formula
The magnitude translation formula.

limit_mag

protected double limit_mag
The limiting_magnitude.

upper_limit_mag

protected double upper_limit_mag
The upper-limit magnitude.

astrometric_error

protected AstrometricError astrometric_error
The astrometric error.

photometric_error

protected PhotometricError photometric_error
The photometric error.

image_file

protected XmlImage image_file
The image file.

sbig_image

protected boolean sbig_image
True if the image is an SBIG ST-4/6 image.

reversed_image

protected boolean reversed_image
True if the image is a reversed image.

fix_mag_formula_gradient

protected boolean fix_mag_formula_gradient
True when to fix the gradient of the magnitude translation formula as -1.

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.

fixed_upper_limit_mag

protected double fixed_upper_limit_mag
The fixed upper-limit magnitude.
Constructor Detail

PairingOperator

public PairingOperator(MonoImage image,
                       CatalogReader catalog_reader,
                       ChartMapFunction cmf,
                       StarImageList list_detected,
                       XmlImage image_file,
                       boolean sbig_image,
                       boolean reversed_image)
Constructs a PairingOperator.
Parameters:
image - the image.
catalog_reader - the catalog reader.
cmf - the chart map function.
list_detected - the list of detected stars.
image_file - the image file.
sbig_image - true if the image is an SBIG ST-4/6 image.
reversed_image - true if the image is a reversed image.
Method Detail

enableInteractive

public void enableInteractive(java.awt.Container pane)
Enables the interactive catalog reading.
Parameters:
pane - the pane.

fixMagnitudeTranslationFormulaGradient

public void fixMagnitudeTranslationFormulaGradient()
Sets the flag to fix the gradient of the magnitude translation formula as -1.

assumeFlat

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

fixLimitingMagnitude

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

getXmlReportDocument

public XmlReport getXmlReportDocument()
Gets the XML report document.
Returns:
the XML report document.

getMagnitudeTranslationFormula

public MagnitudeTranslationFormula getMagnitudeTranslationFormula()
Gets the magnitude translation formula.
Returns:
the magnitude translation formula.

getLimitingMag

public double getLimitingMag()
Gets the limiting magnitude.
Returns:
the limiting magnitude.

getUpperLimitMag

public double getUpperLimitMag()
Gets the upper-limit magnitude. This method must be invoked after operate method is invoked.
Returns:
the upper-limit magnitude.

getDetectedList

public StarImageList getDetectedList()
Gets the list of detected stars.
Returns:
the list of detected stars.

getCatalogList

public StarList getCatalogList()
Gets the list of catalog stars.
Returns:
the list of catalog stars.

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.

createXmlReportDocument

private void createXmlReportDocument()
Creates the XML report document.