micro-manager / mmCoreAndDevices

Micro-Manager's device control layer, written in C++
40 stars 108 forks source link

Add focus maintence device to DemoCamera #162

Open ianhi opened 2 years ago

ianhi commented 2 years ago

I guess what I want is demo microscope not so much democamera.

For testing/developing it would be nice to have both a stage and a focus maintence device (a la PFS-Offset) available as a demo device.

marktsuchida commented 2 years ago

Would be nice, but the bad news (at least if you want this for the purpose of testing applications) is that there would need to be several demo devices, simulating Nikon, Zeiss, Leica, etc. They behave differently enough that I don't think it is possible to create a single demo device such that code that works with the demo device would be guaranteed to work with all the real devices. I guess it is still worth having a handful of demo devices implementing the different patterns. Or maybe it is useful enough to have a single "simple" demo device that would work for some types of testing but would not guarantee anything about whether your code will work with real devices (this could be useful if the scope of testing is limited to, say, MDA-like usage with no human interaction -- SequenceTester has an AutoFocus device for this purpose).

This is probably one of the most challenging areas of our device control -- what we ought to have (but lack) is a carefully designed device API that is actually capable of abstracting the differences between the devices. I think it is possible to come up with one, but it is not easy. It will certainly require deep familiarity with the different devices.

Examples of things that differ between the devices include:

And probably many more. It almost reminds me of the difficulty of handling people's names.