; file: ha_304_align.pro ; init: Oct 11 2011 RJR ; note: not a program but a log file ; straight copy from ca-1700-align.pro ; assuming AIA 1700 and 304 are well-aligned... they are after aia_prep ; read and calibrate 304 image sdodatapath='/home/rutten/data/SDO/2010-09-27/selection/' sdofile='aia.lev1_hgpatch_2010-09-27T13:54:45.58Z_304_image_lev1.fits' aia_prep,sdodatapath+sdofile,-1,ind304,im304 ;; ; scale intensity with Schrijver recipe ;; exp304 = ind304.aimgshce / 1000. ;; sca304=aia_intscale(im304,exptime=exp304,wave=304) ; rotate back over solar P angle r304=rot(im304,-25.7) ; read DOT aligned ha image dotpath='/home/rutten/rr/wrk/DOT/2010-09-27/fits/' rdfits,ha,dotpath+'alha.fits' ; compare the two FOVs window,0,xs=800,ys=600 plot_image,ha window,1,xs=800,ys=600 plot_image,alog10(r304) ; hard to see ; cut out smaller FOV containing DOT FOV following 1700 c304=r304[175:375,475:675] ; rescale AIA image sizecut=size(c304) nx=sizecut[1] ny=sizecut[2] newnx=fix(nx*0.600/0.071+0.5) newny=fix(ny*0.600/0.071+0.5) res304=congrid(c304,newnx,newny,cubic=-0.5) ; check window,0,xs=1000,ys=800 plot_image,alog10(res304) window,1,xs=1000,ys=800 plot_image,ha ; scale temporarily with alog10 l304=alog10(res304) ; scales seem OK. Try big shift ;; shift=manblinkshift(ha,n304) ; on big bright blob; yes, scales nearly good, rot also shift=[266,514] sh304=shift(l304,-shift) ; check window,0,xs=1000,ys=800 flicker,ha,sh304,1 ; so feature alignment ref_pic=ha pic=sh304 delvar, ref_points, f_points .run find_points fa={X:float(ref_points),Y:float(f_points)} p=[900.,300., 0., 1., 0., 0.] ;; pivot = bright bob used in manblinkshift pi = replicate({fixed:0b, limited: [1b, 1b], limits: [1.,1.]},6) pi(0:1).fixed=1 ; set limits to search space: .18 = 10 deg angle; 5% in scale, 30 px pi.limits(0)=[900.,300.,-.18,0.95,-30,-30] ; same pivot coordinates pi.limits(1)=[900.,300.,.18,1.05,30,30] p1=mpfit('rsf',p,functargs=fa,parinfo=pi,/quiet) ; check print,p1 ; ALWAYS insert the result so you don't have to repeat manual business ; 900.000 300.000 0.0667365 0.971602 3.71157 10.5241 ; p1= [900.000, 300.000, 0.0667365, 0.971602, 3.71157, 10.5241] plot,f_points[0,*],f_points[1,*],psy=1 plots,rsff(p1,ref_points),psy=4 ; this is how to shift reference to pic, so reverse the result in applying pic1 = shift(rot(pic,-p1[2]*!radeg, 1./p1[3],p1[0],p1[1],/pivot),$ round(-p1[4]),round(-p1[5])) ; check with flicker window,xsi=1000,ysi=800 flicker,ref_pic,pic1,1 ; cut edges from 304 (same as before so other do not change) sizeref=size(ref_pic) nx=sizeref[1] ny=sizeref[2] alpic=pic1[0:nx-1,0:ny-1] alref=ref_pic flicker,alref,alpic,1 ; write result fitspath='/home/rutten/rr/wrk/DOT/2010-09-27/fits/' writefits,fitspath+'al304.fits',alpic ; check window,xsi=1000,ysi=800 rdfits,gb,fitspath+'algb.fits' rdfits,ca,fitspath+'alca.fits' rdfits,ha,fitspath+'alha.fits' rdfits,al1700,fitspath+'al1700.fits' rdfits,a304,fitspath+'al304.fits' flicker,gb,ca,1 flicker,ca,ha,1 flicker,ca,a1700,1 flicker,ca,a304<3,1 flicker,ha,a304<3,1 tvscl,a304 tvscl,sqrt(10^a304) flicker,ca,sqrt(10^a304),1 flicker,ha,sqrt(10^a304),1 flicker,a304,sqrt(10^a304),1 ; greyscale a304 OK