|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectastro.StarDescription
public class StarDescription
A helper class containing general information on a star. This class expands the HashMap class and provides access to the following properties.
NAME: The name of the star. Can be any string, but consider
using catalog definitions like HD 12545.ID: The unique star identifier. A parsable integer, zero
denoting undefined. Defaults to DEFID.RA: The right ascension of the star. A parsable double, in
degrees.DEC: The declination of the star. A parsable double, in degrees.
PROPRA: The proper motion in right ascension of the star, in mas
per year. For convenience already multiplied with the cosine of the stars
declination. Defaults to DEFPROPRA.PROPDEC: The proper motion in declination of the star, in mas
per year. Defaults to DEFPROPDECEPOCH: The epoch of the star position. Defaults to
DEFEPOCH.EQUINOX: The equinox of the star position. Defaults to
DEFEQUINOX.MAG: The brightness of the star, in magnitudes. Should use
Johnson V.COLOR: The color index of the star, in magnitudes. Should use
Johnson B-V. Defaults to DEFCOLORgetID(): Returns the integer-id of the stargetRa(): Returns the double of the right ascension.getDec(): Returns the double of the declination.getPropRa(): Returns the double of the proper motion in ra.getPropDec(): Returns the double of the proper motion in dec.getMag(): Returns the float of the brightnessgetColor(): Returns the float of the color index.getEpoch(): Returns the float of the epoch of the star position.getEquinox(): Returns the float of the equinox of the star
position
| Nested Class Summary | |
|---|---|
static class |
StarDescription.StarComparator<T extends StarDescription>
Gets a star definition comparator linked to the named property of the star. |
| Field Summary | |
|---|---|
private Map<String,Object> |
addon
A mapping of additinal properties of the stars to their values. |
private Float |
color
The color of the star. |
static String |
COLOR
The color index shortcut. |
private Double |
de
The declination of the star. |
static String |
DEC
The declination of the star shortcut. |
static float |
DEFCOLOR
The default color of the star (0.0). |
static float |
DEFEPOCH
The default epoch (2000.0). |
static float |
DEFEQUINOX
The default equinox (2000.0). |
static int |
DEFID
The default star id (0=undefined). |
static double |
DEFPROPDEC
The default proper motion in dec (0.0). |
static double |
DEFPROPRA
The default proper motion in ra (0.0). |
private Float |
epoch
Epoch. |
static String |
EPOCH
The epoch shortcut. |
private Float |
equinox
Equinox of ra de. |
static String |
EQUINOX
The equinox shortcut. |
private Integer |
id
Integer id of the star. |
static String |
ID
The identifier of the star shortcut. |
private Float |
mag
The magnitude of the star. |
static String |
MAG
The magnitude shortcut. |
private String |
name
Name of the star. |
static String |
NAME
The name of the star shortcut. |
private Double |
pmde
Proper motion in de, in milli arc-sec per year. |
private Double |
pmra
Proper motion in ra, in milli arc-sec per year, divided by cosine dec. |
static String |
PROPDEC
The declination of the star shortcut. |
static String |
PROPRA
The proper motion in right ascension of the star shortcut. |
private Double |
ra
The right ascension of the star. |
static String |
RA
The right ascension of the star shortcut. |
private static long |
serialVersionUID
|
static StarDescription |
SOL
|
private static String |
SOLNAME
|
static String |
UNKNOWN
Unknown star names. |
| Constructor Summary | |
|---|---|
StarDescription()
Constructs a new empty star description. |
|
StarDescription(StarDescription copy)
Constructs a new star description from the source object. |
|
StarDescription(String name)
Constructs a new empty star description. |
|
StarDescription(String name,
String ras,
String decs,
String mags)
Constructs a new star description with the minimal information. |
|
StarDescription(String name,
String id,
String ras,
String decs,
String mags,
String color)
Constructs a new star description. |
|
StarDescription(String name,
String id,
String ras,
String decs,
String pra,
String pdec,
String mags,
String color)
Constructs a new star description. |
|
StarDescription(String name,
String id,
String ras,
String decs,
String pra,
String pdec,
String ep,
String eq,
String mags,
String color)
Constructs a new full star description. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Two stars are equal if they have the same name, or if their separation is zero. |
static Map<Integer,StarDescription> |
exportIdMap(List<StarDescription> l)
Exports a list of stas as a mapping of star names to stars. |
static Map<String,StarDescription> |
exportNameMap(List<StarDescription> l)
Exports a list of stas as a mapping of star names to stars. |
void |
fillMissing(StarDescription fill)
Fills missing data in this star description from the target source. |
static StarDescription |
fillMissing(StarDescription main,
StarDescription fill)
Adds all data that is missing from the first star entry, but present in the second into the first and returns it. |
Object |
get(String key)
Returns the queried value in its string representation of addintional info. |
float |
getColor()
Returns the color of the star as a float. |
double |
getDec()
Returns the declination of the star as a double. |
float |
getEpoch()
Returns the epoch of the position coordinate system as a float. |
float |
getEquinox()
Returns the equinox of the position coordinate system as a float. |
int |
getID()
Returns the star id as an int. |
float |
getMag()
Returns the magnitude of the star as a float. |
String |
getName()
Returns the target name. |
double |
getPropDec()
Returns the proper motion in declination of the star as a double. |
String |
getProperty(String key)
Returns the queried value in its string representation of addintional info. |
double |
getPropRa()
Returns the proper motion in ra of the star as a double. |
double |
getRa()
Returns the right ascension of the star as a double. |
double |
getSeparation(double ra2,
double de2)
Returns the distance in degrees of this star description to the argument one. |
static double |
getSeparation(double ra1,
double ra2,
double de1,
double de2)
Returns the distance of two stars, in degrees. |
double |
getSeparation(StarDescription other)
Returns the distance in degrees of this star description to the argument one. |
static double |
getSeparation(StarDescription s1,
StarDescription s2)
Returns the distance of two stars, in degrees. |
boolean |
isFullyValid()
Checks if ra, de, mag, color, pmra, and pmde are defined. |
boolean |
isMarginallyValid()
Checks if at least the right ascension and the declination is valid. |
static boolean |
isSexagesimal(String dms)
We try to infer if a specified string is in sexagesimal format, which we define by twice occurance of ':'. |
boolean |
isValid()
Checks if ra, de, and mag of the star is defined. |
boolean |
isVeryValid()
Checks if ra, de, mag, and color is defined. |
boolean |
matches(StarDescription s2,
double maxdist,
float magoff)
Tries to match two stars. |
static double |
parseSexagesimal(String dms)
We convert a string given as dd:mm:ss.sss into a normal double. |
Object |
set(String key,
Object to)
Sets the object. |
Object |
setColor(float bv)
Sets the color of the star. |
Object |
setDec(double dec)
Sets the declination of the star. |
Object |
setEpoch(float ep)
Sets the epoch of the position coordinate system. |
Object |
setEquinox(float eq)
Sets the equinox of the position coordinate system. |
Object |
setID(int id)
Sets the star id. |
Object |
setMag(float v)
Sets the brightness of the star. |
Object |
setName(String name)
Sets the target name. |
Object |
setPropDec(double pdec)
Sets the proper motion in dec of the star. |
Object |
setProperty(String key,
String val)
Scans the key for recognized keywords. |
Object |
setPropRa(double pra)
Sets the proper motion in ra of the star. |
Object |
setRa(double ra)
Sets the right ascension of the star. |
String |
toString()
Converts the star description name, ra, dec, mag and color into a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
public static final String UNKNOWN
public static final String NAME
public static final String ID
public static final String RA
public static final String DEC
public static final String PROPRA
public static final String PROPDEC
public static final String EPOCH
public static final String EQUINOX
public static final String MAG
public static final String COLOR
public static final float DEFEPOCH
public static final float DEFEQUINOX
public static final double DEFPROPRA
public static final double DEFPROPDEC
public static final float DEFCOLOR
public static final int DEFID
private static final String SOLNAME
private String name
private Integer id
private Double ra
private Double de
private Float mag
private Float color
private Float epoch
private Float equinox
private Double pmra
private Double pmde
private Map<String,Object> addon
public static StarDescription SOL
| Constructor Detail |
|---|
public StarDescription()
public StarDescription(String name)
public StarDescription(StarDescription copy)
public StarDescription(String name,
String ras,
String decs,
String mags)
name - Name of the star.ras - Right ascension of the star.decs - Declination of the star.mags - Brightness of the star.
public StarDescription(String name,
String id,
String ras,
String decs,
String mags,
String color)
name - Name of the star.id - ID of the star.ras - Right ascension of the star.decs - Declination of the star.mags - Brightness of the star.color - Color index of the star.
public StarDescription(String name,
String id,
String ras,
String decs,
String pra,
String pdec,
String mags,
String color)
name - Name of the star.id - ID of the star.ras - Right ascension of the star.decs - Declination of the star.mags - Brightness of the star.color - Color index of the star.
public StarDescription(String name,
String id,
String ras,
String decs,
String pra,
String pdec,
String ep,
String eq,
String mags,
String color)
name - Name of the star.id - ID of the star.ras - Right ascension of the star.decs - Declination of the star.pra - Proper motion in ra of the star.pdec - Proper motion in dec of the star.ep - Epoch of the coordinate system.eq - Equinox of the coordinate system.mags - Brightness of the star.color - Color index of the star.| Method Detail |
|---|
public Object get(String key)
public String getProperty(String key)
public Object setProperty(String key,
String val)
public Object set(String key,
Object to)
public Object setName(String name)
public String getName()
public Object setID(int id)
public int getID()
public Object setRa(double ra)
public double getRa()
public Object setDec(double dec)
public double getDec()
public Object setPropRa(double pra)
public double getPropRa()
public Object setPropDec(double pdec)
public double getPropDec()
public Object setEpoch(float ep)
public float getEpoch()
public Object setEquinox(float eq)
public float getEquinox()
public Object setMag(float v)
public float getMag()
public Object setColor(float bv)
public float getColor()
public double getSeparation(StarDescription other)
public double getSeparation(double ra2,
double de2)
public static final double getSeparation(StarDescription s1,
StarDescription s2)
public static final double getSeparation(double ra1,
double ra2,
double de1,
double de2)
public boolean equals(Object other)
equals in class Object
public boolean matches(StarDescription s2,
double maxdist,
float magoff)
public String toString()
toString in class Objectpublic static boolean isSexagesimal(String dms)
public static double parseSexagesimal(String dms)
public boolean isMarginallyValid()
public boolean isValid()
public boolean isVeryValid()
public boolean isFullyValid()
public void fillMissing(StarDescription fill)
public static StarDescription fillMissing(StarDescription main,
StarDescription fill)
public static Map<String,StarDescription> exportNameMap(List<StarDescription> l)
public static Map<Integer,StarDescription> exportIdMap(List<StarDescription> l)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||