;+ ; NAME: fixnans ; PURPOSE: ; fix NANs in an image, e.g. before cross correlating or something. ; ; INPUTS: ; imgs an image or image cube ; KEYWORDS: ; /quick just set NANs to 0, rather than interpolating. ; OUTPUTS: ; ; HISTORY: ; Documentation added 2005-06-07 10:16:36 by Marshall Perrin ;- function fixnans,imgs,_extra=_extra,quick=quick if keyword_set(quick) then begin wnan = where(imgs ne imgs,nanct) out = imgs if nanct gt 0 then begin out[wnan]=0 endif return,out endif fixpix,imgs,0,out,/nan,_extra=_extra return, out end