attachRunnable in micromanager gamma - something changed?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

attachRunnable in micromanager gamma - something changed?

MonikaP
I have a script that worked in micromanager beta. It contains the following
lines:

mm.acquisitions().attachRunnable(0, 0, 0, 0, starting); // f, p, c, s
mm.acquisitions().attachRunnable(0, -1, 0, 0, runnable); // f, p, c, s
mm.acquisitions().runAcquisition();

In micromanager gamma, weirdness happends. If any one of the two runnables
is commented out, the rest works. If both gets attached, the first runnable
"starting" gets executed, the second "runnable" gets executed twice (when
there are three positions on the list, so should execute 3 times), but no
images are received, "Received 00 of 18 images" in Acquisition Progress. The
runnables are only for opening external shutters and waiting between
positions.

Any idea what can be going wrong? Or how I can rewrite my code?



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: attachRunnable in micromanager gamma - something changed?

MonikaP
Okay, I did some testing with a very simple runnable:

stupid1 = new Runnable() {
        public void run() {
                 print("I'm stupid runnable 1");
        }
};

It is not possible to attach two runnables to the same plane. Combinations
such as:

mm.acquisitions().attachRunnable(0, 0, 0, 0, stupid1);
mm.acquisitions().attachRunnable(0, 0, 0, 0, stupid2); //two runnables to
position 0

mm.acquisitions().attachRunnable(0, 0, 0, 0, stupid1);
mm.acquisitions().attachRunnable(0, -1, 0, 0, stupid2); //one for position
0, one for all positions

Cause images to stop coming (but the runnables are still run, the messages
get printed!).

Why is this so? How can I achieve what I need, run one piece of code at
startup, and another one (ie waiting) for every position?



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: attachRunnable in micromanager gamma - something changed?

Stuurman, Nico
Hi Monika,

Sounds like a bug, and you created a simple recipe to reproduce it. 
I'll look into (hopefully soon) and created an issue on github
(https://github.com/nicost/micro-manager/issues/68) to not forget about it.

Best,

Nico


> Okay, I did some testing with a very simple runnable:
>
> stupid1 = new Runnable() {
> public void run() {
> print("I'm stupid runnable 1");
> }
> };
>
> It is not possible to attach two runnables to the same plane. Combinations
> such as:
>
> mm.acquisitions().attachRunnable(0, 0, 0, 0, stupid1);
> mm.acquisitions().attachRunnable(0, 0, 0, 0, stupid2); //two runnables to
> position 0
>
> mm.acquisitions().attachRunnable(0, 0, 0, 0, stupid1);
> mm.acquisitions().attachRunnable(0, -1, 0, 0, stupid2); //one for position
> 0, one for all positions
>
> Cause images to stop coming (but the runnables are still run, the messages
> get printed!).
>
> Why is this so? How can I achieve what I need, run one piece of code at
> startup, and another one (ie waiting) for every position?


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: attachRunnable in micromanager gamma - something changed?

Stuurman, Nico
Hi Monika,

This should be fixed in tonight's build of 2.0-gamma.

Thanks for reporting!

Best,


Nico

> Sounds like a bug, and you created a simple recipe to reproduce it.
> I'll look into (hopefully soon) and created an issue on github
> (https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_nicost_micro-2Dmanager_issues_68&d=DwIGaQ&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=EZQ-TIfa6RFFQ6VDKhnw1RdWhGL2C2K4gRh2XKF7OmE&s=oLX6p2ip7CPPie9bLkL3aNFqzteeIuhYEWwJLYBMyOU&e= ) to not forget about it.
>
> Best,
>
> Nico
>
>
>> Okay, I did some testing with a very simple runnable:
>>
>> stupid1 = new Runnable() {
>> public void run() {
>> print("I'm stupid runnable 1");
>> }
>> };
>>
>> It is not possible to attach two runnables to the same plane. Combinations
>> such as:
>>
>> mm.acquisitions().attachRunnable(0, 0, 0, 0, stupid1);
>> mm.acquisitions().attachRunnable(0, 0, 0, 0, stupid2); //two runnables to
>> position 0
>>
>> mm.acquisitions().attachRunnable(0, 0, 0, 0, stupid1);
>> mm.acquisitions().attachRunnable(0, -1, 0, 0, stupid2); //one for position
>> 0, one for all positions
>>
>> Cause images to stop coming (but the runnables are still run, the messages
>> get printed!).
>>
>> Why is this so? How can I achieve what I need, run one piece of code at
>> startup, and another one (ie waiting) for every position?
>
> _______________________________________________
> micro-manager-general mailing list
> [hidden email]
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_micro-2Dmanager-2Dgeneral&d=DwIGaQ&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=EZQ-TIfa6RFFQ6VDKhnw1RdWhGL2C2K4gRh2XKF7OmE&s=kiVYPcKt4iE90lwXksppg5o2-ESqSKlPD9wpZ_9fYds&e=
> .
>


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: attachRunnable in micromanager gamma - something changed?

MonikaP
It works now, thank you for the quick repair.



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


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