nicost / micro-manager

Microscope control and image acquisition integrated with ImageJ.
http://www.micro-manager.org
16 stars 11 forks source link

MDA takes images while stage is still moving. #24

Open nanthony21 opened 5 years ago

nanthony21 commented 5 years ago

I am doing a multi position acquisition using the MDA. It consists of groups of positions that are closely space while the space between each group is fairly large and takes a few seconds for the stage to move to.

The closely spaced groups work fine, however I have noticed that when moving a longer distance the MDA will almost always take an image and add it to the album a second or two before the stage has actually reached it's destination.

My first thought that there was something wrong with the deviceBusy indication from the XY stage but I have tested it and it works perfectly.

I can see this issue in beta as well as the most recent builds of gamma.

Is all of this handled in clojure or is there somewhere I can look to Java to try to figure out the cause of this?

nanthony21 commented 5 years ago

On further inspection I think this is caused because the wait for the stage to stop being busy is timing out, however the usual error message you get when using mmc.waitForDevice is suppressed. By running mmc.setTimoutMs(10000) to change the timeout from 5 seconds to 10 solved the issue.

I think that the handling of this should be changed though. A warning should be issued rather than just taking an image and continuing on silently.

nicost commented 5 years ago

Agreed. I think the idea was that it is worse to stop the acquisition if this turned out to be a recoverable error. In the mean time, we developed a mechanism to notify the user without interrupting things. It would already have been possible to put messages in the Corelog (would be useful to check if that was happening at all). Regretfully, I am quite sure that the relevant code is in the (Clojure) acquisition engine. I recently made my first change in that code, so who knows, it may even be doable;). Keep this issue open until this is addressed?

nanthony21 commented 5 years ago

Yes, I think so. I've been meaning to get familiar with the MDA code at some point because it seems like there are a few little things that need fixing. It's a little daunting but I'll do it eventually.