I have scipy 1.13 and scipy.ndimage.white_tophat throws RuntimeError: array type not supported at pytom_tm/extract.py:72. If I add score_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 solution~ It 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
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!
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 solution~ It 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