;+
; NAME        : EIT_SUB_UTIL_COOR
;
; PURPOSE     : Set of the arcsec data coord. system for EIT images.
;
; CATEGORY    :
;
; EXPLANATION : 
;
; SYNTAX      : 
;
; EXAMPLES    : none
;
; CALLED BY   :
;
; CALLS TO    : none
;
; ARGURMENTS  :	none
;
; KEYWORDS    : OLD_POINT 	if set, use pre recentering (sun more north) coords.
;
; OUTPUTS     : none
;
; COMMON      : none
;
; RESTRICTIONS: none
;
; SIDE EFFECTS: none
;
; PROJECT     : SOHO - EIT
;
; HISTORY     : V1,  Elaine Einfalt (HSTX)
;		1998 Jan - eitnfalt- added old_point keyword
;
; CONTACT     : eit@xanado.nascom.nasa.gov
;-

pro EIT_SUB_UTIL_COOR, resize_x=resize_x, old_point=old_point

 ;
 ; Set up the data coordinate system in arcsec
 ;

 range = findgen(1024) * 2.6	; assumes square images

 ; Pixel that contains sun center in eit FOV. Note: Y_SC_PIX is from the top

 ok = EIT_SUB_SC_PIXEL( x_sc_pix, y_sc_pix, date, old_point=old_point)

;95/7 xfov = 1024/2 * 2.6 		; pixel of EIT's xcen, converted to arcsec 
;95/7 yfov = 1024/2 * 2.6		; pixel of EIT's ycen, converted to arcsec

 x_sc_arc = x_sc_pix * 2.6 		; pixel of EIT's xcen, converted to arcsec 
 y_sc_arc = (1024-y_sc_pix) * 2.6	; pixel of EIT's ycen, from the top (arcsec)

 xcoor = range - x_sc_arc 		; FOV (about -1331 to +1331 east to west)
 ycoor = range - y_sc_arc		; FOV (about -1331 to +1331 south to north)


 plot, xcoor, ycoor, xstyle=5, ystyle=5, /noerase, /nodata, /device, $
	            position=[0,0, resize_x, resize_x]
		   
 axis,xax=0,0,0,xstyle=1  &  axis,yax=0,0,0,ystyle=1	; for debugging

return
end
