Giter VIP home page Giter VIP logo

openuc2 / imswitch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imswitch/imswitch

9.0 9.0 14.0 191.04 MB

ImSwitch is a software solution in Python that aims at generalizing microscope control by providing a solution for flexible control of multiple microscope modalities.

Home Page: https://imswitch.readthedocs.io/

License: GNU General Public License v3.0

Python 96.82% HTML 0.29% JavaScript 0.72% Jupyter Notebook 2.14% Shell 0.03%

imswitch's People

Contributors

anasophy avatar azehrer avatar beniroquai avatar brunomsaraiva avatar edabngl avatar franzili avatar hannahsheil avatar jacopoabramo avatar jhnnsrs avatar jonatanalvelid avatar kasasxav avatar killerink avatar mcfaddendavid avatar mgstingl avatar oeway avatar ranranking avatar renerichter avatar s1alknau avatar stafak avatar uellue avatar untzag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imswitch's Issues

General code style and conventions

Hi @beniroquai !
A couple of things I noticed which might improve maintainability and readability. Happy to further discuss any of these suggestions:

camelCasing vs. pythonic_casing

Firstly, an issue of casing in Python, common to most of the repository. As an example, in PositionerManager it would be more "Pythonic" to have no camelCase for properties and methods like forPositioning, which should look like:

    @property
    def for_positioning(self) -> bool:
        """ Whether the positioner is used for manual positioning. """
        return self.__for_positioning

It might make sense for the front-end, but it would be more consistent at least in the back-end.

Simpler initialization and default values

A nice "pythonic" one-liner for simplifying .json parsing and setting a default value that simplifies this:

        if positionerInfo.managerProperties.get('stepsizeX') is not None:
            self.homeSpeedX= positionerInfo.managerProperties['homeSpeedX']
        else:
            self.homeSpeedX= 15000

would look like:

        self.homeSpeedX= positionerInfo.managerProperties.get("homeSpeedX", 15000) # Checks for key "homeSpeedX" and if None return default value 15000.

Parsing the setup .json file more efficiently

Similar to this, in the managerProperties (example_uc2_labmaite.json) of the ESP32StageManager things could be simplified with dicts, which are more compatible to the position attribute, and then nicely parsed with the previous 1-liner:

{
  "positioners": {
    "ESP32Stage": {
      "managerName": "ESP32StageManager",
      "managerProperties": {
        "rs232device": "ESP32",
      "stepsize" = {"X":  0.3125,"Y":  0.3125,"Z": 0.3125},
      "home_speed" = {"X":  15000,"Y":  15000,"Z": 15000},
      "home_direction" = {"X":  -1,"Y":  -1,"Z": 1},
      "backlash":  ...
   }
}

Then, the initialization would look like:
self.homeSpeed = positionerInfo.managerProperties.get("homeSpeed", {axis: 15000 for axis in self.__axes })
Including the self.setupMotor, which could be called just once, taking advantage of the axes attribute:

def setupMotor(self, minPos, maxPos, stepSize, backlash, axis):
        for axis in self.__axes:
            self._motor.setup_motor(axis=axis, minPos=minPos[axis], maxPos=maxPos[axis], stepSize=stepSize[axis], backlash=backlash[axis])

Kind regards!

Update Logic

I attempted to update the software today, but encountered an error message saying that a specific BAK file could not be found when attempting to update. Previous updates did work, but when he tried yesterday and today they did not. (it could also be a file naming error maybe, I know not all filenames accepted on a apple device work for windows devices)

SIM PCO continue recording pattern order problem

Bug description
When continous taking images, the first run always has the correct pattern display order, from the second run the pattern order will be in a missed sequence. e.g. dir0ph2 ... dir1ph0/1/2 ... at the end dir0ph0/1

First 100 frames are the same when acquiring1000 images in .hdf5 format

Xaviers last response:
Alright! Thanks for reporting the bug btw. I think this manager I have not done it myself so I'm not sure, maybe it's from the UC2 repo? Can you take a look at getChunk and make sure that it's returning the new list of frames, in the camera manager? getChunk is the one that is called from the RecordingManager so that would be the one that is failing in my opinion

Probably more useful to post the issue in this repository.
@beniroquai

Robust file saving mechanisms

Is there a possibility to add additional file saving formats? We enjoy the high resolution of the HDF5 images, however the files are rather unwieldly to work with, whereas mp4 files are much easier to work with but very low quality. If there was another possibility, could that be added?

Positioner widget issue

Hi,

After upgrading to the latest version of ImSwitch ('$ pip install —upgrade imswitch', version 2.0.0), I can't move x y or z in the positioner widget by clicking related "+" or "--" button. The reported message is below:

image

The code around the line of " if axis == "X": speed = self.speed["X"]" in ESP32StageManager.py are:

image

Hopefully, it is sufficient to help me to solve this issue. Thanks in advance!

Kinds,
Yuhao

installation for noobs

I'm trying to build the microscope for an incubator and I know it uses a rapberry, following the instructions I can't install the GUI and I saw that they moved to IMSWITCH, but unlike the GUI there is no tutorial for beginners on how to install it on the raspberry, no I know if someone could help me. Please

Running ImSwitch on JEtson

@KillerInk we have a working installation with the following specs

Package: nvidia-jetpack
Version: 4.6-b199
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.6-b199), nvidia-opencv (= 4.6-b199), nvidia-cudnn8 (= 4.6-b199), nvidia-tensorrt (= 4.6-b199), nvidia-visionworks (= 4.6-b199), nvidia-container (= 4.6-b199), nvidia-vpi (= 4.6-b199), nvidia-l4t-jetson-multimedia-api (>> 32.6-0), nvidia-l4t-jetson-multimedia-api (<< 32.7-0)
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6-b199_arm64.deb
Size: 29368
SHA256: 69df11e22e2c8406fe281fe6fc27c7d40a13ed668e508a592a6785d40ea71669
SHA1: 5c678b8762acc54f85b4334f92d9bb084858907a
MD5sum: 1b96cd72f2a434e887f98912061d8cfb
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

aiobotocore==2.1.2
aiohttp==3.8.6
aioice==0.9.0
aioitertools==0.11.0
aiortc==1.5.0
aiosignal==1.3.1
alabaster==0.7.12
anyio==3.7.1
appdirs==1.4.4
asciitree==0.3.3
async-timeout==4.0.2
asynctest==0.13.0
attrs==21.4.0
av==10.0.0
Babel==2.9.1
backcall==0.2.0
bitstring==4.0.1
botocore==1.23.24
cached-property==1.5.2
cachey==0.2.1
certifi==2021.10.8
cffi==1.15.1
charset-normalizer==2.0.10
click==8.1.7
cloudpickle==2.0.0
coloredlogs==15.0.1
colour-science==0.3.16
cryptography==41.0.5
cycler==0.11.0
dask==2022.2.0
dataclasses-json==0.5.6
debugpy==1.5.1
decorator==5.1.1
distributed==2022.2.0
dnspython==2.3.0
docstring-parser==0.13
docutils==0.17.1
ecdsa==0.18.0
entrypoints==0.3
esptool==4.5.1
exceptiongroup==1.2.0
fastapi==0.103.2
fasteners==0.19
fonttools==4.28.5
freetype-py==2.2.0
frozenlist==1.3.3
fsspec==2022.1.0
gevent==21.12.0
gevent-websocket==0.10.1
google-crc32c==1.5.0
greenlet==1.1.2
h11==0.14.0
h5py==3.6.0
HeapDict==1.0.1
hidapi==0.13.1
hsluv==5.0.2
humanfriendly==10.0
idna==3.3
ifaddr==0.2.0
imageio==2.13.5
imagesize==1.3.0
imjoy-rpc==0.5.46
importlib-metadata==4.10.0
importlib-resources==5.4.0
-e git+https://github.com/openuc2/imswitch@e7d412708e9359924a884edf4b4fd3a8e0c4097b#egg=ImSwitch
ipykernel==6.7.0
ipython==7.31.0
ipython-genutils==0.2.0
jedi==0.18.1
Jinja2==3.0.3
jmespath==0.10.0
joblib==1.3.2
jsonschema==4.4.0
jupyter-client==7.1.1
jupyter-core==4.9.1
kiwisolver==1.3.2
lantz-core==0.5.3
lantz-drivers==0.5.2
lantz-qt==0.5.3
lantz-sims==0.5.2
lantzdev==0.5.2
locket==0.2.1
luddite==1.0.2
magicgui==0.3.4
MarkupSafe==2.0.1
marshmallow==3.14.1
marshmallow-enum==1.5.1
matplotlib==3.5.1
matplotlib-inline==0.1.3
microscope==0.6.0
msgpack==1.0.5
multidict==6.0.4
mypy-extensions==0.4.3
napari==0.4.7
napari-console==0.0.4
-e git+https://github.com/openUC2/napari-live-recording@a143adc764e786ed9659abbd607ce3c74bc69591#egg=napari_live_recording
napari-plugin-engine==0.2.0
napari-svg==0.1.6
nest-asyncio==1.5.4
networkx==2.6.3
nidaqmx==0.5.7
numcodecs==0.10.2
numpy==1.21.5
numpydoc==1.1.0
ome-types==0.4.3
ome-zarr==0.8.3
opencv-python==4.5.5.62
openflexure-microscope-client==0.1.7
packaging==21.3
parso==0.8.3
partd==1.2.0
pco==0.1.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.0.0
pimpmyclass==0.4.3
Pint==0.18
progressbar2==4.2.0
prompt-toolkit==3.0.24
psutil==5.9.0
psygnal==0.2.0
ptyprocess==0.7.0
pulsestreamer==1.6.0
pycparser==2.21
pydantic==1.9.0
pydantic-compat==0.1.2
pyee==10.0.2
Pygments==2.11.2
pylibsrtp==0.8.0
pymba==0.3.7
PyOpenGL==3.1.5
pyOpenSSL==23.3.0
pyparsing==3.0.6
PyQt5==5.12.3
PyQt5_sip==4.19.18
PyQtChart==5.12
pyqtgraph==0.12.3
PyQtWebEngine==5.12.1
Pyro4==4.82
Pyro5==5.14
pyrsistent==0.18.1
pyserial==3.5
PySignal==1.1.1
python-dateutil==2.8.2
python-utils==3.5.2
pytz==2021.3
PyVISA==1.11.3
PyWavelets==1.1.1
PyYAML==6.0
pyzmq==22.3.0
QDarkStyle==3.0.3
qtconsole==5.2.2
QtPy==2.0.0
reedsolo==1.6.0
requests==2.28.2
s3fs==2022.1.0
scikit-image==0.19.1
scikit-learn==1.0.2
scipy==1.7.3
Send2Trash==1.8.0
Serialize==0.2.1
serpent==1.41
shortuuid==1.0.11
six==1.16.0
sniffio==1.3.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
Sphinx==4.4.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
starlette==0.27.0
stringparser==0.5
tblib==2.0.0
threadpoolctl==3.1.0
tifffile==2021.11.2
tinyrpc==1.1.0
toolz==0.11.2
tornado==6.1
traitlets==5.1.1
typing-inspect==0.7.1
typing_extensions==4.7.1
-e git+https://github.com/openUC2/UC2-REST/@c5895af92195879be500ed30567c2880d1f9c6cf#egg=UC2_REST
urllib3==1.26.8
useq-schema==0.1.5
uvicorn==0.22.0
visa==1.0.0
vispy==0.9.4
wcwidth==0.2.5
websockets==11.0.3
wrapt==1.13.3
xsdata==23.7
yarl==1.9.3
zarr==2.12.0
zeroconf==0.39.4
zict==2.2.0
zipp==3.7.0
zope.event==4.5.0
zope.interface==5.4.0

image

The question remains - why does it work here. Its an older installation, so Im not 100 percent sure how I installed it..

(imswitch) uc2@uc2-desktop:~$ which python
/home/uc2/miniforge3/envs/imswitch/bin/python

Its a 4GB board.

Blockly fails to load

Bug description
Imswitch not starting due to failing blockly.

How to reproduce
Steps to reproduce the behavior:

  1. install imswitch with all dependencies
  2. git pull configs von git and put to ~/ImSwitchConfig
  3. in mamba activate imswitch environment run imswitch command

Expected behavior
Assumed all modules (including blockly) to start properly.

Output

2023-01-12 16:11:02 ERROR [main] Failed to initialize module imblockly
2023-01-12 16:11:02 ERROR [main] Traceback (most recent call last):
  File "[...]ImSwitch/imswitch/__main__.py", line 58, in main
    view, controller = modulePkg.getMainViewAndController(
  File "[...]ImSwitch/imswitch/imblockly/__init__.py", line 55, in getMainViewAndController
    from .controller import ImScrMainController
  File "[...]ImSwitch/imswitch/imblockly/controller/__init__.py", line 1, in <module>
    from .ImScrMainController import ImScrMainController
  File "[...]ImSwitch/imswitch/imblockly/controller/ImScrMainController.py", line 5, in <module>
    from .ImScrMainViewController import ImScrMainViewController
  File "[...]ImSwitch/imswitch/imblockly/controller/ImScrMainViewController.py", line 2, in <module>
    from .EditorController import EditorController
  File "[...]ImSwitch/imswitch/imblockly/controller/EditorController.py", line 5, in <module>
    from imswitch.imblockly.view import guitools
  File "[...]ImSwitch/imswitch/imblockly/view/__init__.py", line 1, in <module>
    from .ImScrMainView import ImScrMainView
  File "[...]ImSwitch/imswitch/imblockly/view/ImScrMainView.py", line 4, in <module>
    from .BlocklyView import BlocklyView
  File "[...]ImSwitch/imswitch/imblockly/view/BlocklyView.py", line 3, in <module>
    from PyQt5.QtWebEngineWidgets import *
ImportError: QtWebEngineWidgets must be imported before a QCoreApplication instance is created

[1]    70295 segmentation fault  imswitch
/opt/homebrew/Caskroom/mambaforge/base/envs/imswitch/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

Environment

  • OS: osx-arm64
  • ImSwitch version: 1.2.11
  • How you downloaded ImSwitch: git

Positioner interface and PositionerManager class

Hi @beniroquai !
A couple of things I noticed which might improve maintainability and readability. Happy to further discuss any of these suggestions:

  • Positioner interface and PositionerManager class
  1. In the initialization of the class, if we need to pass initialPosition to the constructor, wouldn't it make sense to also include the initialSpeed? I find it clearer to avoid it and define it either through the positionerInfo or, for stages that store the position in some internal memory (like the StandaStage), by directly "asking" the stage for its initial position/speed. I saw it is meant to be implemented, as the initial position gets overwritten by:
    self._position = self.getPosition() overwrites initialPosition in the PositionerManager parent initialization:
class ESP32StageManager(PositionerManager):
    def __init__(self, positionerInfo, name, **lowLevelManagers):
        super().__init__(positionerInfo, name, initialPosition={
            axis: 0 for axis in positionerInfo.axes
        }) 

Shouldn't it then be completely avoided in the PositionerManager class?

  1. setPosition should also be an abstract method (set_position), maybe as well as set_speed, which should also be addressable by axis. The abstract method should be:
    @abstractmethod
    def set_position(self, pos, axis):
        pass

And an example for an inherited class like the ESP32StageManager could look like:

    def set_position(self, value, axis):
        self._motor.set_position(axis=axis, position=value)
        self._position[axis] = value
  1. The home property became a bit problematic: I would change its name to is_homed(self) -> Dict[str, bool], which is again more "pythonic".
    def is_homed(self) -> Dict[str, bool]:
        """ The home of each axis. This is a dict in the format
        ``{ axis: homed }``. """
        return self._is_homed

home() should be a method to do what doHome() does in the ESP32StageManager. Same goes for stop which should be an is_stopped property, while stop() should be an abstract method like home().

In general, there are many if-clauses that depend on the axes dictionary and are called with just one axis. Like for example again the home method: this should home the complete stage, while another more specific method like home_axis(self, axis) could be used instead:

def home(self):
      self.home_xyz() # or actually self._stage.home()

Kind regards!

Updating logic: Delete old files

Scneario:

Someone attempts to update the software, but encounters an error message saying that a specific BAK file could not be found when attempting to update. Previous updates did work, but when he tried yesterday and today they did not. (it could also be a file naming error maybe, I know not all filenames accepted on a apple device work for windows devices)

ESP32 Health thread in ImSwitch?

@renerichter @ranranking would it make sense to run a thread tha checks if the ESP32 is:

  1. connected
  2. produces correct output
  3. disables the motors after some time if not in use

and does the following:

  1. reconnects if necessry
  2. disables the motors
  3. gives an error message

PositionerManager vs. ESP32StageManager class conflict

Hi @beniroquai !

The ESP32StageManager doesn't use the base definition (doesn't respect the abstract methods) of the PositionerManager, even when it inherits from it.

  1. The move method in the ESP32StageManager switches dist for value, I guess to include the is_absolute option, but conflicting with the abstract method.

  2. In general, the ESP32Stage interface could include another abstraction layer that integrates the motor and home modules, in order to integrate it in the manager:

  self._motor = self._rs232manager._esp32.motor
  self._homeModule = self._rs232manager._esp32.home

These 2 lines would be simplified with the following line, which includes the business logic of the complete XYZ stage:

self._stage = self._rs232manager._esp32.stage

This would follow the convention of the Manager class instantiating a low-level interface, like for example in this LantzLaserManager, where the Manager instantiates a self._laser:

class LantzLaserManager(LaserManager):
    def __init__(self, laserInfo, name, isBinary, valueUnits, valueDecimals, driver,
                 **_lowLevelManagers):
        self.__logger = initLogger(self, instanceName=name)
        ports = laserInfo.managerProperties['digitalPorts']
        # Init laser
        self._laser = LantzLaser(driver, ports)

Kind regards!

Automatically install CP21X drivers in Bundle?

@renerichter we can ship the app with drivers and install it through python subprocesses. The problem will be administrative rights.

We can execute the following:
(from https://stackoverflow.com/questions/31050040/install-windows-drivers-using-python)

C:\WINDOWS\system32>pnputil.exe -i -a C:\Users\UC2\Downloads\CP210x_Universal_Windows_Driver\silabser.inf
Microsoft-PnP-Hilfsprogramm

Verarbeitungsinf.:            silabser.inf
Der Treiber wurde erfolgreich installiert.
Das Treiberpaket wurde erfolgreich hinzugefügt.
Veröffentlichter Name:            oem326.inf


Versuche gesamt:              1
Anzahl erfolgreicher Importe: 1


C:\WINDOWS\system32>

in python:

import subprocess
>>> subprocess.Popen('pnputil.exe -i -a C:\\Users\\UC2\\Downloads\\CP210x_Universal_Windows_Driver\\silabser.inf')
<subprocess.Popen object at 0x00000259964CB0C8>

in a terminal, but it won't work if you don't open it with writing modes. Not sure how this would work in python.

Processing SIM in background - not properly implemented

Hey @kasasxav, I guess I'm getting confused over the use of the Worker-updater strategy in the SIMController again. We are collecting 9 images and want to calibrate the fourier peaks and then process them. I'm doing it wrong ;-)
Would you mind helping me with this line:
https://github.com/openUC2/ImSwitch/blob/SIM_PCO/imswitch/imcontrol/controller/controllers/SIMController.py#L309

I guess we somehow want to call this in the worker in the background, or?

Thank you !!! :)

Installation of ImSwitch (UC2-flavour) not working on Mac M1 chipset

Bug description
When installating UC2-ImSwitch version using a mixture of Option B and Option C, because option B description seems incomplete, the post installation of the commented packages (pypylon, QScintila, PyQtWebEngine and PyQt5) fails.

How to reproduce

conda create -n imswitch python=3.9
conda install -c conda-forge napari
nano setup.cfg
# comment pypylon and QScintila and PyQtWebEngine and PyQT5
pip install --no-deps <LIB_NAME>

Expected behavior
Expected to smoothly be installed.

Environment

     active environment : imswitch
    active env location : /opt/homebrew/Caskroom/mambaforge/base/envs/imswitch
            shell level : 2
       user config file : /Users/.../.condarc
 populated config files : /opt/homebrew/Caskroom/mambaforge/base/.condarc
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.10.6.final.0
       virtual packages : __osx=13.1=0
                          __unix=0=0
                          __archspec=1=arm64
       base environment : /opt/homebrew/Caskroom/mambaforge/base  (writable)
      conda av data dir : /opt/homebrew/Caskroom/mambaforge/base/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /opt/homebrew/Caskroom/mambaforge/base/pkgs
                          /Users/.../.conda/pkgs
       envs directories : /opt/homebrew/Caskroom/mambaforge/base/envs
                          /Users/.../.conda/envs
               platform : osx-arm64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.10.6 Darwin/22.2.0 OSX/13.1
                UID:GID : 501:20
             netrc file : None
           offline mode : False

Packages

output of mamba list

_ipython_minor_entry_point 8.7.0                h8cf3c4a_0    conda-forge
alabaster                 0.7.12                     py_0    conda-forge
aom                       3.5.0                h7ea286d_0    conda-forge
app-model                 0.1.1              pyhd8ed1ab_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
appnope                   0.1.3              pyhd8ed1ab_0    conda-forge
asciitree                 0.3.3                      py_2    conda-forge
asttokens                 2.2.1              pyhd8ed1ab_0    conda-forge
attrs                     22.2.0             pyh71513ae_0    conda-forge
babel                     2.11.0             pyhd8ed1ab_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
blosc                     1.21.3               h1d6ff8b_0    conda-forge
bokeh                     2.4.3              pyhd8ed1ab_3    conda-forge
brotli                    1.0.9                h1a8c8d9_8    conda-forge
brotli-bin                1.0.9                h1a8c8d9_8    conda-forge
brotlipy                  0.7.0           py39h02fc5c5_1005    conda-forge
brunsli                   0.1                  h9f76cd9_0    conda-forge
bzip2                     1.0.8                h3422bc3_4    conda-forge
c-ares                    1.18.1               h3422bc3_0    conda-forge
c-blosc2                  2.6.1                h303ed30_0    conda-forge
ca-certificates           2022.12.7            h4653dfc_0    conda-forge
cachey                    0.2.1              pyh9f0ad1d_0    conda-forge
certifi                   2022.12.7          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1           py39h7e6b969_3    conda-forge
cfitsio                   4.2.0                h2f961c4_0    conda-forge
charls                    2.3.4                hbdafb3b_0    conda-forge
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
click                     8.1.3           unix_pyhd8ed1ab_2    conda-forge
cloudpickle               2.2.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
comm                      0.1.2              pyhd8ed1ab_0    conda-forge
commonmark                0.9.1                      py_0    conda-forge
cryptography              39.0.0           py39he2a39a8_0    conda-forge
cytoolz                   0.12.0           py39h02fc5c5_1    conda-forge
dask                      2022.12.1          pyhd8ed1ab_0    conda-forge
dask-core                 2022.12.1          pyhd8ed1ab_0    conda-forge
dataclasses               0.8                pyhc8e2a94_3    conda-forge
dav1d                     1.0.0                he4db4b2_1    conda-forge
debugpy                   1.6.4            py39h23fbdae_0    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
distributed               2022.12.1          pyhd8ed1ab_0    conda-forge
docstring_parser          0.15               pyhd8ed1ab_0    conda-forge
docutils                  0.17.1           py39h2804cbe_3    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 1.2.0              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                hb7217d7_0    conda-forge
fasteners                 0.17.3             pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.1               h82840c6_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               hd633e50_1    conda-forge
freetype-py               2.3.0              pyhd8ed1ab_0    conda-forge
fsspec                    2022.11.0          pyhd8ed1ab_0    conda-forge
future                    0.18.2             pyhd8ed1ab_6    conda-forge
gettext                   0.21.1               h0186832_0    conda-forge
giflib                    5.2.1                h27ca646_2    conda-forge
glib                      2.74.1               hb5ab8b9_1    conda-forge
glib-tools                2.74.1               hb5ab8b9_1    conda-forge
gst-plugins-base          1.21.3               h8b7775e_1    conda-forge
gstreamer                 1.21.3               hcb7b3dd_1    conda-forge
heapdict                  1.0.1                      py_0    conda-forge
hsluv                     5.0.2              pyh44b312d_0    conda-forge
icu                       70.1                 h6b3803e_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
imagecodecs               2022.12.24       py39h18f4f30_0    conda-forge
imageio                   2.23.0             pyhfa7a67d_0    conda-forge
imagesize                 1.4.1              pyhd8ed1ab_0    conda-forge
importlib-metadata        6.0.0              pyha770c72_0    conda-forge
importlib_resources       5.10.2             pyhd8ed1ab_0    conda-forge
in-n-out                  0.1.6              pyhd8ed1ab_0    conda-forge
ipykernel                 6.19.4             pyh736e0ef_0    conda-forge
ipython                   8.7.0              pyhd1c38e8_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jedi                      0.18.2             pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
jpeg                      9e                   he4db4b2_2    conda-forge
jsonschema                4.17.3             pyhd8ed1ab_0    conda-forge
jupyter_client            7.4.8              pyhd8ed1ab_0    conda-forge
jupyter_core              5.1.1            py39h2804cbe_0    conda-forge
jxrlib                    1.1                  h27ca646_2    conda-forge
kiwisolver                1.4.4            py39haaf3ac1_1    conda-forge
krb5                      1.20.1               h69eda48_0    conda-forge
lcms2                     2.14                 h481adae_1    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libaec                    1.0.6                hbdafb3b_0    conda-forge
libavif                   0.11.1               h3d80962_0    conda-forge
libblas                   3.9.0           16_osxarm64_openblas    conda-forge
libbrotlicommon           1.0.9                h1a8c8d9_8    conda-forge
libbrotlidec              1.0.9                h1a8c8d9_8    conda-forge
libbrotlienc              1.0.9                h1a8c8d9_8    conda-forge
libcblas                  3.9.0           16_osxarm64_openblas    conda-forge
libclang                  14.0.6          default_h81a5282_0    conda-forge
libclang13                14.0.6          default_he70ec0d_0    conda-forge
libcurl                   7.87.0               h9049daf_0    conda-forge
libcxx                    14.0.6               h2692d47_0    conda-forge
libdeflate                1.14                 h1a8c8d9_0    conda-forge
libedit                   3.1.20191231         hc8eb9b7_2    conda-forge
libev                     4.33                 h642e427_1    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           11_3_0_hd922786_27    conda-forge
libgfortran5              11.3.0              hdaf2cc0_27    conda-forge
libglib                   2.74.1               h4646484_1    conda-forge
libiconv                  1.17                 he4db4b2_0    conda-forge
libjpeg-turbo             2.1.4                h1a8c8d9_0    conda-forge
liblapack                 3.9.0           16_osxarm64_openblas    conda-forge
libllvm14                 14.0.6               hf6e71e7_1    conda-forge
libnghttp2                1.47.0               h519802c_1    conda-forge
libogg                    1.3.4                h27ca646_1    conda-forge
libopenblas               0.3.21          openmp_hc731615_3    conda-forge
libopus                   1.3.1                h27ca646_1    conda-forge
libpng                    1.6.39               h76d750c_0    conda-forge
libpq                     15.1                 h1a28acd_2    conda-forge
libsodium                 1.0.18               h27ca646_1    conda-forge
libsqlite                 3.40.0               h76d750c_0    conda-forge
libssh2                   1.10.0               h7a5bd25_3    conda-forge
libtiff                   4.5.0                heb92581_0    conda-forge
libvorbis                 1.3.7                h9f76cd9_0    conda-forge
libwebp-base              1.2.4                h57fd34a_0    conda-forge
libxcb                    1.13              h9b22ae9_1004    conda-forge
libzlib                   1.2.13               h03a7124_4    conda-forge
libzopfli                 1.0.3                h9f76cd9_0    conda-forge
llvm-openmp               15.0.6               h7cfbb63_0    conda-forge
locket                    1.0.0              pyhd8ed1ab_0    conda-forge
lz4                       4.2.0            py39hb35ce34_0    conda-forge
lz4-c                     1.9.3                hbdafb3b_1    conda-forge
magicgui                  0.6.1              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.1            py39h02fc5c5_2    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
msgpack-python            1.0.4            py39haaf3ac1_1    conda-forge
mysql-common              8.0.31               h518ea0a_0    conda-forge
mysql-libs                8.0.31               hcb599eb_0    conda-forge
napari                    0.4.17          pyh275ddea_0_pyqt    conda-forge
napari-console            0.0.7              pyhd8ed1ab_0    conda-forge
napari-plugin-engine      0.2.0              pyhd8ed1ab_2    conda-forge
napari-svg                0.1.6              pyhd8ed1ab_1    conda-forge
ncurses                   6.3                  h07bb92c_1    conda-forge
nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
networkx                  2.8.8              pyhd8ed1ab_0    conda-forge
npe2                      0.6.1              pyhd8ed1ab_1    conda-forge
nspr                      4.35                 hb7217d7_0    conda-forge
nss                       3.78                 h1483a63_0    conda-forge
numcodecs                 0.11.0           py39h23fbdae_1    conda-forge
numpy                     1.24.1           py39hefdcf20_0    conda-forge
numpydoc                  1.5.0              pyhd8ed1ab_0    conda-forge
openjpeg                  2.5.0                hbc2ba62_2    conda-forge
openssl                   3.0.7                h03a7124_1    conda-forge
packaging                 22.0               pyhd8ed1ab_0    conda-forge
pandas                    1.5.2            py39hde7b980_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
partd                     1.3.0              pyhd8ed1ab_0    conda-forge
pcre2                     10.40                hb34f9b4_0    conda-forge
pep517                    0.13.0             pyhd8ed1ab_0    conda-forge
pexpect                   4.8.0              pyh1a96a4e_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.4.0            py39h8bbe137_0    conda-forge
pint                      0.20.1             pyhd8ed1ab_0    conda-forge
pip                       22.3.1             pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
platformdirs              2.6.2              pyhd8ed1ab_0    conda-forge
ply                       3.11                       py_1    conda-forge
pooch                     1.6.0              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.36             pyha770c72_0    conda-forge
psutil                    5.9.4            py39h02fc5c5_0    conda-forge
psygnal                   0.6.1            py39haaf3ac1_0    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydantic                  1.10.4           py39h02fc5c5_0    conda-forge
pygments                  2.14.0             pyhd8ed1ab_0    conda-forge
pyopengl                  3.1.6              pyhd8ed1ab_1    conda-forge
pyopenssl                 23.0.0             pyhd8ed1ab_0    conda-forge
pyqt                      5.15.7           py39h7fba1b6_2    conda-forge
pyqt5-sip                 12.11.0          py39h23fbdae_2    conda-forge
pyrsistent                0.19.3           py39h02fc5c5_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.9.15          hea58f1e_0_cpython    conda-forge
python-build              0.9.0              pyhd8ed1ab_1    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.9                      3_cp39    conda-forge
pytomlpp                  1.0.11           py39haaf3ac1_1    conda-forge
pytz                      2022.7             pyhd8ed1ab_0    conda-forge
pywavelets                1.3.0            py39h4d8bf0d_2    conda-forge
pyyaml                    6.0              py39h02fc5c5_5    conda-forge
pyzmq                     24.0.1           py39h0553236_1    conda-forge
qt-main                   5.15.6               hda43d4a_5    conda-forge
qtconsole-base            5.4.0              pyha770c72_0    conda-forge
qtpy                      2.3.0              pyhd8ed1ab_0    conda-forge
readline                  8.1.2                h46ed386_0    conda-forge
requests                  2.28.1             pyhd8ed1ab_1    conda-forge
rich                      13.0.0             pyhd8ed1ab_0    conda-forge
scikit-image              0.19.3           py39hde7b980_2    conda-forge
scipy                     1.9.3            py39h18313fe_2    conda-forge
setuptools                65.6.3             pyhd8ed1ab_0    conda-forge
shellingham               1.5.0              pyhd8ed1ab_0    conda-forge
sip                       6.7.5            py39h23fbdae_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.9                h17c5cce_2    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
sphinx                    4.5.0              pyh6c4a22f_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_2    conda-forge
sqlite                    3.40.0               h2229b38_0    conda-forge
stack_data                0.6.2              pyhd8ed1ab_0    conda-forge
superqt                   0.4.1              pyhd8ed1ab_0    conda-forge
tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
tifffile                  2022.10.10         pyhd8ed1ab_0    conda-forge
tk                        8.6.12               he1e0b03_0    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tornado                   6.2              py39h02fc5c5_1    conda-forge
tqdm                      4.64.1             pyhd8ed1ab_0    conda-forge
traitlets                 5.8.0              pyhd8ed1ab_0    conda-forge
typer                     0.4.2              pyhd8ed1ab_0    conda-forge
typing-extensions         4.4.0                hd8ed1ab_0    conda-forge
typing_extensions         4.4.0              pyha770c72_0    conda-forge
tzdata                    2022g                h191b570_0    conda-forge
urllib3                   1.26.13            pyhd8ed1ab_0    conda-forge
vispy                     0.11.0           py39h27142b3_1    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge
wrapt                     1.14.1           py39h02fc5c5_1    conda-forge
xorg-libxau               1.0.9                h27ca646_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zarr                      2.13.3             pyhd8ed1ab_0    conda-forge
zeromq                    4.3.4                hbdafb3b_1    conda-forge
zfp                       1.0.0                hb6e4faa_3    conda-forge
zict                      2.2.0              pyhd8ed1ab_0    conda-forge
zipp                      3.11.0             pyhd8ed1ab_0    conda-forge
zlib-ng                   2.0.6                he4db4b2_0    conda-forge
zstd                      1.5.2                h8128057_4    conda-forge

Error

e.g. for Package PyQtWebEngine in conda/mamba imswitch environment

pip install --no-deps PyQtWebEngine                                           
Collecting PyQtWebEngine
  Using cached PyQtWebEngine-5.15.6.tar.gz (48 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      Querying qmake about your Qt installation...
      These bindings will be built: QtWebEngineCore, QtWebEngine, QtWebEngineWidgets.
      Generating the QtWebEngineCore bindings...
      Generating the QtWebEngine bindings...
      Generating the QtWebEngineWidgets bindings...
      Generating the .pro file for the QtWebEngineCore module...
      Generating the .pro file for the QtWebEngine module...
      Generating the .pro file for the QtWebEngineWidgets module...
      Generating the top-level .pro file...
      Generating the Makefiles...
      _in_process.py: '/opt/homebrew/Caskroom/mambaforge/base/envs/imswitch/bin/qmake -recursive PyQtWebEngine.pro' failed returning 3
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

So it seems that qmake has a problem for metadata-generation, yet it worked nicely for all the other (qt-related) packages installed already. I wonder whether if using eg Python 3.8 (with a different set of qt-versions) could solve the problem?!

DPI setting scales ImSwitch in a bad way

Bug description
The GUI appears very large even on a high DPI screen:

image

Expected behavior
The GUI should render in such a way that all widgets are visible

Environment

  • OS: Mac Os X
  • ImSwitch version: latest

Additional context
My guess: It's an issue of Napari that "dictates" the screen resolution.

Setting OS environment variables using os did not resolve the issue? @renerichter
https://forum.image.sc/t/high-dpi-scaling-issue-when-running-napari-from-pycharm-console/44681/3

MCT

  • What happens if sliders are varied? => Now it is turnin on/off lasers and shows values
  • Direct first start => timer! => should be an outside thread
  • weird error in StartThread => none Type?! Implemented my own timer
  • take max laser val from laser manager

ImSwitch hangs when recording

When I hit 'record' for a photometrics camera (PVCAM manager), imswitch hangs and dies eventually.

Eventually it crashes with this error:

2023-03-24 09:53:50 ERROR [PhotometricsManager -> WidefieldCamera] Traceback (most recent call last):
  File "C:\Users\dirk\PycharmProjects\imswitch_hackathon\ImSwitch\imswitch\imcontrol\model\managers\detectors\DetectorManager.py", line 126, in updateLatestFrame
    self.__image = self.getLatestFrame()
  File "C:\Users\dirk\PycharmProjects\imswitch_hackathon\ImSwitch\imswitch\imcontrol\model\managers\detectors\PhotometricsManager.py", line 68, in getLatestFrame
    return np.array(self._camera.poll_latest_frame()[0]['pixel_data'])
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 19.5 MiB for an array with shape (3200, 3200) and data type uint16

This happens when saving as an

  • HDF5 file
  • tiff

I didn't check the other ones yet.

I also get the same problem when I run the example_record.py script. It sounds like imswitch is not stopping.

Could not build wheels for ImSwitchUC2

When installing uc2 version on jetson nano, I received an error ERROR: Could not build wheels for ImSwitchUC2, which is required to install pyproject.toml-based projects
also a warning WARNING: Built editable for ImSwitchUC2 is invalid: Wheel has unexpected file name: expected '-version-develop', got 'version-develop'

Installing from https://github.com/kasasxav/ImSwitch however works

Any ideas on this? Thank you.

Ensuring automated updating of Windows application

We want to enable an automated updating mechanism if the version gets bug fixes.
For pyinstaller that means replacing the ImSwitch.exe is sufficient as long as no additional dependencies need to be installed.

Run ImSwitch on Jetson in headless mode

I guess the xorg/xdisplay consumes quite some CPU/memory. If memory consumption by ImSwitch is rising, SWAP transfer occupies the CPU and the jetson barrels out over time.

ChatGPT says:

Yes, it is possible to run a PyQt app without an X desktop. To achieve this, you need to use a virtual framebuffer or headless display server.

Here are the steps you can follow to run a PyQt app without X desktop:

Install the xvfb package (or equivalent for your operating system) if it is not already installed.

Launch the virtual framebuffer using the following command:

python
Copy code
xvfb-run -s "-screen 0 1024x768x24" python your_app.py
Replace your_app.py with the filename of your PyQt app. The -screen 0 1024x768x24 option specifies the screen resolution and color depth.

Your PyQt app should now run in the virtual framebuffer.

Note that you may need to adjust the screen resolution and color depth to suit your needs. Additionally, some features of PyQt may not work without a display server, so you may need to modify your app accordingly.

We should try that. @kasasxav ;-)

Make sure to properly disconnect camera (Allied Vision)

c:\users\ando\documents\imswitch_dev\imswitch\imcommon\view\guitools\naparitools.py:103: FutureWarning: Public access to Window.qt_viewer is deprecated and will be removed in
v0.5.0. It is considered an "implementation detail" of the napari
application, not part of the napari viewer model. If your use case
requires access to qt_viewer, please open an issue to discuss.
  napariViewer.window.qt_viewer.dockLayerList.show()
c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\view\widgets\ImageWidget.py:94: FutureWarning: Public access to Window.qt_viewer is deprecated and will be removed in
v0.5.0. It is considered an "implementation detail" of the napari
application, not part of the napari viewer model. If your use case
requires access to qt_viewer, please open an issue to discuss.
  canvas=self.napariViewer.window.qt_viewer.canvas,
c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\view\widgets\ImageWidget.py:95: FutureWarning: Public access to Window.qt_viewer is deprecated and will be removed in
v0.5.0. It is considered an "implementation detail" of the napari
application, not part of the napari viewer model. If your use case
requires access to qt_viewer, please open an issue to discuss.
  view=self.napariViewer.window.qt_viewer.view,
c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\view\widgets\ImageWidget.py:96: FutureWarning: Public access to Window.qt_viewer is deprecated and will be removed in
v0.5.0. It is considered an "implementation detail" of the napari
application, not part of the napari viewer model. If your use case
requires access to qt_viewer, please open an issue to discuss.
  parent=self.napariViewer.window.qt_viewer.view.scene,
2022-10-20 11:07:29 DEBUG [ImConMainController] Initializing
2022-10-20 11:07:31 DEBUG [ImConMainController] Started server with URI -> PYRO:ImSwitchServer@:::54333
Object <imswitch.imcontrol.controller.server.ImSwitchServer.ImSwitchServer object at 0x000001F8D1405D30>:
    uri = PYRO:ImSwitchServer@[::]:54333
Pyro daemon running.
2022-10-20 11:07:31 DEBUG [ESP32Manager -> ESP32] COM3
2022-10-20 11:07:33 DEBUG [ESP32Manager -> ESP32] Trying out port COM3 failed
2022-10-20 11:07:33 ERROR [ESP32Manager -> ESP32] name 'serialdevice' is not defined
2022-10-20 11:07:33 DEBUG [ESP32Manager -> ESP32] COM4
2022-10-20 11:07:38 DEBUG [ESP32Manager -> ESP32] Trying out port COM4 failed
2022-10-20 11:07:38 ERROR [ESP32Manager -> ESP32] could not open port 'COM4': OSError(22, 'The semaphore timeout period has expired.', None, 121)
2022-10-20 11:07:38 DEBUG [ESP32Manager -> ESP32] No USB device connected! Using DUMMY!
2022-10-20 11:07:38 DEBUG [ESP32Manager -> ESP32] COM3
2022-10-20 11:07:40 DEBUG [ESP32Manager -> ESP32] Trying out port COM3 failed
2022-10-20 11:07:40 ERROR [ESP32Manager -> ESP32] name 'serialdevice' is not defined
2022-10-20 11:07:40 DEBUG [ESP32Manager -> ESP32] COM4
2022-10-20 11:07:45 DEBUG [ESP32Manager -> ESP32] Trying out port COM4 failed
2022-10-20 11:07:45 ERROR [ESP32Manager -> ESP32] could not open port 'COM4': OSError(22, 'The semaphore timeout period has expired.', None, 121)
2022-10-20 11:07:45 DEBUG [ESP32Manager -> ESP32] No USB device connected! Using DUMMY!
2022-10-20 11:07:46 DEBUG [AVManager -> WidefieldCamera] Trying to initialize Allied Vision camera 1
2022-10-20 11:07:47 DEBUG [AVManager -> WidefieldCamera] camera connected
2022-10-20 11:07:47 INFO [AVManager -> WidefieldCamera] Initialized camera, model: AVCamera
2022-10-20 11:07:47 WARNING [AVManager -> WidefieldCamera] Property image_width does not exist
2022-10-20 11:07:47 WARNING [AVManager -> WidefieldCamera] Property image_height does not exist
2022-10-20 11:07:47 ERROR [AVManager -> WidefieldCamera] Other error.
2022-10-20 11:07:47 ERROR [AVManager -> WidefieldCamera] PixelFormat
2022-10-20 11:07:47 DEBUG [AVManager -> WidefieldCamera] Value not available?
10-20-2022 11:07:48.041 [T] cCameraActor - failed to setup features
2022-10-20 11:07:48 DEBUG [AVManager -> WidefieldCamera] A multiple registers read or write was partially completed.
2022-10-20 11:07:48 DEBUG [ImConMainController] Shutting down
2022-10-20 11:07:48 ERROR [ExceptionHandler] Traceback (most recent call last):
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\__init__.py", line 54, in getMainViewAndController
    controller = ImConMainController(options, setupInfo, view, moduleCommChannel)
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\controller\ImConMainController.py", line 37, in __init__
    self.__masterController = MasterController(self.__setupInfo, self.__commChannel,
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\controller\MasterController.py", line 26, in __init__
    self.detectorsManager = DetectorsManager(self.__setupInfo.detectors, updatePeriod=100,
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\managers\DetectorsManager.py", line 21, in __init__
    MultiManager.__init__(self, detectorInfos, 'detectors', **lowLevelManagers)
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\managers\MultiManager.py", line 26, in __init__
    self._subManagers[managedDeviceName] = manager(
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\managers\detectors\AVManager.py", line 29, in __init__
    self._camera.setPropertyValue(propertyName, propertyValue)
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\interfaces\avcamera.py", line 202, in setPropertyValue
    self.start_live()
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\interfaces\avcamera.py", line 60, in start_live
    self.camera.start_frame_acquisition()
  File "C:\Users\Ando\Anaconda3\envs\imswitch39\lib\site-packages\pymba\camera.py", line 241, in start_frame_acquisition
    raise VimbaException(VimbaException.ERR_INVALID_CAMERA_MODE)
pymba.vimba_exception.VimbaException: Invalid camera mode for the requested operation.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\controller\ImConMainController.py", line 140, in closeEvent
    self.__factory.closeAllCreatedControllers()
AttributeError: 'ImConMainController' object has no attribute '_ImConMainController__factory'

2022-10-20 11:07:48 ERROR [main] Failed to initialize module imcontrol
2022-10-20 11:07:48 ERROR [main] Traceback (most recent call last):
  File "c:\Users\Ando\Documents\ImSwitch_dev\imswitch\__main__.py", line 58, in main
    view, controller = modulePkg.getMainViewAndController(
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\__init__.py", line 57, in getMainViewAndController
    raise e
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\__init__.py", line 54, in getMainViewAndController
    controller = ImConMainController(options, setupInfo, view, moduleCommChannel)
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\controller\ImConMainController.py", line 37, in __init__
    self.__masterController = MasterController(self.__setupInfo, self.__commChannel,
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\controller\MasterController.py", line 26, in __init__
    self.detectorsManager = DetectorsManager(self.__setupInfo.detectors, updatePeriod=100,
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\managers\DetectorsManager.py", line 21, in __init__
    MultiManager.__init__(self, detectorInfos, 'detectors', **lowLevelManagers)
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\managers\MultiManager.py", line 26, in __init__
    self._subManagers[managedDeviceName] = manager(
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\managers\detectors\AVManager.py", line 29, in __init__
    self._camera.setPropertyValue(propertyName, propertyValue)
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\interfaces\avcamera.py", line 202, in setPropertyValue
    self.start_live()
  File "c:\users\ando\documents\imswitch_dev\imswitch\imcontrol\model\interfaces\avcamera.py", line 60, in start_live
    self.camera.start_frame_acquisition()
  File "C:\Users\Ando\Anaconda3\envs\imswitch39\lib\site-packages\pymba\camera.py", line 241, in start_frame_acquisition
    raise VimbaException(VimbaException.ERR_INVALID_CAMERA_MODE)
pymba.vimba_exception.VimbaException: Invalid camera mode for the requested operation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.