DiamondLightSource / PySIMRecon

Easy to use wrapper for pyCUDAsirecon, allowing the use of DV files without PRIISM
GNU General Public License v3.0
0 stars 2 forks source link

add '--shape' argument to OTF parser rather than hard-coded `(256, 256)` #11

Closed thomasmfish closed 2 months ago

thomasmfish commented 2 months ago

Rather than hardcoding the crop shape, I've allowed made it a command line argument.

iandobbie commented 2 months ago

I am not sure how cudasimrecon deals with this but the softworx code will only work with OTFs that are 2^n in size.

thomasmfish commented 2 months ago

I am not sure how cudasimrecon deals with this but the softworx code will only work with OTFs that are 2^n in size.

I've now tested this out with various other shapes, including non-square shapes, and it seems to work regardless. I have had to adjust the cropping as it wasn't able to crop to odd number sizes, but it is working with them now.

iandobbie commented 2 months ago

I am not sure how cudasimrecon deals with this but the softworx code will only work with OTFs that are 2^n in size.

I've now tested this out with various other shapes, including non-square shapes, and it seems to work regardless. I have had to adjust the cropping as it wasn't able to crop to odd number sizes, but it is working with them now.

Ok, obviously the code has progressed in some ways! Maybe we should document that you are much better using 2^n sizes as there are a large number of fft transformations and weird sizes can make these much slower.

thomasmfish commented 2 months ago

I am not sure how cudasimrecon deals with this but the softworx code will only work with OTFs that are 2^n in size.

I've now tested this out with various other shapes, including non-square shapes, and it seems to work regardless. I have had to adjust the cropping as it wasn't able to crop to odd number sizes, but it is working with them now.

Ok, obviously the code has progressed in some ways! Maybe we should document that you are much better using 2^n sizes as there are a large number of fft transformations and weird sizes can make these much slower.

I've note of the preferences for n^2 in #17 - how does that look to you?