WCSTools libwcs WorldCoor Data Structure

Parameter Data Type Description FITS keyword
or subroutine
xref double X reference coordinate value (deg) CRVAL1
yref double Y reference coordinate value (deg) CRVAL2
xrefpix double X reference pixel CRPIX1
yrefpix double Y reference pixel CRPIX2
xinc double X coordinate increment (deg) CDELT1
yinc double Y coordinate increment (deg) CDELT2
rot double counterclockwise rotation around axis (deg) CROTA2
cd[4] double rotation matrix CDi_j
dc[4] double inverse of rotation matrix wcsinit()
equinox double Equinox of coordinates default to 1950.0 EPOCH
epoch double Epoch of coordinates default to equinox DATE-OBS
nxpix double Number of pixels in X-dimension of image NAXIS1
nypix double Number of pixels in Y-dimension of image NAXIS2
plate_ra double Right ascension of plate center
plate_dec double Declination of plate center
plate_scale double Plate scale in arcsec/mm
x_pixel_offset double X pixel offset of image lower right
y_pixel_offset double Y pixel offset of image lower right
x_pixel_size double X pixel_size
y_pixel_size double Y pixel_size
ppo_coeff[6] double pixel to plate coefficients for DSS
x_coeff[20] double X coefficients for plate model
y_coeff[20] double Y coefficients for plate model
xpix double X (RA) coordinate (pixels) wcs2pix()
ypix double Y (dec) coordinate (pixels) wcs2pix()
zpix double Z (face) coordinate (pixels) wcs2pix()
xpos double X (RA) coordinate (deg) pix2wcs()
ypos double Y (dec) coordinate (deg) pix2wcs()
crpix[4] double Values of CRPIXn keywords CRPIXn
crval[4] double Values of CRVALn keywords CRVALn
cdelt[4] double Values of CDELTn keywords CDELTn
pc[16] double Values of PCiiijjj keywords PCiiijjj
projp[10] double Constants for various projections
longpole double Longitude of North Pole in degrees
latpole double Latitude of North Pole in degrees
rodeg double Radius of the projection generating sphere
imrot double Rotation angle of north pole wcsinit(),
wcscdset(),
wcspcset(),
wcscdeltset()
pa_north double Position angle of north (0=horizontal) wcsinit(),
wcscdset(),
wcspcset(),
wcscdeltset()
pa_east double Position angle of east (0=horizontal) wcsinit(),
wcscdset(),
wcspcset(),
wcscdeltset()
imflip int If not 0, image is reflected around axis wcsinit(),
wcscdset(),
wcspcset(),
wcscdeltset()
prjcode int projection code (-1-32)
latbase int Latitude base 90 (NPA), 0 (LAT), -90 (SPA)
ncoeff1 int Number of x-axis plate fit coefficients
ncoeff2 int Number of y-axis plate fit coefficients
changesys int 1 for FK4->FK5, 2 for FK5->FK4, 3 for FK4->galactic, 4 for FK5->galactic
printsys int 1 to print coordinate system, else 0
ndec int Number of decimal places in PIX2WCST
degout int 1 to always print degrees in PIX2WCST
tabsys int 1 to put tab between RA & Dec, else 0
rotmat int 0 if CDELT, CROTA; 1 if CD
coorflip int 0 if x=RA, y=Dec; 1 if x=Dec, y=RA
offscl int 0 if OK, 1 if offscale
wcson int 1 if WCS is set, else 0
naxes int Number of axes in image NAXIS
oldwcs int 1 to use worldpos() and worldpix() instead of Mark Calabretta's WCSLIB subroutines
linmode int 0=system only, 1=units, 2=system+units
detector int Instrument detector number
instrument char[32] Instrument name INSTRUME
ctype char[4][9] Values of CTYPEn keywords CTYPEn
c1type char[8] 1st coordinate type code: RA--, GLON, ELON CTYPE1
c2type char[8] 2nd coordinate type code: DEC-, GLAT, ELAT CTYPE2
ptype char[8] projection type code: SIN, TAN, ARC, NCP, GLS, MER, AIT, etc CTYPE1
units char[4][32] Units if LINEAR CUNITn
radecsys char[32] Reference frame: FK4, FK4-NO-E, FK5, GAPPT*/ RADECSYS,
EPOCH,
or EQUINOX
radecout char[32] Output reference frame: FK4,FK5,GAL,ECL radecsys
char[32] radecin Input reference frame: FK4,FK5,GAL,ECL radecsys
eqin double Input equinox (match sysin if 0.0) equinox
eqout double Output equinox (match sysout if 0.0) equinox
int syswcs Image coordinate system code RADECSYS,
EPOCH,
or EQUINOX
sysin int Input coordinate system code syswcs
sysout int Output coordinate system code WCS_B1950, WCS_J2000, WCS_GALACTIC, WCS_ECLIPTIC, WCS_LINEAR, WCS_ALTAZ syswcs
center char[32] Center coordinates (with frame)
wcsl struct wcsprm WCSLIB main projection parameters
lin struct linprm WCSLIB image/pixel conversion parameters
cel struct celprm WCSLIB projection type
prj struct prjprm WCSLIB projection parameters
lngcor struct IRAFsurface * RA/longitude correction structure
latcor struct IRAFsurface * Dec/latitude correction structure
command_format char *[10] WCS command formats
where %s is replaced by WCS coordinates, %f is replaced by the image filename, and %x is replaced by image coordinates

Coordinate systems

WCS_J2000 J2000 = FK5 0
WCS_B1950 B1950 = FK4 1
WCS_GALACTIC Galactic 2
WCS_ECLIPTIC Ecliptic 3
WCS_ALTAZ Altitude and Azimuth 4
WCS_LINEAR Linear (output uses units) 5

Conversions among hours of RA, degrees and radians

Degrees to Radians degrad(x) ((x)*PI/180.)
Radians to Degrees raddeg(x) ((x)*180./PI)
Hours to Degrees hrdeg(x) ((x)*15.)
Degrees to Hours deghr(x) ((x)/15.)
Hours to Radians hrrad(x) degrad(hrdeg(x))
Radians to Hours radhr(x) deghr(raddeg(x))
Where PI = 3.141592653589793238462643


Last updated September 14, 1998 by Doug Mink dmink@cfa.harvard.edu

Telescope Data Center [WCSTools Subroutines]