Programmatic autofocus calling issues

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Programmatic autofocus calling issues

Sunil

Hi all,

 

I’ve been trying to call the software autofocus functionality programmatically in MicroManager (originally on 20200120, but have also tested on the current nightly build from 20200318 just in case) gamma, but seem to be running into a snag – although pressing the button on the GUI works, this code run in the Script Panel initially does not:

 

=====

try{

                mm.core().fullFocus();

} catch (Exception e){

                print(e);

}

print("AF done");

=====

 

This looked to be returning instantly after doing nothing. After looking in the Device Property Browser, I found that there was only a blank option for the “Core-Autofocus” property. I tried installing the SimpleAutofocus device as a plan B, and that added an item to the “Core-Autofocus” property (the blank option is also still there), but unfortunately SimpleAutofocus appears to generate an exception after running that derails everything else around it:

 

=====

2020-03-19T18:12:34.767910 tid18564 [ERR,Core:dev:HamamatsuHam_DCAM] Cannot set property "Binning" to "1" [ Error in device "HamamatsuHam_DCAM": Invalid property value: Binning (3) ]

2020-03-19T18:12:34.767910 tid18564 [IFO,dev:SimpleAutofocus] Error in Setting of Binning exiting FullFocus

=====

 

I’ve tried this with the “Binning” property in the SimpleAutofocus set to both “1” (which matches the camera default binning), and “0”, which I’m under the impression leaves the binning as-is.

 

Am I missing something here?


Thanks,

Sunil

 



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general