|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.astro.Coo
cds.astro.Astrocoo
cds.astro.Astropos
public class Astropos
The class Astropos adds to Astrocoo the notions of mouvement (proper motions, velocity) and error ellipses.
The edition of the position in an Astropos can be done in a StringBuffer
(edit methods) with options like sexagesimal or decimal edition,
or as a String with one of the available toString methods.
In string format, an astropos looks like:
longitude +/- latitude (epoch)
[errorEllipse_mas (meanEpoch)]
pm_lon pm_lat [errorEllipse_mas/yr ]
parallax_mas [error]
radialVelocity_km/s [error]
The values are expressed internally as cartesian components in the associated frame. Errors are expressed internally as a 6x6 covariance matrix, (multinormal error distribution is asumed), also aligned with the frame main axes. Errors in other frames are computed using the property that, if x is multinormal with covariance matrix V then Tx is multinormal with covariance matrix TVtT. For instance, the variation of the 6-vector (x,y,x,xd,yd,zd) with time is linear with the following T(t) matrix:
1 0 0 t 0 0 0 1 0 0 t 0 0 0 1 0 0 t 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1(notice that T-1(t) = T(-t) and T(t1) T(t2) = T(t1 + t2)) and the error propagations are easily computed by this method.
Conversions into other frames (convertTo(cds.astro.Astroframe)
method) imply a
change of all parameters (position, proper motions, errors). A change
of the epoch is achieved with the toEpoch(double)
method.
Field Summary | |
---|---|
double |
e_plx
Mean error on parallax in mas |
double |
e_rv
Mean error on radial Velocity in km/s |
double |
plx
Parallax in mas |
double |
rv
Radial velocity in km/s |
Fields inherited from class cds.astro.Astrocoo |
---|
ARCMIN, ARCSEC, DEG, EDIT_2NUMBERS, EDIT_DEFAULT, EDIT_EPOCH, EDIT_FRAME, EDIT_FULL, EDIT_MEAN_EPOCH, epoch, frame, MAS, NONE |
Fields inherited from class cds.astro.Coo |
---|
decimals, ed, Umatrix3, x, y, z |
Constructor Summary | |
---|---|
Astropos()
Create the default (empty) Astropos (ICRS) |
|
Astropos(Astrocoo coo)
Create a Astropos object from an existing Astrocoo |
|
Astropos(Astroframe frame)
Create an empty Astropos. |
|
Astropos(Astroframe frame,
double lon,
double lat)
Create a Astropos object with just longitude + latitude |
|
Astropos(Astroframe frame,
double lon,
double lat,
double epoch,
double[] eepos,
double mu1,
double mu2,
double epocho,
double[] eepm,
double[] plx2,
double[] rv2)
Set a Astropos from position + proper motion. |
|
Astropos(Astroframe frame,
double lon,
double lat,
double epoch,
double mu1,
double mu2)
Create a Astropos object: coordinates + proper motion. |
|
Astropos(Astroframe frame,
java.lang.String text)
Create an Astropos object from a position (Epoch) |
|
Astropos(java.lang.String text)
Create an Astropos object from just a string. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clone the Coo object |
void |
convertTo(Astroframe new_frame)
Transform the position into another frame. |
boolean |
copyErrorEllipse(double[] ee3)
Get the Error Ellipse of the position |
boolean |
copyParallax(double[] valerr)
Get the Parallax |
boolean |
copyProperMotion(double[] pm)
Get the proper motions (2 components) |
boolean |
copyProperMotionErrorEllipse(double[] ee3)
Get the Error Ellipse of the Proper Motion |
boolean |
copyVelocity(double[] valerr)
Get the Velocity |
void |
dump(java.lang.String title)
Dump the contents of an Astropos |
boolean |
equals(java.lang.Object o)
Compare 2 coordinates. |
static void |
errorEllipseToVariance(double[] ee3,
double[] var)
Convert an error ellipse (a, b, posAngle) into a variance matrix (var(x), var(y), cov(x,y)). |
double |
getProperMotionLat()
Get the Latitude proper motion (mas/yr) |
double |
getProperMotionLon()
Get the Longitude proper motion (mas/yr) |
double |
normalize()
Renormalize the vectors |
int |
parse(java.lang.String txt,
int offset)
Parsing method: interpret a String. |
static boolean |
parseErrorEllipse(Parsing txt,
double[] ee3)
Interpret an error ellipse written [ a b theta ]. |
boolean |
parsing(Parsing txt)
Interpret the string and convert to Coo + Epoch. |
void |
rotate(double[][] R)
Rotate an Astropos. |
void |
set()
Reset position to unknown. |
void |
set(Astrocoo coo)
Set position from another Astrocoo |
void |
set(Coo coo)
New position from a Coo |
void |
set(Coo coo,
double epoch)
Set position from Coordinate and Epoch. |
void |
set(double lon,
double lat)
Set position from RA + Dec. |
void |
set(double lon,
double lat,
double epoch)
Set position from RA + Dec and epoch |
void |
set(double lon,
double lat,
double epoch,
double[] eepos,
double mu1,
double mu2,
double epocho,
double[] eepm,
double[] plx2,
double[] rv2)
Set a Astropos from position + proper motion. |
void |
set(double lon,
double lat,
double epoch,
double mu1,
double mu2)
Set position from RA + Dec. |
void |
set(java.lang.String text)
Set a particuliar set of positions in the Astropos. |
void |
set(java.lang.String text,
boolean equatorial)
Overload Coo method (see set(String text) ) |
void |
setDefaultMeanEpoch(double epocho)
Set a Default Mean Epoch. |
boolean |
setEpoch(double epoch)
Set the Epoch of the position. |
boolean |
setErrorEllipse(double e_maj,
double e_min,
double pa)
Set the Error Ellipse. |
boolean |
setErrorEllipse(double e_maj,
double e_min,
double pa,
double epocho)
Set the Error Ellipse, with the epoch of this error (epocho, mean epoch) |
boolean |
setErrorProperMotion(double e_mu1,
double e_mu2)
Set the Error on Proper Motion |
boolean |
setErrorProperMotion(double e_maj,
double e_min,
double pa)
Set the Error on Proper Motions |
void |
setFrameEpoch()
Set the default epoch of the frame to current epoch |
boolean |
setParallax(double plx,
double err)
Set the Parallax |
boolean |
setProperMotion(double mu1,
double mu2)
Set the Proper Motion |
boolean |
setRadialVelocity(double rv,
double err)
Set the Radial Velocity |
double |
sigmaLat()
Get the mean error on Latitude ({sigma}(Dec)) |
double |
sigmaLon()
Get the mean error on Longitude ({sigma}RA*cos(Dec)) |
double |
sigmaProperMotionLat()
Get the mean error on Latitude proper motion ({sigma}(Dec)) |
double |
sigmaProperMotionLon()
Get the mean error on Longitude proper motion ({sigma}pmRA*cos(Dec)) |
void |
toEpoch(double Jyr)
Change the epoch of the position (in the same frame) |
java.lang.String |
toString()
Default edition: use what's stored |
java.lang.String |
toString(int opt)
Default edition: use what's stored |
static void |
varianceToErrorEllipse(double[] var,
double[] ee3)
Convert a variance matrix (var(x), var(y), cov(x,y)) into an error ellipse (a, b, posAngle). |
Methods inherited from class cds.astro.Astrocoo |
---|
convert, edit, editingOptions, explain, getEditing, getEpoch, getFrame, getLatPrec, getLonPrec, getPrecision, parseFrame, setEditing, setPrecision, setPrecision, toString |
Methods inherited from class cds.astro.Coo |
---|
add, add, copyAngles, copyUvector, distance, distance, editCoo, eulerMatrix, getLat, getLon, localMatrix, localMatrix, localMatrix, moveMatrix, normalize, rotate_1, rotateVector_1, rotateVector, setDecimals, setUvec, sub, sub |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double plx
public double rv
public double e_plx
public double e_rv
Constructor Detail |
---|
public Astropos()
public Astropos(Astroframe frame)
frame
- in which framepublic Astropos(Astroframe frame, double lon, double lat)
lon
- longitude (RA), degreeslat
- latitude (Dec), degreespublic Astropos(Astroframe frame, double lon, double lat, double epoch, double mu1, double mu2)
lon
- longitude (RA), degreeslat
- latitude (Dec), degreesepoch
- epoch of the longitude/latitude, yearmu1
- proper motion along longitude, mas/yrmu2
- proper motion along latitude, mas/yrpublic Astropos(Astrocoo coo)
coo
- Astrocoo objectpublic Astropos(Astroframe frame, java.lang.String text) throws java.text.ParseException
frame
- one of the possible Astroframestext
- Text with position, possibly followed by an epoch
java.text.ParseException
public Astropos(java.lang.String text) throws java.text.ParseException
text
- Text with frame, position, possibly followed by an epoch
java.text.ParseException
public Astropos(Astroframe frame, double lon, double lat, double epoch, double[] eepos, double mu1, double mu2, double epocho, double[] eepm, double[] plx2, double[] rv2)
frame
- one of the possible Astroframeslon
- longitude (RA), degreeslat
- latitude (Dec), degreeseepos
- error ellipse, masepoch
- epoch of the longitude/latitude, Julian yearmu1
- proper motion along longitude, mas/yrmu2
- proper motion along latitude, mas/yreepm
- error ellipse of proper motion, mas/yrepocho
- epoch of position error (minimal error), Jyrplx2
- parallax + its error (mas)rv2
- radial velocity + its error (km/s)Method Detail |
---|
public double normalize()
normalize
in class Coo
public final void rotate(double[][] R)
rotate
in class Coo
R
- [3][3] matrixpublic static final void varianceToErrorEllipse(double[] var, double[] ee3)
var
- Vector {var(x) var(y) cov(x,y) }ee3
- Vector { a b theta } axises+PA of ellipse
The relationpublic static final void errorEllipseToVariance(double[] ee3, double[] var)
ee3
- Vector { a b theta} axises+PA of ellipsevar
- Vector {var(x) var(y) cov(x,y)}
The relationpublic static boolean parseErrorEllipse(Parsing txt, double[] ee3)
txt
- Text to interpretee3
- Vector ( a b theta) axises+PA of ellipse
public java.lang.Object clone()
Coo
clone
in class Astrocoo
public void dump(java.lang.String title)
dump
in class Astrocoo
title
- title linepublic boolean parsing(Parsing txt)
parsing
in class Astrocoo
txt
- to interpret as a Parsing object e.g.
"12 34.5 -72 54 [30 20 65 (J1991.25)] J2000.0 +125.2 -35.2 [3.9 2.5 45] 123[4]km/s 10[5]"
public int parse(java.lang.String txt, int offset)
parse
in class Astrocoo
txt
- to interpret.offset
- starting position in text
public void set()
set
in class Coo
public void set(Coo coo)
set
in class Coo
coo
- A coordinatepublic void set(Astrocoo coo)
set
in class Astrocoo
coo
- A coordinatepublic void set(Coo coo, double epoch)
set
in class Astrocoo
coo
- A coordinateepoch
- Epoch of positionpublic void set(double lon, double lat)
set
in class Coo
lon
- longitude in degreeslat
- latitude angle in degreespublic void set(double lon, double lat, double epoch)
set
in class Coo
lon
- x item in unit vector (direction cosines)lat
- y item in unit vector (direction cosines)epoch
- z item in unit vector (direction cosines)public void set(double lon, double lat, double epoch, double mu1, double mu2)
public void set(double lon, double lat, double epoch, double[] eepos, double mu1, double mu2, double epocho, double[] eepm, double[] plx2, double[] rv2)
lon
- longitude (RA), degreeslat
- latitude (Dec), degreesepoch
- epoch of the longitude/latitude, yeareepos
- error ellipse, masmu1
- proper motion along longitude, mas/yrmu2
- proper motion along latitude, mas/yrepocho
- epoch of proper motion (minimal position error)eepm
- error ellipse of proper motion, mas/yrplx2
- parallax + its error (mas)rv2
- radial velocity + its error (km/s)public void set(java.lang.String text) throws java.text.ParseException
set
in class Astrocoo
text
- Longitude + latitude in text
java.text.ParseException
- when the string is not interpretablepublic void set(java.lang.String text, boolean equatorial) throws java.text.ParseException
java.text.ParseException
public void setFrameEpoch()
public void setDefaultMeanEpoch(double epocho)
epocho
- The default mean epoch, in Julian years.
An NaNvalue remove the default mean epoch.public boolean setEpoch(double epoch)
setEpoch
in class Astrocoo
epoch
- The epoch of the positions.
An NaNvalue remove the default mean epoch.
public boolean setErrorEllipse(double e_maj, double e_min, double pa)
e_maj
- Major axis of error ellipse (mas)e_min
- Minor axis of error ellipse (maspa
- Position angle of error ellipse (deg)
public boolean setErrorEllipse(double e_maj, double e_min, double pa, double epocho)
e_maj
- Major axis of error ellipse (mas)e_min
- Minor axis of error ellipse (maspa
- Position angle of error ellipse (deg)epocho
- Mean epoch (epoch of the error)
public boolean setProperMotion(double mu1, double mu2)
mu1
- Proper motion along longitude or Right Ascension (mas/yr)mu2
- Proper motion along latitude or Declination (mas/yr)
public boolean setErrorProperMotion(double e_mu1, double e_mu2)
e_mu1
- Error on longitude or Right Ascension (mas/yr)e_mu2
- Error on latitude or Declination (mas/yr)
public boolean setErrorProperMotion(double e_maj, double e_min, double pa)
e_maj
- Major axis of error ellipse (mas)e_min
- Minor axis of error ellipse (maspa
- Position angle of error ellipse (deg)
public boolean setRadialVelocity(double rv, double err)
rv
- Radial velocity in km/serr
- Error on radial velocity in km/s
public boolean setParallax(double plx, double err)
plx
- Parallax, in mas (kpc-1)err
- Error on parallax (mas)
public boolean copyErrorEllipse(double[] ee3)
ee3
- Vector of 3 components (a, b, posAngle)
(a and b in mas, posAngle in degrees)
public double sigmaLon()
public double sigmaLat()
public boolean copyProperMotion(double[] pm)
pm
- Vector of 2 components (pmRA*cos(Dec), pmDec)
public double getProperMotionLon()
public double getProperMotionLat()
public boolean copyProperMotionErrorEllipse(double[] ee3)
ee3
- Vector of 3 components (a, b, posAngle)
(a and b in mas/Jyr, posAngle in degrees)
public double sigmaProperMotionLon()
public double sigmaProperMotionLat()
public boolean copyParallax(double[] valerr)
valerr
- Vector of 2 components (plx, e_plx) (mas)
public boolean copyVelocity(double[] valerr)
valerr
- Vector of 2 components (Rvel, e_Rvel) (mas)
public boolean equals(java.lang.Object o)
equals
in class Astrocoo
o
- Objet a comparer.
public java.lang.String toString()
toString
in class Astrocoo
public java.lang.String toString(int opt)
toString
in class Astrocoo
opt
- Option, as in Astrocoo
public void toEpoch(double Jyr)
Jyr
- the new epochpublic void convertTo(Astroframe new_frame)
convertTo
in class Astrocoo
new_frame
- The frame of the resulting position.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |