;------------------------------------------------------------------ ;+ ; NAME: ; POLSTACK ; PURPOSE: ; ; This program adds an image to a composite solar map. ; It works for images of type FLOAT (i.e. standard IDL floating pt.) ; only. ; ; If the stack is "blank" (all pixels less than -30000) ; the new image is copied and becomes the stack. ; CATEGORY: ; POLAR ; CALLING SEQUENCE: ; POLSTACK,stackimage,newimage ; INPUTS: ; stackimage = image containing composite map. ; A "blank" stack can be created with the command ; newstack = REPLICATE(-32000,xsize,ysize) ; newimage = image to add to stack. ; KEYWORD PARAMETERS: ; OUTPUTS: ; The stackimage is modified. ; COMMON BLOCKS: ; NOTES: ; The newimage must be the same dimensions as the stackimage. ; MODIFICATION HISTORY: ; J. Varsik, 27 Nov. 1995 --- Port from IRAF task ;- ;------------------------------------------------------------------- pro polstack,stack,new,help=help ; Display IDL header if help is required. if (keyword_set(help)) then begin get_idlhdr,'polstack.pro' goto,finishup endif if (n_elements(stack) eq 0) then begin ; stack is undefined isize = size(new) stack = make_array(isize(1),isize(2),/FLOAT,VALUE=-32000.0) endif newindex = where((new ge -30000 and new le 30000),ncount) if (ncount ne 0) then stack(newindex) = new(newindex) newindex = where((new gt 30000 and stack lt -30000),ncount) if (ncount ne 0) then stack(newindex) = new(newindex) finishup: return end