John Doty <[EMAIL PROTECTED]> writes: > I have a bunch of image files in FITS format. For each raster row in > each file, I need to determine the median pixel value and subtract it > from all of the pixels in that row, and then write out the results as > new FITS files.
I dunno what FITS is, but if you have a list of pixel values, that calculation sounds like two lines: median = sorted(pixels)[len(pixels)//2] new_pixels = [p-median for p in pixels] -- http://mail.python.org/mailman/listinfo/python-list