Closed stuwilkins closed 8 years ago
@tacaswell Yes in fact my ccd routine takes the uint16
images and returns a float32
with bad pixels encoded as np.nan
. I am just wondering if using map-reduce to make a multithreaded nanmean
would work. Looking at CPU usage when this runs, it spins 100% for the 40 seconds to take a stack of 1200 images to a single mean image. My routine could perhaps be a bit more efficient with memory to recast and return the same array, but that needs some thought. As the XPCS routines use np.nan
to encode bad images this is all really nice.
You might do better with a zeros + mask approach?
Encoding bad pixels as
np.nan
would explain why you are getting float arrays instead of uint arrays back out.