function STEPPER3, input1, input2, input3, $ INFO_ARRAY=INFO_ARRAY, SUBSCRIPT=SUBSCRIPT, $ NOSCALE=NOSCALE, COLOR=COLOR,quiet=quiet, $ qstop=qstop,pauz=pauz,xsize=xsize,sho_pfi=sho_pfi ;+ ; NAME: ; STEPPER3 ; PURPOSE: ; Step through individual images a single frame at a time ; and permit flagging the output vector with a 0, 1, 2, 3 or 4. ; It is possible to switch back and forth on a given image ; as much as you want. Stepping or jumping through the data ; cube is the same as in stepper. ; SAMPLE CALLING SEQUENCE: ; output = stepper3(input1, input2, [input3, $ ; INFO_ARRAY=INFO_ARRAY, SUBSCRIPT=SUBSCRIPT, $ ; NOSCALE=NOSCALE, COLOR=COLOR, $ ; qstop=qstop,pauz=pauz] ; out = stepper3(data) ; out = stepper3(index,data) ; out = stepper3(index,data,info_array) ; out = stepper3(data,info_array) ; INPUT: ; input1: INDEX or HEADER = The structure that goes with the data ; input2: DATA = Three-dimensional array ; OUTPUT ; A vector of 0's, 1's, 2's, 3's or 4's permitting easy selection or ; de-selection of images for further processing. ; OPTIONAL INPUTS: ; input3: INFO_ARRAY = descriptive text string (pass as parameter or keyword) ; OPTIONAL INPUT KEYWORDS: ; INFO_ARRAY = String array containing descriptive text ; NOSCALE = If set, will turn off tvscale ; SUBSCRIPT = Subset of array is displayed. ; COLOR = The color to use for displaying the info text string. ; pauz = Number of sec to wait between frames. (Default=0.0) ; xsize = Size of displayed image in pixels if rebin desired. ; /sho_pfi, plot PFI FOV on every image. ; /quiet, do not print out the intro info. ; PROCEDURE ; 0 returns a 0 in the output vector. ; 1 returns a 1 in the output vector. ; 2 returns a 2 in the output vector. ; 3 returns a 3 in the output vector ; 4 returns a 4 in the output vector ; HISTORY: ; 4-May-2005 LWA Created from stepper2.pro. ; 5-May-2005 LWA Replaced j,k,l with 0,1,2. ; 14-May-2005 LWA Added a 3 to output vector capability. ; (Header change only to this code.) ; 7-Jan-2008 LWA For ;data, info_array passed changed call to ; stepper3_s1 from stepper2_s1. ; Added capability to use number 4 in output vector. ; 25-Jan-2009 LWA Added keyword pauz. ; Deleted obsolete keyword wunz. ; 12-may-2009 LWA Added keywords xsize, bin and sho_pfi in call to stepper3_s1. ; 4-May-2010 LWA Added keyword quiet. ; 4-Feb-2011 LWA Updated header. Now must have input1. ;- on_error,2 ; Return to caller typ1 = data_type(input1) typ2 = data_type(input2) if keyword_set(subscript) then out=intarr(n_elements(subscript)) sho_pfi=keyword_set(sho_pfi) case 1 of (typ2 eq 0): begin ;only data passed if n_elements(out) eq 0 then begin nimg=data_chk(input1,/nimages) out=intarr(nimg) endif if keyword_set(xsize) then begin siz=size(input1) if siz(1) ne xsize then begin bin=xsize/siz(1) input1=rebin(input1,xsize,xsize,siz(3)) endif else bin=1 endif STEPPER3_s1,input1, $ INFO_ARRAY=INFO_ARRAY,quiet=quiet,$ NOSCALE=NOSCALE, SUBSCRIPT=SUBSCRIPT, $ COLOR=COLOR,out=out,pauz=pauz,bin=bin,sho_pfi=sho_pfi end (typ1 eq 8): begin ;index,data or index,data,info passed if (n_elements(input3) ne 0) then info_array = input3 if (n_elements(info_array) eq 0) $ then info_array = get_info(input1, /noninteractive) if n_elements(out) eq 0 then begin out=intarr(n_elements(input1)) endif if keyword_set(xsize) then begin siz=size(input2) if siz(1) ne xsize then begin bin=xsize/siz(1) input2=rebin(input2,xsize,xsize,siz(3)) endif else bin=1 endif STEPPER3_s1,input1,input2, $ INFO_ARRAY=INFO_ARRAY,quiet=quiet,$ NOSCALE=NOSCALE, SUBSCRIPT=SUBSCRIPT, $ COLOR=COLOR,out=out,pauz=pauz,bin=bin,sho_pfi=sho_pfi end (typ2 eq 7): begin ;data, info_array passed if n_elements(out) eq 0 then begin nimg=data_chk(input1,/nimages) out=intarr(nimg) endif if keyword_set(xsize) then begin siz=size(input1) if siz(1) ne xsize then begin bin=xsize/siz(1) input1=rebin(input1,xsize,xsize,siz(3)) endif else bin=1 endif STEPPER3_s1,input1, $ INFO_ARRAY=input2,quiet=quiet, $ NOSCALE=NOSCALE, SUBSCRIPT=SUBSCRIPT, $ COLOR=COLOR,out=out,pauz=pauz,bin=bin,sho_pfi=sho_pfi end endcase if (keyword_set(qstop)) then stop ;outarr=where(out eq 0) return, out end