-
Notifications
You must be signed in to change notification settings - Fork 9
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
Tophat filter doesn't work with float16 output #233
Comments
Hi @asarnow, thanks for reporting and a possible fix! Casting to float32 sounds like a good solution. If you want you can make a pull request to solve the issue, otherwise I will make one. Let me know! |
Just came here to say that I get the same error on float16 scoremaps, and the fix proposed indeed results in empty STAR files.
|
That's why I said something might have to be rescaled. But what we should really do is add the float16 type to scipy, I think we only need to add an additional set of type specialization annotations to |
I have scipy 1.13 and
scipy.ndimage.white_tophat
throwsRuntimeError: array type not supported
at pytom_tm/extract.py:72. If I addscore_volume.astype(float)
in the call, it runs but no particles are extracted (star file is empty). My tomograms are float16 and so are the score volumes.The white_tophat in cupy actually works with float16, maybe that is a solutionIt doesn't work with a structuring element. (Or casting to float for scipy, but maybe something has to be rescaled).The command I tried (with or without
.astype(float)
.pytom_extract_candidates.py -j pytom/matching/23dec02b_ts10_10.96Apx_job.json -c 0 -n 5000 --number-of-false-positives 1 -r 6 --log info --tophat-filter
The text was updated successfully, but these errors were encountered: