Skip to main content
March 28, 2018

About This Article

For a couple of years now, our group had been doing really good work in developing first-class coronagraph technology and wavefront sensing techniques for segmented apertures. During this process, one of the focus points of the work is to create a concise python package which controls the HiCAT testbed and its environment and which would eventually be ready to be freely shared for implementation on other high-contrast testbeds. 

Starting last year in October, we used the past six months to work on major infrastructure updates for JOST. We exchanged the CCD camera for a much faster CMOS camera, implemented a pupil imaging lens, and cleaned up the software. This included migrating all codes to GitHub and putting the repository on version control, translating Mathematica codes to Python, eliminating IDL pieces of the experimental software by translating them to Python as we'll and finally, implementing hardware interfaces by using those developed for HiCAT. After individual parts of the HiCAT module have been successfully tested, e.g. the parts for the camera and laser control, we decided it was time to fully install the package and integrate it in the JOST software.

The code developed for HiCAT was designed as a proper Python package installable with pip. Even further, the interfaces developed for each instrument are easily accessible by just installing the HiCAT package and importing them. While this comes with lots of code specific to HiCAT, it is a quick and easy way to access robust instrument control if you happen to use any of the same ones. We are planning to abstract out the hardware control interfaces into their own package in the future and make that package open source.

Each hardware interface follows a simple object-oriented paradigm where the parent is an abstract class (e.g. "Camera"), which defines specific methods and implements a context manager. Context managers are important for hardware control because they will gracefully close the hardware even if the program crashes unexpectedly. The child classes implement the abstract methods such as open(), close(), takeExposure() with code for the specific camera. This keeps your scripts generic and means changing cameras will have little to no impact on your code.

Implementing this on JOST meant we could see in what instances the HiCAT package needs to be more generalized. The installation and implementation worked seamlessly and fairly quick, and HiCAT and JOST are now running off the same Python package for hardware control! The modular structure of the package makes the construction of new experiments fast and straightforward and we hope to continue our work on JOST a lot smoother now.

Share This Page


For more information about the Russell B. Makidon Optics Laboratory, please .