Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acquisition class doesn't work without z stage #41

Closed
impact27 opened this issue Jun 2, 2020 · 2 comments
Closed

Acquisition class doesn't work without z stage #41

impact27 opened this issue Jun 2, 2020 · 2 comments

Comments

@impact27
Copy link
Contributor

impact27 commented Jun 2, 2020

I am trying to acquire 10 frames:

from pycromanager import Acquisition, multi_d_acquisition_events

if __name__ == '__main__': #this is important, don't forget it

    with Acquisition(directory='C:/Users/Quentin.Peter/Desktop/tmp0', name='acquisition_name') as acq:
        events = multi_d_acquisition_events(10)
        acq.acquire(events)

But I get

Traceback (most recent call last):

  File "C:\ProgramData\Anaconda3\lib\site-packages\pycromanager\untitled0.py", line 5, in <module>
    with Acquisition(directory='C:/Users/Quentin.Peter/Desktop/tmp0', name='acquisition_name') as acq:

  File "C:\ProgramData\Anaconda3\lib\site-packages\pycromanager\acquire.py", line 181, in __init__
    tile_overlap is not None, x_overlap, y_overlap)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pycromanager\core.py", line 261, in <lambda>
    fn = lambda instance, *args, signatures_list=tuple(methods_with_name): instance._translate_call(signatures_list, args)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pycromanager\core.py", line 348, in _translate_call
    return self._deserialize(self._socket.receive())

  File "C:\ProgramData\Anaconda3\lib\site-packages\pycromanager\core.py", line 97, in receive
    self._check_exception(message)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pycromanager\core.py", line 102, in _check_exception
    raise Exception(response['value'])

Exception: java.lang.RuntimeException: Problem communicating with core to get Z stage limits
org.micromanager.acqj.api.Acquisition.initialize(Acquisition.java:205)
org.micromanager.acqj.api.Acquisition.initialize(Acquisition.java:183)
org.micromanager.remote.RemoteAcquisition.<init>(RemoteAcquisition.java:33)
org.micromanager.remote.RemoteAcquisitionFactory.createAcquisition(RemoteAcquisitionFactory.java:36)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.micromanager.internal.zmq.ZMQServer.runMethod(ZMQServer.java:270)
org.micromanager.internal.zmq.ZMQServer.parseAndExecuteCommand(ZMQServer.java:325)
org.micromanager.internal.zmq.ZMQServer.lambda$initialize$1(ZMQServer.java:83)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

The acquisiton is sucessful if I use mmcore directly.

@impact27
Copy link
Contributor Author

impact27 commented Jun 2, 2020

It looks like the core can't communicate with the z stage, which is not surprising as I don't have a z stage (well a manual one)

@henrypinkard
Copy link
Member

This was bug in the (Java based) acquisition engine used by pycromanager, which is now fixed (micro-manager/AcqEngJ#9). The updated version will build with micro-manager once this PR goes through (micro-manager/micro-manager#822).

In the mean time, you can download AcqEngJ-0.5.1.jar from here, and replace v0.5.0 in the plugins folder within your micro-manager install directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants