;;Find images for sn1998ep: Strauss tracker,auto=['n','sn1998ba'],images=images fname1 = images[7] fname2 = images[12] st = freadimage2(ims1,im1,fname1,head1) st = freadimage2(ims2,im2,fname2,head2) ;;Check out the information in ims1 help,ims1,/str print,ims1.apmkx ;;'Reduce' them : find object, etc. st = freduceimage2(ims1,im1,pho1) st = freduceimage2(ims2,im2,pho2) ;;Check out ims1 again -- now there is apm information print,ims1.apmkx ;;Get information about our candidate st = getcandinfo('sn1998ba',cand) help,cand,/str ;;Show all the objects on the image autosurface2,ims1,im1 frame,im1,zero=0.0,span=ims1.sigma*4.0 boxdata,20,pho1.x,pho1.y,colordex('green'),/circ ;;Find candidate on image frame,im1,zero=0.0,span=ims1.sigma*4.0 xyradec,candx,candy,cand.ra,cand.dec,image=fname1,epoch=2000,/reverse boxdata,60,candx,candy,colordex('red') frame,im1[candx-100:candx+100,candy-100:candy+100],zero=0.0,$ span=ims1.sigma*20.0,offset=[candx-100,candy-100] boxdata,10,candx,candy,colordex('green'),/hair ;;Read transform between images print,readtransimages2(trns12,trns21,fname1,fname2) ;;Make a transformation st = ftransimages2([ims1,ims2],[fname1,fname2],trns,/nosave) ;;Transformation from image 0 to image 0 help,trns help,trns[0,0],/str print,trns[0,0].kx ;;Transformation from image0 to image1 help,trns[0,1],/str print,trns[0,1].kx ;;Calculate one position pho = {star_struct} pho.x = 300.0 & pho.y = 300.0 phonew = transpho2(trns[0,1],pho) print,phonew.x,phonew.y ;;Evaluate a transformation autosurface2,ims2,im2 st=ftranseval2(ims1,ims2,pho1,pho2,trns[0,1],matched,medresid,/graph,$ plotimage=im2,zero=0.0,span=ims2.sigma*3.0) st=ftranseval2(ims1,ims2,pho1,pho2,trns[0,1],matched,medresid,/graph) ;;Do one by hand st = ftransimages2([ims1,ims2],[fname1,fname2],trns,/nosave,/manual) ;;Transform image1 to image2 !P.MULTI=[0,2,2] frame,im1[100:250,100:250],z=0.0,span=ims1.sigma*4.0,title=fname1 frame,im2[100:250,100:250],z=0.0,span=ims2.sigma*4.0,title=fname2 newim = moveimagespline2(ims1,ims2,trns[1,0],im1) frame,newim[100:250,100:250],z=0.0,span=ims1.sigma*4.0,$ title=fname1 + ' moved' ;;Investigating the APM solution ;;Read the APM solution into some trns structs st = freduceimage2(ims1,im1,fname1,trnsa1,trns1a) ;;Figure out the pixel scale and image size pho = {star_struct} pho.x = ims1.nx / 2.0 & pho.y = ims1.ny / 2.0 scalepho = apmscale2(ims1,pho) scale = sqrt(scalepho.x * scalepho.y) ;;Calculate size of image in arcmin fielddia = ims1.nx * scale / 60 ;;Get USNO information apm = getusnostars( ims1.ra, ims1.dec, ims1.epoch, fielddia,fielddia) help,apm help,apm,/str !P.MULTI = [0,2,2] frame,im1,zero=0.0,span=ims1.sigma*4.0,title=fname1 ;;Make fake APM image apmim = makeapmimage(apm) frame,apmim,title='APM image' ;;Apmeval !P.MULTI = 0 apmeval2,ims1,trnsa1,trns1a,pho1,apm,image=im1