; ; This function will find the exact time of a feature's position in a mk4 ; image during the 3 minute scan. ; FUNCTION findtime,header,exten,angle tstart=fxpar(header,'TIME-OBS') duration=fxpar(exten,'DURATION') direction=fxpar(exten,'BAR_DIR') pangle=fxpar(exten,'PANGLE') phase=30.0 duration=duration/60.0 time = DOUBLE(STR_SEP(tstart,':')) seconds=time(0)*3600+time(1)*60+time(2) IF (direction EQ -1) THEN $ ang = 360 - (angle - 180 + pangle + phase) IF (direction EQ 1) THEN $ ang = (angle-180+pangle+phase) IF (ang LT 0) THEN ang = ang + 360 IF (ang GT 360) THEN ang = ang - 360 truetime = seconds + (duration * (ang/360.0)) hr = FIX(truetime / (60 * 60)) mn = FIX(truetime / (60) - hr * 60) sec = FIX(truetime - ((hr * 60 + mn) * 60.0)) time_str=STRING(hr,mn,sec,FORMAT="(i2.2,':',i2.2,':',i2.2)") RETURN,time_str END