tiagocoutinho / hamamatsu

Python library for hamamatsu detectors (lima plugin included)
GNU General Public License v3.0
11 stars 5 forks source link

Lima Installation Problems #4

Closed muxlmunich closed 1 year ago

muxlmunich commented 2 years ago

Thank you for the nice Hamamatsu Python interface.

At the step of the integration in Lima following error appears to the command pip install ./hamamatsu[lima]:

ERROR: For req: hamamatsu==0.1.3. Invalid script entry point: <ExportEntry hamamatsu-lima = hamamatsu.lima:None ['lima']> - A callable suffix is required. Cf https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.

Further, a question regarding the manual integration of the Hamamatsu camera into the limatoolbox: The hamamatsu/lima/cli.py file should be moved to the lima-toolbox/src/limatb/camera folder? and then the entry_points in the lima-toolbox/setup.py should look like that:

    entry_points={
        "console_scripts": ["limatb = limatb.cli:main"],
        "limatb.cli.camera": [
            "Basler = limatb.camera.basler:basler [basler]",
            "Eiger = limatb.camera.eiger:eiger [eiger]",
            "Hamamatsu = limatb.camera.hamamatsu:hamamatsu [hamamatsu]",
        ],
        "limatb.cli.camera.scan": [
            "Basler = limatb.camera.basler:scan [basler]",
            "Eiger = limatb.camera.eiger:scan [eiger]",
            "Hamamatsu = limatb.camera.hamamatsu:scan [hamamatsu]",
        ],
    },

The command limatb hamamatsu scan returns:

Usage: limatb [OPTIONS] COMMAND [ARGS]...
Try 'limatb --help' for help.

Error: No such command 'hamamatsu'.
tiagocoutinho commented 1 year ago

Sorry it took so long to get back to you.

I've updated master with a fix. Could you try again with these changes?

In principle there is no change necessary in lima-toolbox. The hamamatsu camera lib should be able to register itself in lima-toolbox at installation time (when you do pip install ./hamamatsu[lima]).

The Basler and Eiger are examples in lima-toolbox that don't have separate python libraries.

muxlmunich commented 1 year ago

Thanks for the improvement. In the meantime, we have found an alternative that is a little more suitable for us than a Lima server. A new Veresion of the Hamcam API offers the possibilities we were looking for.