;+ ;NAME: ; ALIGN_SUMMARY ;PURPOSE: ; Graphically and numerically evaluate the consistency of the alignments ; obtained by MOSES_ALIGN_ORDERS. Assumes that there are exactly 4 ; control points, corresponding roughly to the corners of the images, ; in the order LL, UL, LR, UR. By default, an image of the plot screen ; is saved as "align_summaryYYYYMMDDHHMMSS.jpg". ;CALLING SEQUENCE: ; align_summary [,alignment=alignment] [, nosave=nosave] ;OPTIONAL INPUT KEYWORDS: ; ALIGNMENT: The alignment structure provided by MOSES_ALIGN_ORDERS. If ; not supplied, alignment is obtained from mosesAlignOrders_snap.pro. ; NOSAVE: If set, then do not save the screen image. ;MODIFICATION HISTORY: ; 2006-May-30 C. Kankelborg. So far only m=-1 is included. ; 2006-Jun-20 C. Kankelborg. Added m=+1, changed image filename convention. ;- pro align_summary, alignment = alignment ;If alignment not provided, then restore latest intermediate save data ;from mosesAlignOrders: if n_elements(alignment) lt 4 then restore,'mosesAlignOrders_snap.sav' ;Cache the value of !P.MULTI: pmulti_old = !p.multi ;---------------------------------------- ;ORDER M = -1 LL=0 & UL=1 & LR=2 & UR=3 window, 1, title='align_summary, m = -1', xsize=1024, ysize=768 !p.multi = [0,2,2,0,0] tek_color ;For which exposures do we have alignment information? ss = where( alignment.minus.cpoints.x[0] ne 0.0 ) plot, alignment[ss].minus.cpoints.x[UL], alignment[ss].minus.cpoints.y[UL], $ title = 'Upper Left', psym=-1, /iso, linestyle=1, /ynozero, $ xtitle = 'X sdev = '+string(stdev(alignment[ss].minus.cpoints.x[UL])), $ ytitle = 'Y sdev = '+string(stdev(alignment[ss].minus.cpoints.y[UL])) oplot, [mean(alignment[ss].minus.cpoints.x[UL])], $ ;Red triangle marks center. [mean(alignment[ss].minus.cpoints.y[UL])], psym=5, color=2 plot, alignment[ss].minus.cpoints.x[UR], alignment[ss].minus.cpoints.y[UR], $ title = 'Upper Right', psym=-1, /iso, linestyle=1, /ynozero, $ xtitle = 'X sdev = '+string(stdev(alignment[ss].minus.cpoints.x[UR])), $ ytitle = 'Y sdev = '+string(stdev(alignment[ss].minus.cpoints.y[UR])) oplot, [mean(alignment[ss].minus.cpoints.x[UR])], $ ;Red triangle marks center. [mean(alignment[ss].minus.cpoints.y[UR])], psym=5, color=2 plot, alignment[ss].minus.cpoints.x[LL], alignment[ss].minus.cpoints.y[LL], $ title = 'Lower Left', psym=-1, /iso, linestyle=1, /ynozero, $ xtitle = 'X sdev = '+string(stdev(alignment[ss].minus.cpoints.x[LL])), $ ytitle = 'Y sdev = '+string(stdev(alignment[ss].minus.cpoints.y[LL])) oplot, [mean(alignment[ss].minus.cpoints.x[LL])], $ ;Red triangle marks center. [mean(alignment[ss].minus.cpoints.y[LL])], psym=5, color=2 plot, alignment[ss].minus.cpoints.x[LR], alignment[ss].minus.cpoints.y[LR], $ title = 'Lower Right', psym=-1, /iso, linestyle=1, /ynozero, $ xtitle = 'X sdev = '+string(stdev(alignment[ss].minus.cpoints.x[LR])), $ ytitle = 'Y sdev = '+string(stdev(alignment[ss].minus.cpoints.y[LR])) oplot, [mean(alignment[ss].minus.cpoints.x[LR])], $ ;Red triangle marks center. [mean(alignment[ss].minus.cpoints.y[LR])], psym=5, color=2 ;---------------------------------------- if (not keyword_set(nosave)) then begin ;Save a timestamped jpg of the plots, "align_minusYYYYMMDDHHMMSS.jpg" savescreen, name='align_minus', /date endif ;---------------------------------------- ;ORDER M = +1 LL=0 & UL=1 & LR=2 & UR=3 window, 2, title='align_summary, m = +1', xsize=1024, ysize=768 !p.multi = [0,2,2,0,0] tek_color ;For which exposures do we have alignment information? ss = where( alignment.plus.cpoints.x[0] ne 0.0 ) plot, alignment[ss].plus.cpoints.x[UL], alignment[ss].plus.cpoints.y[UL], $ title = 'Upper Left', psym=-1, /iso, linestyle=1, /ynozero, $ xtitle = 'X sdev = '+string(stdev(alignment[ss].plus.cpoints.x[UL])), $ ytitle = 'Y sdev = '+string(stdev(alignment[ss].plus.cpoints.y[UL])) oplot, [mean(alignment[ss].plus.cpoints.x[UL])], $ ;Red triangle marks center. [mean(alignment[ss].plus.cpoints.y[UL])], psym=5, color=2 plot, alignment[ss].plus.cpoints.x[UR], alignment[ss].plus.cpoints.y[UR], $ title = 'Upper Right', psym=-1, /iso, linestyle=1, /ynozero, $ xtitle = 'X sdev = '+string(stdev(alignment[ss].plus.cpoints.x[UR])), $ ytitle = 'Y sdev = '+string(stdev(alignment[ss].plus.cpoints.y[UR])) oplot, [mean(alignment[ss].plus.cpoints.x[UR])], $ ;Red triangle marks center. [mean(alignment[ss].plus.cpoints.y[UR])], psym=5, color=2 plot, alignment[ss].plus.cpoints.x[LL], alignment[ss].plus.cpoints.y[LL], $ title = 'Lower Left', psym=-1, /iso, linestyle=1, /ynozero, $ xtitle = 'X sdev = '+string(stdev(alignment[ss].plus.cpoints.x[LL])), $ ytitle = 'Y sdev = '+string(stdev(alignment[ss].plus.cpoints.y[LL])) oplot, [mean(alignment[ss].plus.cpoints.x[LL])], $ ;Red triangle marks center. [mean(alignment[ss].plus.cpoints.y[LL])], psym=5, color=2 plot, alignment[ss].plus.cpoints.x[LR], alignment[ss].plus.cpoints.y[LR], $ title = 'Lower Right', psym=-1, /iso, linestyle=1, /ynozero, $ xtitle = 'X sdev = '+string(stdev(alignment[ss].plus.cpoints.x[LR])), $ ytitle = 'Y sdev = '+string(stdev(alignment[ss].plus.cpoints.y[LR])) oplot, [mean(alignment[ss].plus.cpoints.x[LR])], $ ;Red triangle marks center. [mean(alignment[ss].plus.cpoints.y[LR])], psym=5, color=2 ;---------------------------------------- if (not keyword_set(nosave)) then begin ;Save a timestamped jpg of the plots, "align_plusYYYYMMDDHHMMSS.jpg" savescreen, name='align_plus', /date endif ;Restore the original value of !P.MULTI: !p.multi = pmulti_old loadct,0 end