atlGetPixelParams

Find typical values for " FITS-like" parameters describing a FrameSet

Description:

This function finds values that resemble the the FITS keywords CRVAL1/2/3.., CRPIX1/2/3..., CRDELT1/2/3... and CROTA2, on the assumption that the base Frame in the supplied FrameSet describe GRID coords (i.e. FITS pixel coords), and the current Frame describe the required WCS. It is not restricted to 2D FrameSets.

If the FrameSet can be written to a FitsChan successfully using FITS-WCS encoding, the the resulting keyword values are returned. Otherwise, the values are estimated by transforming closely spaced pixel positions along each axis. If the current Frame contains a SkyFrame, and the SkyFrame has a defined reference position, then this position specifies the returned CRVAL values. Otherwise, the reference position is assumed to be at the central pixel.

Invocation

void atlGetPixelParams( AstFrameSet fset, int dims, int degs, double crpix, double crval, double cdelt, double crota, int status )

Arguments

fset
The FrameSet.
dims
Pointer to an array supplied holding the number of pixels along each edge of the pixel array. The number of elements in this array should match the number of axes in the base Frame of " fset" .
degs
If non-zero, then the crval, cdelt and crota values for sky axes are returned in units of degrees. Otherwise they are returned in radians.
crpix
Pointer to an array returned holding the position of the reference pixel in the base Frame of " fset" . The number of elements in this array should match the number of axes in the base Frame of " fset" .
crval
Pointer to an array returned holding the position of the reference pixel in the current Frame of " fset" . The number of elements in this array should match the number of axes in the current Frame of " fset" .
cdelt
Pointer to an array returned holding the geodesic distance along each edge of the reference pixel, measured within the current Frame of " fset" . The number of elements in this array should match the number of axes in the base Frame of " fset" .
crota
Pointer to a double in which to return the angle from north in the current frame of " fset" to the second spatial pixel axis, measured positive through east. This will be returned set to AST__BAD if the current frame of " fset" does not contain a SkyFrame.
status
The global status.