DataRay Blog

March 09, 2015

Tutorial: WinCamD Interface to Python

We have written a tutorial which explains how to use Python with our WinCamD beam profiling camera. Now you can have all the power of the DataRay software with the convenience of Python.

The first section of the tutorial explains how to create a custom graphic user interface with wxPython using DataRay ActiveX controls. The second section explains how to get raw data from the WinCamD beam profiling camera, write the raw data to a file and listen for events when the data is ready. The Python interface developed through this tutorial is available for download. Its only dependencies are a 32-bit version of Python (we recommend Python2.7), wxPython and comtypes. The interface to the WinCamD beam profiling camera is a quick read of 100 lines of code.

Besides allowing custom behavior and appearance, an interface to Python allows access to free, open-source libraries of mathematical and scientific tools such as numpy and scipy. There are also tools for data analysis such as pandas and data visualization such as matplotlib. With a vibrant open-source development community, Python is a great option for building an interface to DataRay beam profiling cameras such as the WinCamD.

Tutorials for developing interfaces in C++, Visual Basic, Labview and Python are available in the interfacing section of our website. Python interfaces for the Beam’R2 and BeamMap2 will be available shortly.

Posted by: Rocco Dragone