DeepTrackAI / DeepTrack2

DeepTrack2
MIT License
157 stars 47 forks source link

Simulation: Particles dont "disappear" when out of focus #183

Closed weidtn closed 1 year ago

weidtn commented 1 year ago

For my work, I'm interested in the z-dimension of magnetic beads. When I move the microscope's focal plane through the particles, they first appear by getting sharper, come into the best focus, and then disappear by getting blurry again if I keep moving the focal plane.

I can not replicate this behavior in the simulations. The particle gets bigger and bigger and eventually blocks the whole image. I expected the particles to look like the particles in this: https://github.com/softmatterlab/DeepTrack2/blob/develop/examples/paper-examples/5-inline_holography_3d_tracking.ipynb But when I'm doing my own simulations I get something like this: 6ec5aa7d35fa21fc7a14dd7402bac4f7564f0879

BenjaminMidtvedt commented 1 year ago

This is likely due to matplotlib automatically normalizing the shown images for you. Try fixing vmin and vmax in imshow, it should correctly show that particle becomes weaker.

weidtn commented 1 year ago

I think that solved the problem. Thank you!