Closed car72 closed 4 years ago
This is often the result of bright spots on the sample confusing the merit function for focus. It uses contrast between neighbouring pixels, however when there's a saturated area, the contrast between this area and the dark background dominates. When you defocus, this saturated area (and circumference) grows, and so does the amount of 'contrast', contrary to what would happen in an unsaturated, or bright-field image. Confining the area of focus to the region just around the nanoparticle to exclude these spots however should (and seems to) alleviate this:
def thumb_autofocus(): CWL.autofocus(use_thumbnail = True)
then add thumb_autofocus
to the task list instead of autofocus.
Playing with the exposure can also help.
When using particle_scanner.py, autofocus works fine when autofocus button is pressed, but not during particle tracking itself. The program then fails to properly centre on the nanoparticle before taking spectra.