stella.util
Class StarAmoeba

java.lang.Object
  extended by util.PropertyContainer
      extended by stella.util.StarAmoeba
All Implemented Interfaces:
Cloneable, Initializable, PropertyBearing, Multidimensional

public class StarAmoeba
extends PropertyContainer
implements Multidimensional, Initializable

This class takes a good set of image-filtering parameters and uses actual guider images to train.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
private static int DEFDATAMAX
          The data max.
private static int DEFDATAMIN
          The data min.
private static double DEFDEVIATION
          The default allowed squared deviation in square-pixel.
private static double DEFFAULTPENALTY
          The default fault penalty.
private static File DEFFITSDIR
          The default fits directory.
private static double DEFGAUSSFWHM
          The fwhm of the truncatate gaussian filter.
private static double DEFGAUSSTRUNCATE
          The truncation factor in the gaussian filter.
private static int DEFMEDIAN
          The radius of the median filter..
private static int DEFSEARCHBOX
          The search box size of the starfinder.
private static double DEFSINCLOWPASS
          The length scale of the sinc low-pass filter.
private static int DEFSIZELOWPASS
          The size of the low-pass filter.
private static String DEFSPURIOUSFILE
          If file is present, it homes serialized spurious from prior analysis.
private static String DEFSTARFILE
          If file is present, it contains serialized stars from prior analysis.
private static double DEFSTARPENALTY
          The default star penalty.
static String KEY_DATAMAX
          The data max.
static String KEY_DATAMIN
          The data min.
static String KEY_DEVIATION
          The tolerance in position difference.
static String KEY_FAULTPENALTY
          The penalty for each non-object identified.
static String KEY_FITSDIR
          The fits-files directory.
static String KEY_GAUSSFWHM
          The fwhm of the truncatate gaussian filter.
static String KEY_GAUSSTRUNCATE
          The truncation factor in the gaussian filter.
static String KEY_MEDIAN
          The radius of the median filter..
static String KEY_SEARCHBOX
          The search box size of the starfinder.
static String KEY_SINCLOWPASS
          The length scale of the sinc low-pass filter.
static String KEY_SIZELOWPASS
          The size of the low-pass filter.
static String KEY_SPURIOUSFILE
          If file is present, it homes serialized spurious from prior analysis.
static String KEY_STARFILE
          If file is present, it contains serialized stars from prior analysis.
static String KEY_STARPENALTY
          The penalty for stars not found.
private  List spurious
          The spurious detections.
private  List star
          The stars.
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
StarAmoeba(Map prop)
          Constructs a new star amoeba and defaults all parameters.
 
Method Summary
 int dimension()
          Returns the dimension of the amoeba-fit.
 double evaluate(VectorG param)
          Evaluates the amoeba.
 double evaluate(VectorG param, boolean printout)
          Evaluates the amoeba.
private  double getChi(Guiding.RawStar raw, VectorG param)
          Evaluates the chi on an inidividual detection.
 void init()
          Reads the directory with the fits files to do the initial image reduction on all of them.
private  void init(boolean update)
          Reads the directory with the fits files to do the initial image reduction on all of them.
static void main(String[] arg)
          If we supplied an argument, this is treated as the properties of the image amoeba, otherwise we use all default values.
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_STARPENALTY

public static final String KEY_STARPENALTY
The penalty for stars not found.

See Also:
Constant Field Values

KEY_FAULTPENALTY

public static final String KEY_FAULTPENALTY
The penalty for each non-object identified.

See Also:
Constant Field Values

KEY_SIZELOWPASS

public static final String KEY_SIZELOWPASS
The size of the low-pass filter.

See Also:
Constant Field Values

KEY_SINCLOWPASS

public static final String KEY_SINCLOWPASS
The length scale of the sinc low-pass filter.

See Also:
Constant Field Values

KEY_MEDIAN

public static final String KEY_MEDIAN
The radius of the median filter..

See Also:
Constant Field Values

KEY_GAUSSFWHM

public static final String KEY_GAUSSFWHM
The fwhm of the truncatate gaussian filter.

See Also:
Constant Field Values

KEY_GAUSSTRUNCATE

public static final String KEY_GAUSSTRUNCATE
The truncation factor in the gaussian filter.

See Also:
Constant Field Values

KEY_SEARCHBOX

public static final String KEY_SEARCHBOX
The search box size of the starfinder.

See Also:
Constant Field Values

KEY_DATAMIN

public static final String KEY_DATAMIN
The data min.

See Also:
Constant Field Values

KEY_DATAMAX

public static final String KEY_DATAMAX
The data max.

See Also:
Constant Field Values

KEY_DEVIATION

public static final String KEY_DEVIATION
The tolerance in position difference.

See Also:
Constant Field Values

KEY_FITSDIR

public static final String KEY_FITSDIR
The fits-files directory.

See Also:
Constant Field Values

KEY_STARFILE

public static final String KEY_STARFILE
If file is present, it contains serialized stars from prior analysis.

See Also:
Constant Field Values

KEY_SPURIOUSFILE

public static final String KEY_SPURIOUSFILE
If file is present, it homes serialized spurious from prior analysis.

See Also:
Constant Field Values

DEFSTARPENALTY

private static final double DEFSTARPENALTY
The default star penalty.

See Also:
Constant Field Values

DEFFAULTPENALTY

private static final double DEFFAULTPENALTY
The default fault penalty.

See Also:
Constant Field Values

DEFSIZELOWPASS

private static final int DEFSIZELOWPASS
The size of the low-pass filter.

See Also:
Constant Field Values

DEFSINCLOWPASS

private static final double DEFSINCLOWPASS
The length scale of the sinc low-pass filter.

See Also:
Constant Field Values

DEFMEDIAN

private static final int DEFMEDIAN
The radius of the median filter..

See Also:
Constant Field Values

DEFGAUSSFWHM

private static final double DEFGAUSSFWHM
The fwhm of the truncatate gaussian filter.

See Also:
Constant Field Values

DEFGAUSSTRUNCATE

private static final double DEFGAUSSTRUNCATE
The truncation factor in the gaussian filter.

See Also:
Constant Field Values

DEFSEARCHBOX

private static final int DEFSEARCHBOX
The search box size of the starfinder.

See Also:
Constant Field Values

DEFDATAMIN

private static final int DEFDATAMIN
The data min. We have a sigma of 3.88.

See Also:
Constant Field Values

DEFDATAMAX

private static final int DEFDATAMAX
The data max.

See Also:
Constant Field Values

DEFDEVIATION

private static final double DEFDEVIATION
The default allowed squared deviation in square-pixel.

See Also:
Constant Field Values

DEFSTARFILE

private static final String DEFSTARFILE
If file is present, it contains serialized stars from prior analysis.

See Also:
Constant Field Values

DEFSPURIOUSFILE

private static final String DEFSPURIOUSFILE
If file is present, it homes serialized spurious from prior analysis.

See Also:
Constant Field Values

DEFFITSDIR

private static final File DEFFITSDIR
The default fits directory.


star

private List star
The stars.


spurious

private List spurious
The spurious detections.

Constructor Detail

StarAmoeba

public StarAmoeba(Map prop)
Constructs a new star amoeba and defaults all parameters. During init, the single image reduction process is applied to all guider images.

Method Detail

init

public void init()
Reads the directory with the fits files to do the initial image reduction on all of them. The static information on the detected stars in the positions file is extracted and stored.

Specified by:
init in interface Initializable
Overrides:
init in class PropertyContainer

init

private void init(boolean update)
Reads the directory with the fits files to do the initial image reduction on all of them. The static information on the detected stars in the positions file is extracted and stored.


dimension

public int dimension()
Returns the dimension of the amoeba-fit.

Specified by:
dimension in interface Multidimensional

evaluate

public double evaluate(VectorG param)
Evaluates the amoeba. We use the following formular:
       chi(rawstar)=a_0+a_1*sharp+a_2*elong+a_3*fwhm+a_4*(sky/area)
       error = Σchi&pow2;(stars)/Σchi&pow2;(nonstars)
       

Specified by:
evaluate in interface Multidimensional

evaluate

public double evaluate(VectorG param,
                       boolean printout)
Evaluates the amoeba. We use the following formular:
       chi(rawstar)=a_0+a_1*sharp+a_2*elong+a_3*fwhm+a_4*(sky/area)
       error = Σchi&pow2;(stars)/Σchi&pow2;(nonstars)
       


getChi

private double getChi(Guiding.RawStar raw,
                      VectorG param)
Evaluates the chi on an inidividual detection. For stars, this chi should be minimal, whilst for spurious it should be maximal.


main

public static void main(String[] arg)
If we supplied an argument, this is treated as the properties of the image amoeba, otherwise we use all default values.