New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access Violation Error on remove_outlier3d #622
Comments
16GB seems like a large dataset. What dimensions is the import numpy
import tomopy
rng = np.random.default_rng()
proj_data = rng.standard_normal( <large size here> )
proj_data = tomopy.remove_outlier3d(proj_data, dif=0.5, size=3) |
@dkazanc Any other ideas? |
Thanks, will have a look next week. |
I was indeed able to replicate the issue. Running the following code, I get the same error. The dataset is a collection of 3600 projections on a 1200 x 1920 array, so 3600 x 1200 x 1920 of data type float32. import numpy as np
import tomopy
import dxchange as dx
if __name__ == "__main__":
rng = np.random.default_rng()
proj_data = rng.standard_normal([3600,1200,1920])
proj_data = tomopy.remove_outlier3d(proj_data, dif=0.5, size=3) |
thanks, was able to reproduce on Linux as well using smaller dataset actually. I think I know the issue as the index overflows given |
Thanks for reporting this issue! The release with the fix should be available sometime tomorrow? |
Describe the problem
Hello! I have installed tomopy following the instructions on https://tomopy.readthedocs.io/en/latest/install.html and have successfully used it to reconstruct several test datasets in a conda environment, running the angles, normalize, find_center, minus_log, and recon functions without a problem. However, when trying to dezinger the projection data using remove_outlier3d, I receive the following error:
Running remove_outlier works successfully but expectedly slow on a 16 GB file. Any help getting remove_outlier3d to remove hot pixels would be greatly appreciated!
To Reproduce
An image is read from an hdf5 file, angle space is calculated, and normalization performed. I'm excluding the latter part of the code which does the reconstruction and writes the output, which works without a problem. The error is thrown whether remove_outlier3d is run before or after the normalization step. The data type of proj_data after normalization is float32, and the normalization step works as expected as confirmed by writing the output and checking in FIJI.
Expected behavior
For remove_outlier3d to return a numpy array the same size as the input projection stack, with pixels deviating from the local containing 3-pixel median by 0.5 or more to be set to the median value.
Helpful images
Posted above
Platform Information:
Additional context
Issue was reproduced on python version 3.7
Thanks!
The text was updated successfully, but these errors were encountered: