NSLS-II-CSX / csxtools

Useful python tools for CSX (23-ID)
http://nsls-ii-csx.github.io/csxtools
Other
4 stars 13 forks source link

Converted to return a pims.pipeline which does fastccd conversions #25

Closed stuwilkins closed 8 years ago

tacaswell commented 8 years ago

Encoding bad pixels as np.nan would explain why you are getting float arrays instead of uint arrays back out.

stuwilkins commented 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.

tacaswell commented 8 years ago

You might do better with a zeros + mask approach?