function gt_center, item, cmd=cmd, hxa=hxa, $ roll=roll, $ helio=helio, angle=angle, string=string, hxt=hxt, $ x=x, y=y, pfi_strip=pfi_strip, $ suncenter=suncenter, use_history=use_history ; ; corner = gt_corner(item) ;need to allow roadmap to be input for gt_corner shape = gt_shape(item, obs_region=1-keyword_set(pfi_strip) ) res = 2^gt_res(item) ; if ((not keyword_set(pfi_strip)) and (not his_exist(item))) then begin ins = gt_or_expnum(item) corner(1,*) = corner(1,*) - (ins-1)*64 ;move the Y corner back to the lower left of the whole observing region end ; out = corner out(0,*) = out(0,*) + res * (shape(0,*)-1) / 2. out(1,*) = out(1,*) + res * (shape(1,*)-1) / 2. ; if (keyword_set(use_history)) then suncenter = gt_sxt_cen(item) ; ;"corner" is address of the center of the lower left pixel ;for an image 3 pixels wide, the center is in the second pixel, which ;is only ONE pixel over. This explains the "shape-1". ; if (keyword_set(helio)) then out = conv_p2h(out, item, cmd=cmd, hxa=hxa, roll=roll, suncenter=suncenter, $ string=string) if (keyword_set(angle)) then out = conv_p2a(out, item, cmd=cmd, hxa=hxa, roll=roll, suncenter=suncenter) if (keyword_set(hxt)) then out = conv_p2hxt(out) ; if (keyword_set(x)) then out = reform(out(0,*)) if (keyword_set(y)) then out = reform(out(1,*)) return, out end