Viewing contents of file '../idllib/uit/pro/astscale.pro'
pro astscale,name,hd,scalefac=scalefac
;+
; NAME:
;    ASTSCALE
; PURPOSE:
;    Transfer astrometry from condensed image to full-resolution image,
;    or between any two images differing _only_ in plate scale.
;    Astrometry is transferred from header in an array to header on disk.
; CALLING SEQUENCE:
;    astscale,name,hd,scalefac=scalefac
; INPUT PARAMETERS:
;    name = filename of destination image header on disk (without .hhh)
;    hd   = header array with astrometry (e.g., produced by VIDEO)       
; OPTIONAL INPUT PARAMETERS:
;    scalefac (keyword) = size of disk image/size of image on which
;                         astrometry was done (default = 4.0)
; OUTPUT PARAMETERS:  none
; COMMON BLOCKS:  none
; SIDE EFFECTS:   New version of name.HHH generated.
; PROCEDURE:  straightforward
; MODIFICATION HISTORY:
;    Written by R. S. Hill, Hughes STX Corp., 28-May-1992.
;-
if not keyword_set(scalefac) then scalefac=4.0
sxhread,name,h
extast,hd,cd,crp,crv
cd=cd/scalefac
crp = scalefac*(crp-0.5)+0.5
putast,h,cd,crp,crv
sxaddhist,'ASTSCALE:  astrometry transferred '+systime(),h
sxhwrite,name,h
return
end