astro
Class WcsProjection

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by astro.WcsProjection
All Implemented Interfaces:
Cloneable, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, VectorFunction
Direct Known Subclasses:
WcsProjection.EulerRotation, WcsProjection.Gnomonic, WcsProjection.LinearPixelProjection, WcsProjection.ThreeStepWcs

public abstract class WcsProjection
extends PropertyBundles
implements VectorFunction

A wcs projection normally converts pixel on the CCD to ra/de. Because this is a 2D to 2D mapping, one could in principle also use an inversion to get from ra de to pixels, but main use is with the forward approach to solve for a WCS in an image.

According to Calabretta and Greisen A&A 395, 1077 (2002), the transformation to get from pixel coordinates to celestial coordinates is split into three steps:

The most common case, LinearWcs is a concatination of a LinearIntermediate, followed by a Gnomonic projection, followed by an EulerRotation. It has in the minimal case two parameter for scaling the pixel axis to intermediate world coordinates and two parameters as the native pole coordiantes in the euler rotation, at maximum two parameters more describing the rotation of the coordinate system. Note that generally the parameters, which are often supplied by a solver routine, should reflect the concatination of transformation, LinearWcs, if constructed with distortion and shear interprets the parameters as c00,c11,c01,c10,α_p and δ_p. If constructed with scaling only, c00=c11=scale and c01=c10=0. thus scale,α_p and δ_p. If constructed with distortion, c01=c10=0, thus c00,c11,α_p and δ_p. If constructed with rotation, c00=c11=scale*cos(rot) and c01=-scale*sin(rot), c10=scale*sin(rot), thus scale,rot,α_p and δ_p. If constructed with distortion and rotation, c00=scale1*cos(rot), c11=scale2*cos(rot), c01=-scale2*sin(rot), c10=scale1*sin(rot), thus scale1, scale2, rot,α_p and δ_p.

An essential part of a WCS projection is also parsing a fits headers via special fits header keys. These names might be different for different fits sources, thus all projection support a properties look-up table that links unique key names to the key names used in this special fits file. For standard fits headers, this is an key=value mapping, as returned by getStandardKeys().


Nested Class Summary
static class WcsProjection.EulerRotation
          A Euler rotation, defined by the coordinates of the native pole.
static class WcsProjection.Gnomonic
          The gnomic projection is the oldest known azimuthal projection.
static class WcsProjection.LinearGnomonicRaDe
          A combination from a full-linear projection from pixel space to intermediate world coordinates, followed by a gnomic projection and a euler rotation to get to ra and dec.
static class WcsProjection.LinearPixelProjection
          The linear transformation from pixel space to intermediate world coordinates.
static class WcsProjection.PolynomialGnomonicRaDe
          A combination from a full-polynomial projection from pixel space to intermediate world coordinates .
static class WcsProjection.PolynomialPixelProjection
          This now fits intermediate world coordinates from pixel coordinates with Legendre polynomials such that the pixel coordinates are slightly distorted before calculating the intermediate coordinates.
static class WcsProjection.ReadWcs
          A test for reading and interpreting header cards that describe a pure linear pixel-to-intermediate transformation, a gnomic projection and finally a rotation to yield ra and dec.
static class WcsProjection.ThreeStepWcs
          A combination put together from three individual WcsProjections, a pixel projection that transfers CCD-pixel into intermediate world coordinates, a true geometric projection (like Gnomonic) and a final rotation to yield coordinates in a known space.
static class WcsProjection.VariableGnomonicRaDe
          A combination from a full-linear projection from pixel space to intermediate world coordinates with varying projection center.
static class WcsProjection.VariablePixelProjection
          It turned out, that the quality of the WCS solution is highly dependant on the correct position of the native pole, rj.
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static double DEFPARAMETERSCALE
          Default property value.
static String KEY_PARAMETERSCALE
          The parameters length scale as a multiple of the length.
private  VectorG parameters
          The parameters of the projection we depend on.
 
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
protected WcsProjection()
          Constructs a new WCS projection.
protected WcsProjection(Map<String,String> u2f)
          Constructs a new WCS projection specifying individual fits key names for our unique names.
 
Method Summary
 int argumentDimension()
          We have a two-dimensional pixel space.
abstract  VectorG estimateParameters(nom.tam.fits.Header h)
          Estimates (starting) parameters from a fits header.
 VectorG estimateParameterScales(VectorG start)
          Length scales of the parameters.
 int functionDimension()
          The dimension of the projection is two.
abstract  Collection<nom.tam.fits.HeaderCard> getCards()
          Converts the parameters into a collection of header cards.
 VectorG getParameters()
          Gets the parameters of this projection.
abstract  double getPixelArea(VectorG pxpy)
          This is the pixel size, which is determined out of the Jacobian determinant of the projection.
static Map<String,String> getStandardKeys()
          Returns a standard mapping of keys.
abstract  boolean parseHeader(nom.tam.fits.Header h)
          Parses parameters from a fits header.
 void setParameters(VectorG p)
          Sets the parameters of the projection.
 
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 vec_math.VectorFunction
evaluate
 
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

KEY_PARAMETERSCALE

public static final String KEY_PARAMETERSCALE
The parameters length scale as a multiple of the length.

See Also:
Constant Field Values

DEFPARAMETERSCALE

private static final double DEFPARAMETERSCALE
Default property value.

See Also:
Constant Field Values

parameters

private VectorG parameters
The parameters of the projection we depend on.

Constructor Detail

WcsProjection

protected WcsProjection()
Constructs a new WCS projection.


WcsProjection

protected WcsProjection(Map<String,String> u2f)
Constructs a new WCS projection specifying individual fits key names for our unique names.

Method Detail

getStandardKeys

public static Map<String,String> getStandardKeys()
Returns a standard mapping of keys.


getParameters

public VectorG getParameters()
Gets the parameters of this projection.


setParameters

public void setParameters(VectorG p)
Sets the parameters of the projection.


functionDimension

public int functionDimension()
The dimension of the projection is two.

Specified by:
functionDimension in interface VectorFunction

argumentDimension

public int argumentDimension()
We have a two-dimensional pixel space.

Specified by:
argumentDimension in interface VectorFunction

getPixelArea

public abstract double getPixelArea(VectorG pxpy)
This is the pixel size, which is determined out of the Jacobian determinant of the projection. Note that due to det(A*B)=det (A)*det (B) this also holds for composed projections.


parseHeader

public abstract boolean parseHeader(nom.tam.fits.Header h)
                             throws nom.tam.fits.HeaderCardException
Parses parameters from a fits header.

Throws:
nom.tam.fits.HeaderCardException

estimateParameters

public abstract VectorG estimateParameters(nom.tam.fits.Header h)
                                    throws nom.tam.fits.HeaderCardException
Estimates (starting) parameters from a fits header.

Throws:
nom.tam.fits.HeaderCardException

estimateParameterScales

public VectorG estimateParameterScales(VectorG start)
Length scales of the parameters. In the default implementation we simply take the length of the vector and multiply it with KEY_PARAMETERSCALE.


getCards

public abstract Collection<nom.tam.fits.HeaderCard> getCards()
                                                      throws nom.tam.fits.HeaderCardException
Converts the parameters into a collection of header cards.

Throws:
nom.tam.fits.HeaderCardException