soft-matter / trackpy

Python particle tracking toolkit
http://soft-matter.github.io/trackpy
Other
443 stars 131 forks source link

[Enhancement] Allowing possibility to convert raw image to `uint16` #762

Open jacopoabramo opened 5 months ago

jacopoabramo commented 5 months ago

I'm currently using trackpy with floating point images that are normalized in post-processing between [0, 1]. I did not at this time make a proper benchmark but I'm afraid that the conversion from floating point to uint8 may impact the localization accuracy. I was thinking that it would be nice to add an optional parameter in the trackpy.locate function to set the data type of the converted image to be able to accomodate either uint8 or uint16. I can make the PR myself, I don't think it would be a big change, but I wanted to make sure to first get an opinion if this makes sense and - if it does - which APIs would be affected by this change so to accomodate them all.