astro
Class WcsProjection.LinearPixelProjection

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by astro.WcsProjection
                  extended by astro.WcsProjection.LinearPixelProjection
All Implemented Interfaces:
Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, VectorFunction
Direct Known Subclasses:
WcsProjection.PolynomialPixelProjection, WcsProjection.VariablePixelProjection
Enclosing class:
WcsProjection

public static class WcsProjection.LinearPixelProjection
extends WcsProjection

The linear transformation from pixel space to intermediate world coordinates. Uses fixed reference pixel coordinates, while the linear transformation matrix according to

       x_i = cij*(pj-rj)
       
may consist of up to four parameters. Depending on the way the object was constructed, one, two, three, or all four of these cij are allowed to vary and thus the parameter vector may have different length.


Nested Class Summary
static class WcsProjection.LinearPixelProjection.Type
           
 
Nested classes/interfaces inherited from class astro.WcsProjection
WcsProjection.EulerRotation, WcsProjection.Gnomonic, WcsProjection.LinearGnomonicRaDe, WcsProjection.LinearPixelProjection, WcsProjection.PolynomialGnomonicRaDe, WcsProjection.PolynomialPixelProjection, WcsProjection.ReadWcs, WcsProjection.ThreeStepWcs, WcsProjection.VariableGnomonicRaDe, WcsProjection.VariablePixelProjection
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  VectorG cij
          The vector of cij in the order c00, c11, c01, c10.
private static double DEFIMROTUNIT
           
private static double DEFPSCALEUNIT
           
static String IMROT
           
static String KEY_CRPIX1
           
static String KEY_CRPIX2
           
static String KEY_IMROTUNIT
           
static String KEY_PSCALEUNIT
           
static String PSCALE
           
private  Vector2D rj
          The coordinates of the reference pixel.
private  WcsProjection.LinearPixelProjection.Type slant
          The actual type.
 
Fields inherited from class astro.WcsProjection
KEY_PARAMETERSCALE
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
  WcsProjection.LinearPixelProjection()
          We allow all variations in the transformation matrix.
  WcsProjection.LinearPixelProjection(boolean dist, boolean rot)
          If the first boolean is true, we are distorted, if the second boolean is true, we are rotated.
  WcsProjection.LinearPixelProjection(boolean dist, boolean rot, Map<String,String> u2f)
          If the first boolean is true, we are distorted, if the second boolean is true, we are rotated.
  WcsProjection.LinearPixelProjection(Map<String,String> u2f)
          We allow all variations in the transformation matrix.
private WcsProjection.LinearPixelProjection(WcsProjection.LinearPixelProjection.Type how, Map<String,String> u2f)
          Hidden constructor.
 
Method Summary
 VectorG estimateParameters(nom.tam.fits.Header h)
          We estimate a full parameter set from the header.
 VectorG evaluate(VectorG pxpy)
          We evaluate the target pixel position at the first two indices and return intermediate world coordinates.
protected  VectorG evaluateMatrix(double xi, double et)
           
 Collection<nom.tam.fits.HeaderCard> getCards()
          We always return a collcetion in cdij.
protected  VectorG getCij()
          For daughter classes: access to the linear transformation matrix.
 VectorG getParameters()
          The other way round: from the cij interpret parameters.
 double getPixelArea(VectorG pxpy)
          The pixel area is the determinant of the c_ij, no dependency on input vector The vector of cij in the order c00, c11, c01, c10.
protected  Vector2D getRj()
          Acces to the center of projection.
private static WcsProjection.LinearPixelProjection.Type getType(boolean dist, boolean rot)
          Two derive the type from a distortion and a rotation boolean for constructor use.
 boolean parseHeader(nom.tam.fits.Header h)
          We parse a header, allowing also for old header card style CDELTA1, CDELTA2, and CROTA2.
 void setParameters(VectorG vv)
          From the parameters and from the type of the transformation we construct the cij.
protected  void setRj(Vector2D nurj)
          Acces to the center of projection.
 
Methods inherited from class astro.WcsProjection
argumentDimension, estimateParameterScales, functionDimension, getStandardKeys
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, 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, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Field Detail

IMROT

public static final String IMROT
See Also:
Constant Field Values

KEY_IMROTUNIT

public static final String KEY_IMROTUNIT
See Also:
Constant Field Values

PSCALE

public static final String PSCALE
See Also:
Constant Field Values

KEY_PSCALEUNIT

public static final String KEY_PSCALEUNIT
See Also:
Constant Field Values

KEY_CRPIX1

public static final String KEY_CRPIX1
See Also:
Constant Field Values

KEY_CRPIX2

public static final String KEY_CRPIX2
See Also:
Constant Field Values

DEFIMROTUNIT

private static final double DEFIMROTUNIT
See Also:
Constant Field Values

DEFPSCALEUNIT

private static final double DEFPSCALEUNIT
See Also:
Constant Field Values

cij

private VectorG cij
The vector of cij in the order c00, c11, c01, c10.


rj

private Vector2D rj
The coordinates of the reference pixel.


slant

private WcsProjection.LinearPixelProjection.Type slant
The actual type.

Constructor Detail

WcsProjection.LinearPixelProjection

public WcsProjection.LinearPixelProjection()
We allow all variations in the transformation matrix.


WcsProjection.LinearPixelProjection

public WcsProjection.LinearPixelProjection(Map<String,String> u2f)
We allow all variations in the transformation matrix.


WcsProjection.LinearPixelProjection

public WcsProjection.LinearPixelProjection(boolean dist,
                                           boolean rot)
If the first boolean is true, we are distorted, if the second boolean is true, we are rotated.


WcsProjection.LinearPixelProjection

public WcsProjection.LinearPixelProjection(boolean dist,
                                           boolean rot,
                                           Map<String,String> u2f)
If the first boolean is true, we are distorted, if the second boolean is true, we are rotated.


WcsProjection.LinearPixelProjection

private WcsProjection.LinearPixelProjection(WcsProjection.LinearPixelProjection.Type how,
                                            Map<String,String> u2f)
Hidden constructor.

Method Detail

getType

private static WcsProjection.LinearPixelProjection.Type getType(boolean dist,
                                                                boolean rot)
Two derive the type from a distortion and a rotation boolean for constructor use.


getRj

protected Vector2D getRj()
Acces to the center of projection.


setRj

protected void setRj(Vector2D nurj)
Acces to the center of projection.


estimateParameters

public VectorG estimateParameters(nom.tam.fits.Header h)
                           throws nom.tam.fits.HeaderCardException
We estimate a full parameter set from the header. If we have CRPIX1 and 2 in the header or (lower priority) in our properties, we set the central point, otherwise we deduce it from the image size. We scan for intrinsic rotation, IMROT and pixel scale #PIXSCALE

Specified by:
estimateParameters in class WcsProjection
Throws:
nom.tam.fits.HeaderCardException

parseHeader

public boolean parseHeader(nom.tam.fits.Header h)
                    throws nom.tam.fits.HeaderCardException
We parse a header, allowing also for old header card style CDELTA1, CDELTA2, and CROTA2.

Specified by:
parseHeader in class WcsProjection
Throws:
nom.tam.fits.HeaderCardException

getCards

public Collection<nom.tam.fits.HeaderCard> getCards()
                                             throws nom.tam.fits.HeaderCardException
We always return a collcetion in cdij.

Specified by:
getCards in class WcsProjection
Throws:
nom.tam.fits.HeaderCardException

setParameters

public void setParameters(VectorG vv)
From the parameters and from the type of the transformation we construct the cij. Only these are used in the subsequent calls to evaluate the model. Depending on the type we have the following order and meaning in the parameters.

Overrides:
setParameters in class WcsProjection

getParameters

public VectorG getParameters()
The other way round: from the cij interpret parameters.

Overrides:
getParameters in class WcsProjection

evaluate

public VectorG evaluate(VectorG pxpy)
We evaluate the target pixel position at the first two indices and return intermediate world coordinates.


evaluateMatrix

protected VectorG evaluateMatrix(double xi,
                                 double et)

getCij

protected VectorG getCij()
For daughter classes: access to the linear transformation matrix.


getPixelArea

public double getPixelArea(VectorG pxpy)
The pixel area is the determinant of the c_ij, no dependency on input vector The vector of cij in the order c00, c11, c01, c10.

Specified by:
getPixelArea in class WcsProjection