From: Konrad H. <hi...@cn...> - 2004-01-26 08:16:54
|
On 26.01.2004, at 07:14, RJS wrote: > The problem: I have a "stack" of 8, 640 x 480 integer image arrays > from a FITS cube concatenated into a 3D array, and I want to sum each > pixel such that the result ignores clipped values (255+); i.e., if two > images have clipped pixels at (x,y) the result along z will be the sum > of the other 6. > Memory doesn't seem critical for such small arrays, so you can just do sum([where(a < 255, a, 0) for a in images]) Konrad. |