;+ ; NAME: ircal_badpixfromlist ; PURPOSE: Read bad pixel list from file and apply to an image stack ; ; INPUTS: ; KEYWORDS: ; /fixlater just mark the pixels with NaNs, don't fix them ; OUTPUTS: ; ; HISTORY: ; Began 2006-06-21 15:01:44 by Marshall Perrin ;- PRO ircal_badpixfromlist,imgs,listfile,fixlater=fixlater readcol,listfile,badx,bady n = n_elements(badx) print," Read "+strc(n)+" bad pixels from file "+listfile for i=0L,n-1 do imgs[badx[i],bady[i],*] = !values.f_nan if ~(keyword_set(fixlater)) then imgs = fixnans(imgs) end