|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<VelocityConvention> edu.nrao.sss.astronomy.VelocityConvention
public enum VelocityConvention
A convention used to convert a rest frequency to a sky frequency.
A discussion of these conventions may be found at http://iram.fr/IRAMFR/ARN/may95/node4.html and http://www.gb.nrao.edu/~fghigo/gbtdoc/doppler.html.
Version Info:
$Revision: 1572 $ |
$Date: 2008-09-22 16:52:39 -0600 (Mon, 22 Sep 2008) $ |
$Author: dharland $ |
Enum Constant Summary | |
---|---|
OPTICAL
The optical astronomy convention for converting a rest frequency to a sky frequency. |
|
RADIO
The radio astronomy convention for converting a rest frequency to a sky frequency. |
|
REDSHIFT
The red shift convention for converting a rest frequency to a sky frequency. |
|
RELATIVISTIC
The relativistic convention for converting a rest frequency to a sky frequency. |
Method Summary | |
---|---|
static VelocityConvention |
fromString(String text)
Returns the velocity convention represented by text . |
static VelocityConvention |
getDefault()
Returns a default velocity convention. |
LinearVelocityUnits |
getDefaultUnits()
Returns the default velocity units used by this convention. |
abstract BigDecimal |
getFrequencyShiftFactor(BigDecimal velocityInDefaultUnits)
Returns a factor that can be used to shift a rest frequency to one appropriate for the given velocity. |
BigDecimal |
getFrequencyShiftFactor(LinearVelocity velocity)
Returns a factor that can be used to shift a rest frequency to one appropriate for the given velocity. |
abstract LinearVelocity |
getVelocity(BigDecimal shiftFactor)
Returns the velocity for the given shift factor. |
String |
toString()
Returns a text representation of this enumeration constant. |
static VelocityConvention |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static VelocityConvention[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final VelocityConvention OPTICAL
Convention:
fsky = frest * (1 + v/c)-1
public static final VelocityConvention RADIO
Convention:
fsky = frest * (1 - v/c)
public static final VelocityConvention REDSHIFT
Convention:
fsky = frest * (1 + z)-1
public static final VelocityConvention RELATIVISTIC
Convention:
fsky = frest * (1 - (v/c)2)½ / (1 + v/c)
Method Detail |
---|
public static VelocityConvention[] values()
for (VelocityConvention c : VelocityConvention.values()) System.out.println(c);
public static VelocityConvention valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic LinearVelocityUnits getDefaultUnits()
public abstract BigDecimal getFrequencyShiftFactor(BigDecimal velocityInDefaultUnits)
See the descriptions of the individual elements of this enumeration for the formula used by a given convention.
velocityInDefaultUnits
- the velocity, in the default units of this
convention, for which a frequency-shifting
factor is desired.public abstract LinearVelocity getVelocity(BigDecimal shiftFactor)
shiftFactor
- the ratio between the observed frequency and the
rest frequency.
public BigDecimal getFrequencyShiftFactor(LinearVelocity velocity)
velocity
- the velocity for which a frequency-shifting factor
is desired.
velocity
is null, a factor of one will be
returned.public static VelocityConvention getDefault()
public String toString()
toString
in class Enum<VelocityConvention>
public static VelocityConvention fromString(String text)
text
.
For details about the transformation, see
EnumerationUtility.enumFromString(Class, String)
.
text
- a text representation of a velocity convention.
text
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |