;+ ; NAME: ; POINTING_DRIFT_MONITOR ; PURPOSE: ; update the secular drift motions of Yohkoh pointing. Works ; on daily average values of the past pointing history ; CATEGORY: ; Yohkoh ; CALLING SEQUENCE: ; ccdcoord = pointing_drift_monitor(file=file,time_ref) ; INPUTS: ; file = sxtf summary file (eg, sxtf_upto_95128.genx) ; time_ref = time at which mean pointing is to be evaluated ; OPTIONAL (KEYWORD) INPUT PARAMETERS: ; ROUTINES CALLED ; CONGRID, RESTGEN, UTPLOT, POLY_FIT, INT2SECARR ; OUTPUTS: ; Full-resolution pixel coordinates of mean predicted Sun center ; COMMON BLOCKS: ; SIDE EFFECTS: ; RESTRICTIONS: ; MODIFICATION HISTORY: ; HSH, written 14 Dec. 1995 ;- function pointing_drift_monitor,file=file,time_ref,plot=plot,print=print,$ qstop = qstop restgen,file=file,struct=struct simp = struct.savegen0 ss = where(simp.coords(0) lt 560 and simp.coords(0) gt 520 and $ simp.coords(1) gt 550 and simp.coords(1) lt 620) n_days = max(int2secarr(simp(ss)))/8.64e4 xx = congrid(simp(ss).coords(0),n_days) yy = congrid(simp(ss).coords(1),n_days) tt = congrid(int2secarr(simp(ss)),n_days) xpara = poly_fit(tt,xx,1,xfit) ypara = poly_fit(tt,yy,1,yfit) if keyword_set(plot) then begin !p.multi = [0,2,1] utplot,tt,xx,simp(0),/ynoz,psym=-1 oplot,tt,xfit utplot,tt,yy,simp(0),/ynoz,psym=-1 oplot,tt,yfit !p.multi = 0 endif if keyword_set(print) then begin print,'X fit is ', xpara print,'Y fit is ', ypara endif deltat = max(int2secarr([fmt_tim(simp(0)),time_ref])) if keyword_set(qstop) then stop return,[xpara(0)+xpara(1)*deltat,ypara(0)+ypara(1)*deltat] end