Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class ncsa.horizon.coordinates.formatters.
NRAOStokesFormatter

java.lang.Object
  |
  +--ncsa.horizon.coordinates.formatters.NRAOStokesFormatter

public class NRAOStokesFormatter
extends java.lang.Object
implements AxisPosFormatter
support for printing out Stokes axis positions by their two-character polarization codes, according to the NRAO Stokes Paramters Convention.

The convention is as follows:

 pixel position:  -7  -6  -5  -4  -3  -2  -1   0   1   2   3   4
 Stokes code:     YX  XY  YY  XX  LR  RL  LL  RR   I   Q   U   V
 
The I, Q, U, and V indicate the standard Stokes optical polarizations. That is, the values a the pixel position The other codes indicate

See Also:
Serialized Form

Field Summary
static java.lang.String myname
           
static java.lang.String[] polcodes
          the supported polarization codes:
 
Constructor Summary
NRAOStokesFormatter()
           
 
Method Summary
java.lang.Object clone()
           
int getPrecision()
          This method always returns 0 since the precision cannot be updated
void setPrecision(int precision)
          This method does nothing since the precision cannot be updated
java.lang.String toString(double val)
          return a value as a string with a specified precision
java.lang.String toString(double val, int prec)
          return a value as a string with a specified precision
java.lang.String toString()
           
double valueOf(java.lang.String s)
          parse the String representation of a floating point number
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

polcodes

public static final java.lang.String[] polcodes
the supported polarization codes:

myname

protected static final java.lang.String myname
Constructor Detail

NRAOStokesFormatter

public NRAOStokesFormatter()
Method Detail

toString

public java.lang.String toString(double val)
return a value as a string with a specified precision
Specified by:
toString in interface AxisPosFormatter
Parameters:
val - the input value

toString

public java.lang.String toString(double val,
                       int prec)
return a value as a string with a specified precision
Specified by:
toString in interface AxisPosFormatter
Parameters:
val - the input value
prec - the number of places right of the decimal point

valueOf

public double valueOf(java.lang.String s)
              throws java.lang.NumberFormatException
parse the String representation of a floating point number
Specified by:
valueOf in interface AxisPosFormatter

setPrecision

public void setPrecision(int precision)
This method does nothing since the precision cannot be updated
Specified by:
setPrecision in interface AxisPosFormatter

getPrecision

public int getPrecision()
This method always returns 0 since the precision cannot be updated

clone

public java.lang.Object clone()
Description copied from interface:
 
Specified by:
clone in interface AxisPosFormatter
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD