Skip to main content

PYSILICO: Prosilica AVT camera controller for Plico

Python package codecov Documentation Status PyPI version

pysilico is an application to control Allied AVT/Prosilica cameras (and possibly other GigE cameras) under the plico environment.

Installation

On client

On the client machine

pip install pysilico

On the server

On the server machine install the proprietary driver for the camera you want to control. Currently only AVT/Prosilica camera are supported through Vimba

For AVT / Prosilica

First install Vimba (that comes with the camera, or download Vimba SDK from AVT website). Assuming you have downloaded and unpacked Vimba6 in the Downloads folder on a Linux machine:

cd ~/Downloads/Vimba_6_0/VimbaGigETL/
sudo ./Install.sh

Check that the Vimba installation is successful (you may need to log out and log in) and that the camera is accessible by the server using VimbaViewer, the standalone application provided in Vimba SDK. You should be able to see the cameras reachable in the network and you should be able to stream images.

cd ~/Downloads/Vimba_6_0/Tools/Viewer/Bin/x86_64bit
./VimbaViewer

Then install the Vimba python wrapper. It is suggested to use a dedicated python virtual environment, like conda (check elsewhere how to install Anaconda and create a virtual environment).

Now you can install the Vimba python wrapper in the

cd ~/Downloads/Vimba_6_0/VimbaPython/
./Install.sh

The script Install.sh is to date not working with conda virtual envs. If you are using conda and the command above fails, the following should do the work :

cd ~/Downloads/Vimba_6_0/VimbaPython/Source
pip install .

Check that the installation is successfull by running the provided example, like the one below:

cd ~/Downloads/Vimba_6_0/VimbaPython/Examples
python list_cameras.py

The ouput shows that camera(s) has been properly detected.

(pysilico) lbusoni@argos:~/Downloads/Vimba_6_0/VimbaPython/Examples$ python list_cameras.py 
//////////////////////////////////////
/// Vimba API List Cameras Example ///
//////////////////////////////////////

Cameras found: 1
/// Camera Name   : GC1350M
/// Model Name    : GC1350M (02-2130A)
/// Camera ID     : DEV_000F3101C686
/// Serial Number : 02-2130A-06774
/// Interface ID  : eno2

Install server

As a last step you always have to install the package pysilico-server

pip install pysilico-server

Usage

Edit config file

The config file location depends on the operating system. In Ubuntu is /home/labot/.config/inaf.arcetri.ao.pysilico_server/pysilico_server.conf. When the server is started, it prints the config file location on standard output. Open the file and adapt it to your case.

In this example we want pysilico_server to control 2 cameras: a Manta 419 whose IP address is 192.168.29.189 used for a SH WFS, and a GC1350 (IP 192.168.29.194) used as PSF monitor. We reduce the streaming rate to 20MB/s in such a way that no packet will be lost during transfer to the server PC.

Every [cameraN] entry in the config file correspond to a pysilico server; you may add as many as you want. Every [cameraN] entry must have a camera= key linking to a [deviceX] entry that specifies the camera model, IP, etc.

[deviceManta419]
name= AVT Manta G-419B 5CA8
model= avt
ip_address= 192.168.29.189
streambytespersecond= 20000000
binning= 1

[deviceGC1350M]
name= AVT GC 1350M C686
model= avt
ip_address= 192.168.29.194
streambytespersecond= 20000000
binning= 1

[camera1]
name= SH WFS Ibis
log_level= info
camera= deviceManta419
host= localhost
port= 7100

[camera2]
name= PSF Ibis
log_level= info
camera= deviceGC1350M
host= localhost
port= 7110

Starting Servers

Start the servers with

pysilico_start

The servers are logging info in a dedicate log file. The log file name is printed on the standard output when the server is started.

On Ubuntu it can be in /home/labot/.cache/inaf.arcetri.ao.pysilico_server/log/camera1.log (and camera2.log and so on for the other servers)

Check in the log file that the server is properly running and communicating with the camera; it should periodically dump a line like "Stepping at xx Hz"

Using the client module

We assume that pysilico_server runs on '192.168.29.132'.

In a python terminal on a client computer on which pysilico has been installed:

In [1]: import pysilico

In [2]: cam_sh= pysilico.camera('192.168.29.132', 7100)

In [3]: cam_psf= pysilico.camera('192.168.29.132', 7110)

In [4]: frames= cam_sh.getFutureFrames(10)

Using the GUI

Run pysilico_gui

Stopping pysilico

To kill the servers run

pysilico_stop

More hard:

pysilico_kill_all

Administration Tool

For developers.

Testing

Never commit before tests are OK! To run the unittest and integration test suite cd in pysilico source dir

python setup.py test

Creating a Conda environment

Use the Anaconda GUI or in terminal

conda create --name pysilico

To create an environment with a specific python version (you need > 3.7 for Vimba)

conda create --name pysilico python=3.8

It is better to install available packages from conda instead of pip.

conda install --name pysilico matplotlib scipy ipython numpy

Packaging and distributing

  1. Update the version in version.py and commit
  2. Create a new release
  3. If you have the proper rights (see PYPI_API_TOKEN in Settings/Secrets), the Action automatically builds and uploads the wheel on pypi

Release files for pysilico 0.22.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysilico 0.22.0
File Size Uploaded
pysilico-0.22.0.tar.gz 32.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysilico 0.22.0
File Interpreter ABI Platform
pysilico-0.22.0-py3-none-any.whl Python 3 none any Details

Total release size: 62.5 kB

Release files / pysilico-0.22.0.tar.gz

Download URL pysilico-0.22.0.tar.gz
Size 32.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c634fb70c8d018ca41cb1eb4afbb7c8d0dca6884f54fa78c1d482a1a9a55d59b
BLAKE2b-256 checksum
How to use checksums
9136f947631d2636af601d0d7fdf9651ce2d80990f8e79a9a1463f9663b8123e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / pysilico-0.22.0-py3-none-any.whl

Download URL pysilico-0.22.0-py3-none-any.whl
Size 30.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9375ca236f5661624a7a27f9ef6ecede5ded6d89f3c907e0241ae7740974ab98
BLAKE2b-256 checksum
How to use checksums
b456a848f924fa1e520dfe9390a5ae16f17f16989ff69e3ca7c9607043b4d0eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

0.22.0 This release

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.15.3

2 release files

0.15.0

2 release files

0.12

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page