public class VizierStarParser extends PropertyContainer
VizierTable into a list of
SimpleStars. It uses ExpressionNodes and an
ExpressionParser to evaluate the SimpleStar fields from
the net.cds.Vizier.Table. For this to work, the appropriate keys
should point to String-expression that are then filled with data from the
table at run-time. Keys that are empty mean that this info is not available
in the VizieR
catalog. The name of the star must always translate to a single field in the
table. Its value is converted to a string. Values for the UCAC V2 release, its bright
supplement, the hipparchos table, the guides-star catalog V 2.2. It is a pain
in the ass if field names use normal parenthesis in their names, because
those are reserved for arithemtics. There is no good solution for this. If
you ever encounter field names with normal parenthesis, replace them with
"[", parenthesis like "<" should be replaced with "{". A minus '-' can be
expressed as a '.'.| Modifier and Type | Class and Description |
|---|---|
static class |
VizierStarParser.HipparchosUcac2
This class compares the hipparchos main catalogue with the UCAC2
catalogue.
|
static class |
VizierStarParser.Retrieve
Mainly for testing the class.
|
| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFDECALC
The default de-expression for the UCAC2 catalog.
|
private static String |
DEFEPOCHCALC
The default epoch expression.
|
private static String |
DEFEQUINOXCALC
The default equinox expression.
|
private static String |
DEFNAMESEPARATE
The default name separator is the empty string.
|
private static String |
DEFRACALC
The default ra-expression for the UCAC2 catalog.
|
static String |
KEY_COLORCALC
The key linked to the color expression.
|
static String |
KEY_DECALC
The key linked to the declination expression.
|
static String |
KEY_EPOCHCALC
The key linked to the epoch expression.
|
static String |
KEY_EQUINOXCALC
The key linked to the equinox expression.
|
static String |
KEY_IDCALC
The key linked to the id expression.
|
static String |
KEY_MAGCALC
The key linked to the magnitude expression.
|
static String |
KEY_MIXEDID
For mixed cataloges, this points to the mixed identifier.
|
static String |
KEY_MIXEDVALID
This is a comma-separated list of star entries in mixed cataloges.
|
static String |
KEY_NAME
The key linked to the Table field that is the name.
|
static String |
KEY_NAMEPREPEND
The key linked to the static part of the name that prepends it.
|
static String |
KEY_NAMESEPARATE
The key linked to the name separator in case of multiple fields.
|
static String |
KEY_PMDECALC
The key linked to the proper motion in de expression.
|
static String |
KEY_PMRACALC
The key linked to the proper motion in ra expression.
|
static String |
KEY_RACALC
The key linked to the right ascension expression.
|
static String |
KEY_TABLEID
The VizieR catalog ID.
|
static String |
KEY_TABLETEXT
The Vizier table text.
|
private List<String> |
mix
A list of valid star identifiers or null for non-mixed cataloges.
|
private List<String> |
nameid
A list of name-identifier fields, normally only a single entry.
|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORCONFIG, KEY_CLASS| Constructor and Description |
|---|
VizierStarParser(Map<String,String> prop)
Constructs a new vizier-star conversion object.
|
| Modifier and Type | Method and Description |
|---|---|
private static Number |
evaluate(String node,
Map<String,Object> data)
Evaluates a single expression.
|
private static Number |
evaluateSingle(String node,
Map<String,Object> data)
Evaluates a single expression.
|
List<Star> |
getFieldOfView(double centerra,
double centerde,
double radius)
Retrieves a list of
SimpleStar objects utilizing the
Vizier class. |
List<Star> |
getFieldOfView(String centerobject,
double radius)
Retrieves a list of
SimpleStar objects utilizing the
Vizier class. |
List<Star> |
getFieldOfView(VizierTable tab)
Parses a list of
SimpleStar objects utilizing the
net.cds.Vizier.Table handed over. |
private Star |
getOneStar(Map<String,Object> vizier)
Converts a single
net.cds.Vizier.Table data entry into a
SimpleStar. |
augment, augment, augment, augment, augment, clone, 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, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringpublic static final String KEY_TABLEID
public static final String KEY_TABLETEXT
public static final String KEY_NAMEPREPEND
public static final String KEY_NAME
public static final String KEY_NAMESEPARATE
public static final String KEY_IDCALC
public static final String KEY_RACALC
public static final String KEY_DECALC
public static final String KEY_PMRACALC
public static final String KEY_PMDECALC
public static final String KEY_MAGCALC
public static final String KEY_COLORCALC
public static final String KEY_EPOCHCALC
public static final String KEY_EQUINOXCALC
public static final String KEY_MIXEDID
public static final String KEY_MIXEDVALID
private static final String DEFNAMESEPARATE
private static final String DEFRACALC
private static final String DEFDECALC
private static final String DEFEQUINOXCALC
private static final String DEFEPOCHCALC
private final List<String> nameid
public List<Star> getFieldOfView(double centerra, double centerde, double radius)
SimpleStar objects utilizing the
Vizier class. From all tables retrieved, only the one matching
KEY_TABLEID is kept. Thisnet.cds.Vizier.Table returned
from the vizier call is converted into SimpleStar objects by
parsing and evaluating the appropriate expressions found in the
vizier-star properties.centerra - Center of the field, right ascension, in degrees.centerde - Center of the field, declination, in degrees.radius - Circular size of the FoV, degrees.public List<Star> getFieldOfView(String centerobject, double radius)
SimpleStar objects utilizing the
Vizier class. From all tables retrieved, only the one matching
KEY_TABLEID is kept. This net.cds.Vizier.Table returned
from the vizier call is converted into SimpleStar objects by
parsing and evaluating the appropriate expressions found in the
vizier-star properties.centerobject - The Simbad-resolvable name of the object in center.radius - Circular size of the FoV, degrees.SimpleStars or null.public List<Star> getFieldOfView(VizierTable tab)
SimpleStar objects utilizing the
net.cds.Vizier.Table handed over. Entries are converted into
SimpleStar objects by parsing and evaluating the appropriate
expressions found in the vizier-star properties.tab - The table from the Vizier or the servlet.SimpleStars or null.private Star getOneStar(Map<String,Object> vizier)
net.cds.Vizier.Table data entry into a
SimpleStar. The star data is parsed and evaluated using the
expressions in the vizier-star properties. The names of the variables are
the keys in the map, the numerical values are the values in the map.private static Number evaluate(String node, Map<String,Object> data)
ExpressionNode
for each star-description field and only replace the variables in this
method.private static Number evaluateSingle(String node, Map<String,Object> data)
T -