stella.util
Class SextractorRegions

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by astro.SextractorRead
                  extended by stella.util.SextractorRegions
All Implemented Interfaces:
Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class SextractorRegions
extends SextractorRead

Converts sextractor outpur files into ds9 region files.


Nested Class Summary
static class SextractorRegions.toCanvas
          Reads the file on the first command line argument and converts it to a canvas shape list, file name given as the second argument.
static class SextractorRegions.toDs9
          Reads the file on the first command line argument and converts it to a ds9-region list, file name given as the second argument.
 
Nested classes/interfaces inherited from class astro.SextractorRead
SextractorRead.Wcs
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static String DEFDENYFLAGS
          Default value.
private static boolean DEFFWHMFILTER
          Default value.
private static double DEFFWHMHIGH
          Default value.
private static double DEFFWHMLOW
          Default value.
private static Color DEFGREENCOLOR
          Default value.
private static Color DEFREDCOLOR
          Default value.
private static String DEFREDFLAGS
          Default value.
private static String DEFSQUAREFLAGS
          Default value.
private static Color DEFYELLOWCOLOR
          Default value.
private static String DEFYELLOWFLAGS
          Default value.
private  List<StarSextractor.Flag> deny
          List of deny flags as int masks.
static String KEY_DENYFLAGS
          If any of these flags are set, don't convert.
static String KEY_FWHMFILTER
          If true, we apply an fwhm median-filter.
static String KEY_FWHMHIGH
          If fwhm filtering is active, this is the higher-sigma multiplier.
static String KEY_FWHMLOW
          If fwhm filtering is active, this is the lower-sigma multiplier.
static String KEY_GREENCOLOR
          Stars not flagged are drawn in this color.
static String KEY_REDCOLOR
          Stars flagged red are drawn in this color.
static String KEY_REDFLAGS
          Any of these flags present, we draw in red.
static String KEY_SQUAREFLAGS
          If any of these flags is present, we use a squre instead of a circle.
static String KEY_YELLOWCOLOR
          Stars flagged yellow are drawn in this color.
static String KEY_YELLOWFLAGS
          Any of these flags present, we draw in yellow (overruled by red).
private  List<StarSextractor.Flag> red
          List of deny flags as int masks.
private  List<StarSextractor.Flag> square
          List of deny flags as int masks.
private  List<StarSextractor.Flag> yellow
          List of deny flags as int masks.
 
Fields inherited from class astro.SextractorRead
KEY_DECOLUMN, KEY_DESEXAGESIMAL, KEY_ELLIPSECOLUMN, KEY_EPOCHCOLUMN, KEY_FLAGCOLUMN, KEY_FWHMCOLUMN, KEY_MAGCOLUMN, KEY_MAGERRCOLUMN, KEY_RACOLUMN, KEY_RASEXAGESIMAL, KEY_SEXAGESIMALCHAR, KEY_XCOLUMN, KEY_YCOLUMN
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
SextractorRegions(Map<String,String> prop)
          Defaults all values.
 
Method Summary
 List<String> canvas(List<StarSextractor> read, Dimension size)
          Converts a sectractor list to a JNormalizedCanvas shape list.
 List<String> ds9(List<StarSextractor> read)
          Converts a sextractor list to a ds9-region list.
 List<StarSextractor> filter(List<StarSextractor> read)
          After reading an input sextractor file, filter out all the denied stars.
 Color getColor(StarSextractor ss)
          Returns the color that should be used for this star.
 
Methods inherited from class astro.SextractorRead
daoFindExport, parse, parse
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Field Detail

KEY_DENYFLAGS

public static final String KEY_DENYFLAGS
If any of these flags are set, don't convert.

See Also:
Constant Field Values

KEY_SQUAREFLAGS

public static final String KEY_SQUAREFLAGS
If any of these flags is present, we use a squre instead of a circle.

See Also:
Constant Field Values

KEY_YELLOWFLAGS

public static final String KEY_YELLOWFLAGS
Any of these flags present, we draw in yellow (overruled by red).

See Also:
Constant Field Values

KEY_REDFLAGS

public static final String KEY_REDFLAGS
Any of these flags present, we draw in red.

See Also:
Constant Field Values

KEY_FWHMFILTER

public static final String KEY_FWHMFILTER
If true, we apply an fwhm median-filter.

See Also:
Constant Field Values

KEY_FWHMLOW

public static final String KEY_FWHMLOW
If fwhm filtering is active, this is the lower-sigma multiplier.

See Also:
Constant Field Values

KEY_FWHMHIGH

public static final String KEY_FWHMHIGH
If fwhm filtering is active, this is the higher-sigma multiplier.

See Also:
Constant Field Values

KEY_GREENCOLOR

public static final String KEY_GREENCOLOR
Stars not flagged are drawn in this color.

See Also:
Constant Field Values

KEY_YELLOWCOLOR

public static final String KEY_YELLOWCOLOR
Stars flagged yellow are drawn in this color.

See Also:
Constant Field Values

KEY_REDCOLOR

public static final String KEY_REDCOLOR
Stars flagged red are drawn in this color.

See Also:
Constant Field Values

DEFFWHMFILTER

private static final boolean DEFFWHMFILTER
Default value.

See Also:
Constant Field Values

DEFFWHMLOW

private static final double DEFFWHMLOW
Default value.

See Also:
Constant Field Values

DEFFWHMHIGH

private static final double DEFFWHMHIGH
Default value.

See Also:
Constant Field Values

DEFGREENCOLOR

private static final Color DEFGREENCOLOR
Default value.


DEFYELLOWCOLOR

private static final Color DEFYELLOWCOLOR
Default value.


DEFREDCOLOR

private static final Color DEFREDCOLOR
Default value.


DEFDENYFLAGS

private static final String DEFDENYFLAGS
Default value.


DEFSQUAREFLAGS

private static final String DEFSQUAREFLAGS
Default value.


DEFYELLOWFLAGS

private static final String DEFYELLOWFLAGS
Default value.


DEFREDFLAGS

private static final String DEFREDFLAGS
Default value.


deny

private List<StarSextractor.Flag> deny
List of deny flags as int masks.


square

private List<StarSextractor.Flag> square
List of deny flags as int masks.


yellow

private List<StarSextractor.Flag> yellow
List of deny flags as int masks.


red

private List<StarSextractor.Flag> red
List of deny flags as int masks.

Constructor Detail

SextractorRegions

public SextractorRegions(Map<String,String> prop)
Defaults all values.

Method Detail

filter

public List<StarSextractor> filter(List<StarSextractor> read)
After reading an input sextractor file, filter out all the denied stars.


getColor

public Color getColor(StarSextractor ss)
Returns the color that should be used for this star.


ds9

public List<String> ds9(List<StarSextractor> read)
Converts a sextractor list to a ds9-region list.


canvas

public List<String> canvas(List<StarSextractor> read,
                           Dimension size)
Converts a sectractor list to a JNormalizedCanvas shape list.