pro sxt_sff_composite,index,data,comp_index,comp_data, $ smooth_factor=smooth_factor, _extra=_extra, $ sxt_cleanx=sxt_cleanx, vignette=vignette, destreak=destreak, $ fillpix=fillpix, unc_out=unc_out, fillmap=fillmap ,$ second_order_leak=second_order_leak,dcorb=dcorb ;+ ; NAME: ; sxt_sff_composite ; ; PURPOSE: ; Prepare a composite SXT image from 2 or 3 Half or Quarter Res images. ; ; CALLING SEQUENCE EXAMPLES: ; ; INPUTS: ; index = SXT index structure ; data = 3-d data cube (at least 2 images) ; ; ; OUTPUT: ; comp_index - the adjusted index of the composite (history added) ; comp_data - the composite data array ; ; OPTIONAL INPUT KEYWORDS: ; ; smooth_factor = Boxcar smooth the bleed pixels. If not defined, the ; default is to smooth over 5 pixels. ; _extra - all others passed through to sxt_prep ; fillmap - map of pixels filled from SHORT(1) or MEDIUM(2) ; dcorb - set this keyword to 0 to inhibit use of dc_orbit_correct ; ; MODIFICATION HISTORY:.HIS.time_compos/.day_compos ; 26-Oct-99 S.L.Freeland - enabled keyword inherit->sxt_prep ; 18-Dec-00 S.L.Freeland - merge LWA 'sxt_suture' ; 15-Jan-01 S.L.Freeland - merge sxt_composite mods (fix 18-dec mod) ; "released" as version 5.0 ; ; 18-Jan-2001 - S.L.Freeland - add FILLMAP output keyword ; 22-Sep-2003 - D.E.McKenzie - Removed extra call to SXT_DN_UNC ; 09-Oct-2003 - D.E.McKenzie - Removed a debug switch I'd left in on ; 22-Sep. ; 12-Jan-2004 - LWA - Deleted ancient history info. ; Changed progverno to 6.0. ; Listed second_order_leak, sxt_cleanx, and destreak keywords ; explicitely for clarification. ; Called sxt_clean in sxt_prep and commented out independent call. ; 24-Jan-2008 - LWA - Added keyword dcorb to control use of dc_orbit_correct. ; 1-Feb-2008 - LWA - Switched image ordering command to gt_dpe from ; gt_expdur. ; 10-Mar-2009 - LWA - Set keyword /sff in call to sxt_composite. ;- progverno=6.0 ;destreak=keyword_set(destreak) ;LWA 12-Jan-2004 ;cleanit=keyword_set(sxt_cleanx) or destreak ;LWA 12-Jan-2004 if n_elements(dcorb) eq 0 then dcorb=1 else dcorb=dcorb ;LWA 24-Jan-2008 nparams = n_params() if nparams lt 4 then begin box_message,'IDL> sxt_sff_composite,index,data,compindex,compdata' return endif ;------------------------- ; Check input parameters ;------------------------- sz0 = size(data) ; Data must be 3-d nimg=data_chk(data,/nimage) if nimg lt 2 or n_elements(index) lt 2 then begin print,'*** Error in sxt_composite: index,data must be 3-d' return endif exporder=sort(gt_dpe(index)) ; ----- The following call orders output short->long ; ----- Short exposures are co-aligned to the longest exposure. sxt_prep,index(exporder),data(*,*,exporder),cindex,cimage,unc,satp, $ /register,/float,dc_orbit_correct=dcorb,ref_image=index(exporder(nimg-1)), $ vignette=vignette, _extra=_extra, sxt_cleanx=sxt_cleanx, $ destreak=destreak, second_order_leak=second_order_leak xsize = data_chk(img,/nx) ysize = data_chk(img,/ny) ; --------------------------------------------------------------------------- ; ---- Set keyword sff (LWA 10-Mar-2009) ---------------------------------- comp_data=sxt_composite(cindex,cimage,comp_index, $ satpix=satp,unc_in=unc,unc_out=unc_out,fillmap=fillmap, $ /sff) his_index, /enable ; do clean/destreak after the fact ;if cleanit then begin ;LWA commented out 12-Jan-2004 ; if n_elements(nsigma) eq 0 then nsigma=3 ; comp_data=sxt_clean(comp_index, comp_data, nsigma=nsigma, xsaa=destreak) ; his_index, comp_index, 0, 'extra1', nsigma ; his_index, comp_index, 0, 'q_extra', 4 + destreak ; 4=> clean (only) ;endif time_compos=gt_time(cindex) day_compos =gt_day(cindex) his_index, comp_index, 0, 'q_composite', progverno*1000 his_index, comp_index, 0, 'time_compos', time_compos his_index, comp_index, 0, 'day_compos', day_compos return end