! crude registration and mosaic construction rd 1 red/1r rd 2 red/2r rd 3 red/3r rd 4 red/4r rd 5 red/5r create 101 n=3*512 sr=1 sc=1 do i=1,5 copy $i+10 $i bin $i+10 bin=4 end_do ! Make rough mosaic for star identification add 101 11 dr=512 dc=512 add 101 12 dc=512 add 101 13 dc=512 dr=2*512 add 101 14 dc=2*512 dr=512 add 101 15 dr=512 do i=2,5 tv 101 printf 'Mark stars common between 1 and %i' i printf 'image 1: ' tv 1 mark 1 new ref printf 'Image %i: ' i tv $i mark color=2 exit mark $i new ref register 1 $i load header trans dc={i:x(01,1)} dr={i:x(01,2)} printf '%i %2f10.3' i dc dr >>./car.shift end_do ! Now create the final mosaic using the derived shifts open input ./car.shift create 101 n=3*512 sr=-512 sc=-512 create 102 n=3*512 sr=-512 sc=-512 skytot=0 do i=1,5 copy $i+10 $i if i>1 read input dc=@input.2 dr=@input.3 else dr=0 dc=0 end_if bin $i+10 bin=4 sky $i+10 sub $i+10 c=sky skytot=skytot+sky fixhead $i+10 origin shift $i+10 dr=dr/4-0.75 dc=dc/4-0.75 bilinear add 101 $i+10 div $i+10 $i+10 add 102 $i+10 end_do div 101 102 div 102 102 mul 102 c=skytot/5 add 101 102 end