Issues with ORCA flash camera

51 views
Skip to first unread message

louison pineau

unread,
Nov 22, 2024, 9:52:46 AM11/22/24
to ACQ4
Hello,
I've been trying to use an Orca flash camera on ACQ4 via micromanager. I basically use the same configuration as it is written in the example devices.cfg file. When I start ACQ4, I get this error : 

2024-11-22T15:47:56.898003+01:00 Error while creating dock for device 'Camera':


  1. AttributeError: 'MicroManagerCamera' object has no attribute '_allParams'

AttributeError: 'MicroManagerCamera' object has no attribute '_allParams'
  File C:\Users\pineaulo\.conda\envs\acq4\lib\runpy.py, line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File C:\Users\pineaulo\.conda\envs\acq4\lib\runpy.py, line 87, in _run_code
    exec(code, run_globals)
  File U:\acq4\acq4\__main__.py, line 106, in <module>
    man = Manager(argv=sys.argv[1:])
  File U:\acq4\acq4\Manager.py, line 173, in __init__
    self.showGUI()
  File U:\acq4\acq4\Manager.py, line 670, in showGUI
    self.gui = self.loadModule('Manager', 'Manager', {})
  File U:\acq4\acq4\Manager.py, line 521, in loadModule
    mod = modclass(self, name, config)
  File U:\acq4\acq4\modules\Manager\Manager.py, line 30, in __init__
    self.addDeviceDocks()
  File U:\acq4\acq4\modules\Manager\Manager.py, line 72, in addDeviceDocks
    printExc("Error while creating dock for device '%s':" % d)
  File U:\acq4\acq4\util\debug.py, line 47, in printExc
    acq4.Manager.logExc(msg=msg, msgType=msgType)
------- exception caught ---------->
  File U:\acq4\acq4\modules\Manager\Manager.py, line 59, in addDeviceDocks
    dock = self.createDockForDevice(d)
  File U:\acq4\acq4\modules\Manager\Manager.py, line 75, in createDockForDevice
    dw = self.manager.getDevice(deviceName).deviceInterface(self)
  File U:\acq4\acq4\devices\Camera\Camera.py, line 356, in deviceInterface
    return CameraDeviceGui(self, win)
  File U:\acq4\acq4\devices\Camera\deviceGUI.py, line 20, in __init__
    self.params = self.dev.listParams()
  File U:\acq4\acq4\devices\MicroManagerCamera\mmcamera.py, line 261, in listParams
    return self._allParams.copy()

 



2024-11-22T15:47:56.984552+01:00 Unexpected error:


  1. AttributeError: 'MicroManagerCamera' object has no attribute '_allParams'

AttributeError: 'MicroManagerCamera' object has no attribute '_allParams'
  File U:\acq4\acq4\modules\Manager\Manager.py, line 59, in addDeviceDocks
    dock = self.createDockForDevice(d)
  File U:\acq4\acq4\modules\Manager\Manager.py, line 75, in createDockForDevice
    dw = self.manager.getDevice(deviceName).deviceInterface(self)
  File U:\acq4\acq4\devices\Camera\Camera.py, line 356, in deviceInterface
    return CameraDeviceGui(self, win)
  File U:\acq4\acq4\devices\Camera\deviceGUI.py, line 20, in __init__
    self.params = self.dev.listParams()
  File U:\acq4\acq4\devices\MicroManagerCamera\mmcamera.py, line 261, in listParams
    return self._allParams.copy()


The camera works nice in micromanager (I used micromanager 4.19 to test it).


Thanks in advance for your help !

Luke Campagnola

unread,
Nov 22, 2024, 3:39:56 PM11/22/24
to ac...@googlegroups.com
Greetings,
Do you see any errors preceding this one? Usually this is an indication that something went wrong while initializing the camera.

Luke

From: ac...@googlegroups.com <ac...@googlegroups.com> on behalf of louison pineau <louison....@gmail.com>
Sent: Friday, November 22, 2024 06:52
To: ACQ4 <ac...@googlegroups.com>
Subject: [acq4] Issues with ORCA flash camera
 
CAUTION: This email originated from outside the Allen Institute. Please do not click links or open attachments unless you've validated the sender and know the content is safe.

--
You received this message because you are subscribed to the Google Groups "ACQ4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to acq4+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/acq4/780281f7-c24d-4bf2-a32c-e390b03ccb0en%40googlegroups.com.

Martin Chase

unread,
Nov 22, 2024, 5:04:52 PM11/22/24
to ACQ4
One option for noticing more meaningful error messages is to always start acq4 with the `--exit-on-error` flag. This forces acq4 to bomb out during initialization if anything goes wrong (which acq4 otherwise tries to push past).

Whatever the originating error is, I can say that MicroManager 1.4.19 is very old at this point. I almost always use a nightly build, as is recommended at https://micro-manager.org/Download_Micro-Manager_Latest_Release

I would try installing the latest nightly build. Be sure to uninstall the old version first, and I usually run `python -m pip install --force-reinstall pymmcore` also (in the acq4 conda env), after changing out MicroManagers.

If you want to stick with 1.4.19, you may have to explicitly configure the Camera's `path` to point to the "C:\\Program Files\\MicroManager-1.4\\" directory; acq4 recently changed the default to stop looking at older versions.

 - Martin

louison pineau

unread,
Nov 25, 2024, 9:49:19 AM11/25/24
to ACQ4
Thank you for your answers !

The problem was indeed coming from the micromanager outdated version, I switched to the latest nightbuild and now Acq4 starts without an error message popping. The camera module is accessible. When I try to start the "acquire video" feature, the software crashes. Also, the camera module UI is kind of weird (see picture). 

I should precise that I would like to use ACQ4 for live video feed during patch experiments and also assisted pipette guiding if possible. For now, I don't have any DAQ device connected to my computer (as you may have seen in a previous post, for the patch recordings, I use HEKA EPC10 amplifiers which have built in DAQs and HEKA's patchmaster to record). 

Not having a DaQ on the setup should not be a problem if I just want to run some live video feed right ? Could it come from my computer specs (not enough RAM) ? 

camera module.png

Martin Chase

unread,
Nov 25, 2024, 12:55:46 PM11/25/24
to ac...@googlegroups.com
I'm glad things are working better.

> When I try to start the "acquire video" feature, the software crashes.

Hmm. Check all the settings in the manager window for the camera device and make sure they're sane. Can you post the logs from one of these crashes?

> Also, the camera module UI is kind of weird (see picture).

That's not necessarily a problem. ACQ4's interfaces are all customizable as moveable/resizable docks. If you want the default arrangement, you can delete the `config/modules/Camera_ui.cfg` file before starting ACQ4. Otherwise, move the docks around to best suit your needs.

> Not having a DaQ on the setup should not be a problem if I just want to run some live video feed right ?

Camera doesn't necessarily require a DAQ, no, but your camera might be configured to expect one if it has `exposeChannel` or `triggerOutChannel` set. Make sure those aren't present in the config file, or maybe just add a mock DAQ for it to pretend to connect to.

Best,
 - Martin

Martin Chase

unread,
Nov 25, 2024, 12:56:58 PM11/25/24
to ACQ4
I'm glad things are working better.
> When I try to start the "acquire video" feature, the software crashes.

Hmm. Check all the settings in the manager window for the camera device and make sure they're sane. Can you post the logs from one of these crashes?

> Also, the camera module UI is kind of weird (see picture).

That's not necessarily a problem. ACQ4's interfaces are all customizable as moveable/resizable docks. If you want the default arrangement, you can delete the `config/modules/Camera_ui.cfg` file before starting ACQ4. Otherwise, move the docks around to best suit your needs.
> Not having a DaQ on the setup should not be a problem if I just want to run some live video feed right ?

louison pineau

unread,
Nov 29, 2024, 6:27:37 AM11/29/24
to ACQ4
Hi Martin, thanks again for your help.

Concerning the camera module UI, I had tried moving the and resizing the docks but the width of the docks was locked. Anyway, I deleted the Camera_ui.cfg file and now everything is fine. 

The camera module still doesn't work properly though. Interestingly, when I use the taskrunner to test the camera, it works (I get an image of my recording chamber). However, when I start the camera module after selecting the camera, I get a black image. I tried to manually change the gain, I still wasn't able to get an something.

I also tried to change the parameters of the camera starting with the exposure time, I ended up with this error:

2024-11-29T12:08:59.554129+01:00 Unexpected error:


  1. AttributeError: 'SimpleParameter' object has no attribute 'hasValue'

AttributeError: 'SimpleParameter' object has no attribute 'hasValue'
  File U:\acq4\acq4\devices\Camera\deviceGUI.py, line 70, in stateChanged
    vals[param.name()] = param.value() if param.hasValue() else None


I get the same error for every parameter that I try to modify.

Best,
Louison

Martin Chase

unread,
Dec 2, 2024, 3:00:52 PM12/2/24
to ACQ4
Hey again,

On Friday, November 29, 2024 at 3:27:37 AM UTC-8 louison....@gmail.com wrote:
The camera module still doesn't work properly though. Interestingly, when I use the taskrunner to test the camera, it works (I get an image of my recording chamber). However, when I start the camera module after selecting the camera, I get a black image. I tried to manually change the gain, I still wasn't able to get an something.

Huh. I'm hoping things are misbehaving because of the library mismatch (see next comment), but that's strange. If you have both the task runner and the camera modules open at the same time, will images show up in the camera module when you capture images using the task runner?
 
I also tried to change the parameters of the camera starting with the exposure time, I ended up with this error:
 
Looks like you're using an old version of pyqtgraph. Upgrade that library, and your camera parameters should be changeable.

Best,
 - Martin

louison pineau

unread,
Dec 10, 2024, 8:46:13 AM12/10/24
to ACQ4
Hi,

Thanks a lot for your help, updating pyqtgraph solved part of the problem. Now, I have another error:

Traceback (most recent call last):
  File "U:\acq4\acq4\util\imaging\sequencer.py", line 449, in startClicked
    self.start()
  File "U:\acq4\acq4\util\imaging\sequencer.py", line 475, in start
    self.threadStopped(self._future)
  File "U:\acq4\acq4\util\imaging\sequencer.py", line 496, in threadStopped
    fut.wait(timeout=1)  # to raise errors if any happened
    ^^^^^^^^^^^^^^^^^^^
  File "U:\acq4\acq4\util\future.py", line 188, in wait
    raise RuntimeError(msg) from self._excInfo[1]
RuntimeError: Task <acq4.util.future.Future object at 0x000001CEF4876C20> did not complete: Device <MicroManagerCamera "Camera"> is not connected to a focus controller.
(acq4)

I have a Sensapex motorized stage along with 2 uMps on my setup. I modified the configuration files to integrate all the hardware in ACQ4 but apparently, the broadcast adress is not recognised by ACQ4:

U:\acq4\acq4\Manager.py:328: RuntimeWarning:
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "U:\acq4\acq4\__main__.py", line 102, in <module>
    man = Manager.runFromCommandLine(argv=sys.argv[1:])
  File "U:\acq4\acq4\Manager.py", line 70, in runFromCommandLine
    m.initFromCommandLine(argv)
  File "U:\acq4\acq4\Manager.py", line 176, in initFromCommandLine
    self.readConfig(configFile)
  File "U:\acq4\acq4\Manager.py", line 239, in readConfig
    self.configure(self.config)
  File "U:\acq4\acq4\Manager.py", line 278, in configure
    self._loadConfig(cfg)
  File "U:\acq4\acq4\Manager.py", line 328, in _loadConfig
    printExc()
  --- exception caught here ---
  File "U:\acq4\acq4\Manager.py", line 322, in _loadConfig
    self.loadDevice(driverName, conf, k)
  File "U:\acq4\acq4\Manager.py", line 462, in loadDevice
    dev = devclass(self, conf, name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "U:\acq4\acq4\devices\SensapexObjectiveChanger.py", line 20, in __init__
    ump = UMP.get_ump(address=address, group=group)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\pineaulo\AppData\Local\anaconda3\envs\acq4\Lib\site-packages\sensapex\sensapex.py", line 372, in get_ump
    cls._single = UMP(address=address, group=group, start_poller=start_poller)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\pineaulo\AppData\Local\anaconda3\envs\acq4\Lib\site-packages\sensapex\sensapex.py", line 376, in __init__
    self.broadcast_address = address.decode()
                             ^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'decode'
  printExc()
(acq4)

I tried to write the adress in different format in the default configuration file but I still end up with an error (not necessarly the same one though). I don't know if you've ever worked with this kind of hardware, I will also ask the people from Sensapex if they can help with this one.

Best regards,
Louison    

Martin Chase

unread,
Dec 10, 2024, 12:01:25 PM12/10/24
to ac...@googlegroups.com
Heya,

Huh. That looks to be a bug in the sensapex library. Is your sensapex controller at a different address than the default one? You may be able to leave off the address entirely in your config file and have it work. I'll file the bug with sensapex in the mean time.

Best,
 - Martin

--
You received this message because you are subscribed to the Google Groups "ACQ4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to acq4+uns...@googlegroups.com.

louison pineau

unread,
Dec 11, 2024, 3:53:21 AM12/11/24
to ACQ4
I basically put the adress that was written on the Sensapex touch screen (the local IP address), like it was written in the documentation. I also tried the specific address for my two uMps but it also didn't work. Additionally, I checked the connection between the hardware and the computer. I don't think that's the source of the problem as I was able to update the touch screen firmware before and my computer detected all the hardware without any issues. I'll wait for the response from Sensapex and check if I can find another solution in the mean time.

Best,
Louison

Martin Chase

unread,
Dec 11, 2024, 10:53:11 AM12/11/24
to ac...@googlegroups.com

Sorry, no I mean you should get rid of the line in your config that specifies the address. I think your setup will probably work if you use the defaults for the library rather than specifying explicitly.

Sensapex doesn't actually have a python developer on staff, so it's more likely that I will be the one who fixes that library.


louison pineau

unread,
Dec 17, 2024, 9:57:03 AM12/17/24
to ACQ4
I removed the line from the default.cfg file, I end with new errors :

U:\acq4\acq4\Manager.py:328: RuntimeWarning:
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "U:\acq4\acq4\__main__.py", line 102, in <module>
    man = Manager.runFromCommandLine(argv=sys.argv[1:])
  File "U:\acq4\acq4\Manager.py", line 70, in runFromCommandLine
    m.initFromCommandLine(argv)
  File "U:\acq4\acq4\Manager.py", line 176, in initFromCommandLine
    self.readConfig(configFile)
  File "U:\acq4\acq4\Manager.py", line 239, in readConfig
    self.configure(self.config)
  File "U:\acq4\acq4\Manager.py", line 278, in configure
    self._loadConfig(cfg)
  File "U:\acq4\acq4\Manager.py", line 328, in _loadConfig
    printExc()
  --- exception caught here ---
  File "U:\acq4\acq4\Manager.py", line 322, in _loadConfig
    self.loadDevice(driverName, conf, k)
  File "U:\acq4\acq4\Manager.py", line 462, in loadDevice
    dev = devclass(self, conf, name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "U:\acq4\acq4\devices\Sensapex.py", line 50, in __init__
    self.dev = ump.get_device(self.devid, n_axes=config.get("nAxes", None), is_stage=not config["isManipulator"])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\pineaulo\AppData\Local\anaconda3\envs\acq4\Lib\site-packages\sensapex\sensapex.py", line 526, in get_device
    raise ValueError(f"Invalid sensapex device ID {dev_id}. Options are: {all_devs!r}")
ValueError: Invalid sensapex device ID 20. Options are: []
  printExc()

I get this for all the Sensapex equipment listed in the devices file. If I understood well, the Sensapex device IDs are not recognised when I try to start ACQ4. I checked in a python console and I can get the list of devices using:

from sensapex import UMP

ump = UMP.get_ump()
dev_ids = ump.list_devices()


ACQ4 is starting nonetheless but the camera module still doesn't work. When I try to start it I get this:

Traceback (most recent call last):
  File "U:\acq4\acq4\util\imaging\sequencer.py", line 449, in startClicked
    self.start()
  File "U:\acq4\acq4\util\imaging\sequencer.py", line 475, in start
    self.threadStopped(self._future)
  File "U:\acq4\acq4\util\imaging\sequencer.py", line 496, in threadStopped
    fut.wait(timeout=1)  # to raise errors if any happened
    ^^^^^^^^^^^^^^^^^^^
  File "U:\acq4\acq4\util\future.py", line 188, in wait
    raise RuntimeError(msg) from self._excInfo[1]
RuntimeError: Task <acq4.util.future.Future object at 0x000001F85D87E3B0> did not complete: Device <MicroManagerCamera "Camera"> is not connected to a focus controller.

I guess the camera module doesn't work because my Sensapex hardware (and particularly the stage, the microscope and the objective changer) is not recognised ?

Best,
Louison

Martin Chase

unread,
Dec 17, 2024, 12:51:28 PM12/17/24
to ac...@googlegroups.com
Ah, damn. If the dev ids show up in the console snippet you provided, then I expect them to be at the default address. Do you also have a group specified in the config that's maybe incorrect? Try removing any `group: ` lines, if they are present. Please post your entire devices.cfg, if that suggestion doesn't solve this for you.

Best,
 - Martin

louison pineau

unread,
Dec 18, 2024, 11:23:24 AM12/18/24
to ACQ4
I removed the group line in the default.cfg file but it still doesn't work. Here's my devices.cfg file :

Stage:
    driver: "Sensapex"
    nAxes: 3
    deviceId: 20

ObjectiveChanger:
    driver: 'SensapexObjectiveChanger'
    deviceId: 20


Microscope:
    driver: 'Microscope'
    parentDevice: 'Stage'
    objectives:
        0:  
            4x_0.10NA:
                name: '4x 0.10na NIKON'
                scale: 1.0 / 4.0
        1:  
            40x:
                name: '40x 0.80na NIKON'
                scale: 1.0 / 40.0
                offset: -43*um, 9*um

RecordingChamber:
    driver: 'RecordingChamber'
    radius: 5*mm
    transform:
        # Place the center of the recording chamber (top surface of the glass) at 0,0,0 in the global coordinate system
        pos: 0, 0, 0

Manipulator1:
    driver: 'Sensapex'
    isManipulator: True
    deviceId: 1

Camera:
    driver: 'MicroManagerCamera'
    mmAdapterName: 'HamamatsuHam'
    mmDeviceName: 'HamamatsuHam_DCAM'
    parentDevice: 'Microscope'
    transform:
        pos: (0, 0)
        scale: (4.088 / 0.63 * um/px, -4.088 / 0.63 * um/px)
        angle: 0

    defaults:                             ## default parameters to apply to camera at startup
        #TEMP_SETPOINT:  -2000
        exposure: 3.0208*ms
        binning: 1,1

I haven't added any pipettes for now. I will do it soon.

Thanks again for your help !

Louison

Martin Chase

unread,
Dec 18, 2024, 12:40:20 PM12/18/24
to ac...@googlegroups.com
That's weird; your config looks fine. If that dev_ids you got includes 20 and 1, you should be fine. Sensapex devices are known to sometimes be flakey during discovery, but that should be an intermittent issue, not a consistent one. Maybe we take this off the list and have a video call sometime to look at it together? Luke and/or I should be able to meet up with you sometime that works for you. I'll email you to set that up.

Martin Chase

unread,
Dec 20, 2024, 4:36:28 AM12/20/24
to ac...@googlegroups.com
I met with Louison just now. Our conclusions:

Sensapex devices were present when we restarted ACQ4, so it seems to have just been a hiccup.

The Camera module would lock up whenever "Acquire Video" was clicked, but from the Console we were able to access the camera by first acquiring 10 frames and then starting it manually:

  man.getDevice("Camera").acquireFrames(10, True)
  man.getDevice("Camera").start()

We don't know why the camera wouldn't start without first acquiring a few frames, though.

Reply all
Reply to author
Forward
0 new messages