function hsi_as_fss2sas, p

;scale_factor = 0.967403d
;
;phi= -0.19677042d
;dx = -3.2773388d
;dy =  0.87709285d
;
;return, [[ x*cos(phi)+y*sin(phi)+dx ], $
;         [-x*sin(phi)+y*cos(phi)+dy ] ]


;phix   = -0.18002370d  ; [radian]
;phiy   = -0.18625397d  ; [radian]
;scalex =  0.96428014d  ; factor
;scaley =  0.96421163d  ; factor
;deltax =  0.77745958d  ; [arcsec]
;deltay =  0.0000000d   ; [arcsec]

;return, [[ p[*,0]*scalex*cos(phix) + p[*,1]*scaley*sin(phiy) + deltax ] , $
;         [-p[*,0]*scalex*sin(phix) + p[*,1]*scaley*cos(phiy) + deltay ]]


; out of fit_fss_sas using data t0 =  1-May-2003 22:47:06.014
;     -0.27713588     -0.27366842      0.97286204      0.95191119
;       1.6312901       2.3804583     -0.42405250

; time_fss -0.42405250 = time_sas

;phix   = -0.27713588d  ; [radian]
;phiy   = -0.27366842d  ; [radian]
;scalex =  0.97286204d  ; factor
;scaley =  0.95191119d  ; factor
;deltax =  1.6312901d   ; [arcsec]
;deltay =  2.3804583d   ; [arcsec]


; out of fit_sas_sas using  1-Apr-2003 01:23:27.708 + [199.87500, 3819.8750]
;   -0.0047209218    0.0066967681      0.95558848      0.96832470  
;     36.211073       49.298419

;phix   =   -0.0047209218d0 ; [radian]
;phiy   =    0.0066967681d0 ; [radian]
;scalex =    0.95558848d0   ;  factor
;scaley =    0.96832470d0   ; factor
;deltax =   36.211073d0     ; [arcsec]
;deltay =   49.298419d0     ; [arcsec]

;return, [[ p[*,0]*scalex*cos(phix) + p[*,1]*scaley*sin(phiy) + deltax ] , $
;         [-p[*,0]*scalex*sin(phix) + p[*,1]*scaley*cos(phiy) + deltay ]]

; 2006-06-13
; change the average scale factor to be 1.0  (for offsets between 3 and 5 degrees)
;   from mapping of A535 pulsar at above offsets.
; other parameters not changed.

; !!! changed scale[x,y] back !!!!!

phix   =   -0.0047209218d0 ; [radian]
phiy   =    0.0066967681d0 ; [radian]
;scalex =    0.99338004d0   ;  factor
;scaley =    1.00661996d0   ; factor
scalex =    0.95558848d0   ;  factor
scaley =    0.96832470d0   ; factor
deltax =   36.211073d0     ; [arcsec]
deltay =   49.298419d0     ; [arcsec]

return, [[ p[*,0]*scalex*cos(phix) + p[*,1]*scaley*sin(phiy) + deltax ] , $
         [-p[*,0]*scalex*sin(phix) + p[*,1]*scaley*cos(phiy) + deltay ]]

end
