PRO tolatlon,image,h,sat,device=device ; ; This procedure takes the name of an image file, an assumed emission ; height (km), and a satellite name (strict SpaceTrack format), and ; plots the specified image in geographic coordinates, with the ; trajectory of the specified satellite overplotted on the projected ; image. The satellite name is optional. If keyword device is ; set, the plot goes to the specified device, otherwise the default ; device is 'X'. ; ; Note that variable names that correspond to large arrays having ; outlived their usefulness are reassigned to short strings to save ; memory. ; t0=SYSTIME(1) ; set 'decimation' factor to speed up processing ff=2 ; edge length of 'decimated' image l=256L/ff ; read in image and subtract dark frame PRINT,'Read image and subtract dark frame...' rdkimg,image,hb,i head=gethd(hb) cam=head.misc.cam exp=head.misc.exp_scale*head.exp.exposure/1000. rdmeandk,cam,exp,dk1 i=(i-dk1)>0 dk1='empty' ; 'decimate' the image bi=REBIN(i,l,l) i='empty' ; plot the 'decimated' image for comparison loadct,13 IF (NOT KEYWORD_SET(device)) OR (STRUPCASE(device) EQ 'X') THEN BEGIN WINDOW,2 TVSCL,REBIN(ROTATE(bi,2),512,512) ENDIF PRINT,SYSTIME(1)-t0,' seconds elapsed...' ; create arrays giving the column and row numbers of all pixels PRINT,'Make azimuth and zenith angle maps...' w=REFORM(TEMPORARY(INDGEN(l^2)),l,l) one2two,w,bi,col,row w='empty' ; parameters of the star fit for camera 0 c0=130.575/ff r0=126.297/ff r=203.723/ff k=0.626410 ca=0.229637 ; apply the inverse transformation, from col/row to az/za dc=col-REPLICATE(c0,l,l) col='empty' dr=row-REPLICATE(r0,l,l) row='empty' rho=SQRT(dc^2+dr^2)