- NAME
HPRECESS
- PURPOSE
Precess the astrometry in a FITS header to a new equinox
- CALLING SEQUENCE
HPRECESS, HDR, [ yearf ]
- INPUT-OUTPUT
HDR - FITS Header, must contain the CRVAL astrometry keywords,
and either an EPOCH or EQUINOX keyword.
HDR will be modified to contain the precessed astrometry
- OPTIONAL INPUT
YEARF - Scalar, giving the year of the new (Final) equinox.
If not supplied, user will be prompted for this value.
- METHOD
The CRVAL and CD (or CROTA) keywords are extracted from the header
and precessed to the new equinox. The EPOCH or EQUINOX keyword in
the header is updated. A HISTORY record is added
- RESTRICTIONS
The FK5 reference frame is assumed for both equinoxes.
- PROCEDURES USED
EXTAST, GET_EQUINOX(), SXADDPAR, SXADDHIST, PRECESS, PRECESS_CD
PUTAST, ZPARCHECK
- REVISION HISTORY
Written W. Landsman STX July, 1988
CD matrix precessed - February, 1989
Update EQUINOX keyword when CROTA2 present November, 1992
Recognize a GSSS header June, 1994
Additional Noparams value recognize for storing CDs. RSH, 6 Apr 95
Understand reversed X,Y (X-Dec, Y-RA) axes, W. Landsman October 1998
Correct algorithm when CROTA2 is in header W. Landsman April 2006
Correct sign error introduced April 2006, include CDELT values
when computing rotation of pole W. Landsman July 2007
Call hprecess/jprecess for 1950<>2000 W. L. Aug 2009
Work when ASTR.LONGPOLE NE 180.0 W.L. Aug 2014
- EAR of Initial equinox
- xtract astrometry from header
- heck if non-standard CTYPE was used
- est if RA and Dec reversed in 'CTYPE*'
- recess the CRVAL coordinates
- recess the CD matrix
- pdate CRVAL values
- pdate CD values
- r CROTA2 value