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

Add ROI option to get_fastccd_images and functions for quickly plotting scans #33

Closed vivekthampy closed 8 years ago

vivekthampy commented 8 years ago

Here is an example notebook showing how the new functions and the ROI parameter can be used.

Picking an ROI before processing images can significantly reduce processing times.

Also, add a convenience function to get a 3D numpy array from the pims generator returned by get_fastccd_images

https://gist.github.com/vivekthampy/65c4a0c7513a76c34e96

stuwilkins commented 8 years ago

Thanks @vivekthampy. The travis tests are failing, you will need to see why that is and fix before we can merge.

vivekthampy commented 8 years ago

@stuwilkins Fixed.

tacaswell commented 8 years ago

I suspect the bigger gains will be in pushing the ROI all the way down into the handler (eek) to only read from disk what you need.

stuwilkins commented 8 years ago

@tacaswell I suspect you are correct, when you have big stacks of images it is the time to read from disk that is the limiting factor ... not the computation of the mean etc.

I also think this goes with the lazy HDF5 handler of @danielballan that would help as well, especially with memory usage on very large datasets.

For now I am probably going to merge tis from @vivekthampy and open an issue to revisit