;+ ; NAME: ; mkastinfo ; PURPOSE: (one line only) ; Generate a simple astrometric description of an image ; DESCRIPTION: ; CATEGORY: ; Astrometry ; CALLING SEQUENCE: ; mkastinfo,racen,deccen,xcen,ycen,scale,info ; INPUTS: ; racen - Right ascension of the center of the array, also assumed to ; be the tangent plane point for the xi,eta to ra,dec ; transformation. Can be provided in radians or as a ; sexigesimal string. ; deccen - Declination of the array center. Same input options as racen. ; xcen - X coordinate of the array center ; ycen - Y coordinate of the array center ; scale - Scale of the image in arcsec/pixel ; ; OPTIONAL INPUT PARAMETERS: ; XFLIP - flag, if set reverses the x axis ; YFLIP - flag, if set reverses the y axis ; POSANG - Rotation angle between x,y and xi,eta, in degrees, gives ; the position angle of the y axis on the sky measured ; east of north. ; ; Note: the posang rotation is applied BEFORE either axis is flipped. ; Then, the flip is applied to the rotated system. ; ; RENORMFAC - Renormalization factor for the x,y coordinates. The default ; is 1.0 and rarely needs to be otherwise for the synthetic ; astrometric solution generated by this routine. ; ; KEYWORD INPUT PARAMETERS: ; OUTPUTS: ; info - This is an anonymous structure compatible with the astrometry ; routines (eg., astsn2xy, astsn2rd, and so on). This structure ; defines a full, strictly linear coordinate transformation ; intended for describing synthetic or linearized images. ; ; KEYWORD OUTPUT PARAMETERS: ; COMMON BLOCKS: ; SIDE EFFECTS: ; RESTRICTIONS: ; This routine is not intended for fitting images so it does not attempt ; to provide access and control of the full power of the transformation. ; Only linear descriptions are generated and the tangent point is always ; intended to be in the center of the array. ; PROCEDURE: ; MODIFICATION HISTORY: ; Written by Marc W. Buie, Southwest Research Institute, 2009/11/15 ; 2009/12/02, MWB, changed to consolidate xiterms and etaterms into one. ;- pro mkastinfo,in_racen,in_deccen,xcen,ycen,scale,info, $ XFLIP=xflip,YFLIP=yflip,POSANG=in_posang,RENORMFAC=renormfac self='mkastinfo: ' if badpar(in_racen,[4,5,7],0,caller=self+'(racen) ',type=ratype) then return if badpar(in_deccen,[4,5,7],0,caller=self+'(deccen) ',type=dectype) then return if badpar(xcen,[2,3,4,5],0,caller=self+'(xcen) ') then return if badpar(ycen,[2,3,4,5],0,caller=self+'(ycen) ') then return if badpar(scale,[2,3,4,5],0,caller=self+'(scale) ') then return if badpar(xflip,[0,1,2,3],0,caller=self+'(XFLIP) ',default=0) then return if badpar(yflip,[0,1,2,3],0,caller=self+'(XFLIP) ',default=0) then return if badpar(in_posang,[0,2,3,4,5],0,caller=self+'(POSANG) ', $ default=0) then return if badpar(renormfac,[0,2,3,4,5],0,caller=self+'(RENORMFAC) ', $ default=1.0d0) then return if ratype eq 7 then racen=raparse(in_racen) else racen=in_racen if dectype eq 7 then deccen=decparse(in_deccen) else deccen=in_deccen posang = double(in_posang)/!radeg if xflip then xf = -1.0d0 else xf = 1.0d0 if yflip then yf = -1.0d0 else yf = 1.0d0 cxi = -1.0d0*xf*[ cos(posang), -1.0d0*sin(posang)]*scale ceta = yf*[ sin(posang), cos(posang)]*scale info = { $ renormfac: renormfac, $ cxi: [0.0d0,cxi], $ ceta: [0.0d0,ceta], $ prot: 0.0d0, $ terms: ['const','x','y'], $ xcref: double(xcen), $ ycref: double(ycen), $ raref: racen, $ decref: deccen $ } end