Skip to content

timothyhollabaugh/PPPLCalibrationFramework

Repository files navigation

PPPLCalibrationFramework

A tool to scan through multiple hardware axis and take measurements for the Princeton Plasma Physics Lab

This was developed during an internship for the Princeton Plasma Physics Laboratory (PPPL), sponsored by the DoE and run by Princeton University.

If you have ever needed to painstackenly scan through multiple dimensions are record measurements at each point, then this is for you!

Quickly scan through multiple points along many different axis (X, Y, power, frequency, etc) and measure the value(s) of a sensor at each one.

Note: This requires a custom fork of the Pyforms library: https://github.com/chickenchuck040/pyforms

Features:

  • Quickly create and configure axis to scan through
  • Jog axis manually
  • Specify a list of points to scan
  • Import a CSV of pre generated points
  • Export measured data to CSV

Supported Axis:

Supported Sensors

Dependencies

Many python dependancies are required for this program to run

Thorlabs APT

In order to control the Thorlabs APT motion stages, the thorlabs APT library is used. This can be downloaded and installed from https://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=Motion_Control

At first, I was using the 32 bit for software for 64 bit windows, along with 32 bit python, to get it to work with python. I may have gotten it to work with everything 64 bit.

To interface to python, I used https://github.com/qpit/thorlabs_apt. You will need to copy APT.dll from the "APT installation path\APT Server" directory to the thorlabs_apt/thorlabs_apt directory with __init__.py. Then, you will need to edit the setup.py file in thorlabs_apt to copy APT.dll to the installation directory when it installs. Including the line package_data={'': ['APT.dll']} in the setup function call in setup.py should work (See https://stackoverflow.com/questions/1612733/including-non-python-files-with-setup-py). Then run python setup.py install to install it.

Labjack

In order to talk to the Labjack T7 Pro used to read the photosensor, the labjack Python for LJM library was used: https://labjack.com/support/software/examples/ljm/python. Follow the directions there to download and install both Python for LJM and the LJM library.

Pyforms

To create the GUI, a custom fork of the pyforms library was used. The fork can be found at https://github.com/chickenchuck040/pyforms. It includes fixes that have not yet been merged into pyforms yet. To install, run python setup.py install. Dependancies for Pyforms can be found at http://pyforms.readthedocs.io/en/v2.0/#installation. Of the optional dependancies listed, PyOpengl, Numpy, and Python OpenCV are needed. In order to install pysettings, you will also need to install logging-bootstrap by running pip install git+https://UmSenhorQualquer@bitbucket.org/fchampalimaud/logging-bootstrap.git --upgrade See UmSenhorQualquer/pyforms#12 (comment) for more information.

qtawsome

For some of the icons in the GUI, qtawsome was used. This can be installed with pip install qtawesome

Cameralink Framegrabber and FLIR Tau 2 camera

In order to talk to the PCI DV C-Link framegrabber, you must download and install the PDV software and drivers from https://edt.com/file-category/pdv/. The configuration for the Tau2 camera can be found in the flir directory in this repository. These must be copied to C:\EDT\pdv\camera_config. There is one file for the 8 bit mode on the camera, and one for the 14 bit mode. This calibration program uses the 14 bit mode. The corresponding mode must be selected in the FLIR camera controller GUI before use. The FLIR camera controller GUI can be downloaded from http://www.flir.com/cores/display/?id=51880. Also, the correct configuration file must be selected by running the pdvshow application. This will let you view the image from the camera and ensure that it is working properly.