Open lauramurgatroyd opened 2 years ago
The issue is the data is still uint16
when it's passed to the recon class, and the recon class doesn't check for that and just assumes it's float32
.
Add a check on datatype to the recon class, or try to convert the data with:
np.asarray(dtype=np.float32, order='C')
This returns the original array if it already satisfies the request, or reorder/cast if able to, or raise and error if it can't do it.
Change the sandstone demo and convert the data to float32 before this point.
AcquisitionData
and ImageData
should check the array and geometry dtype
are consistent.
Tried to run the sandstone notebook by importing FBP from the recon module instead of from astra, and running FBP failed with no useful error message.
@gfardell and I stepped through and found it was an issue with the filtering in the 2D case. It was specifically using: https://github.com/TomographicImaging/CIL/blob/b70febf37b215dd6672ddc38b05effdecfb6a086/src/Core/FBP_filtering.cpp#L81