Mon Jul 11 14:29:45 2022, Jon, Omnistructure, General, HEPA filter installed
|
Today I unpacked and installed the new HEPA filter for the lab. It is an Omni CleanAir OCA1210 capable of 1200 CFM. This flow rate is sufficient to turn over the air in the room once every 4 minutes, or 14 times per hour. Hopefully this will cut down on our particulate accumulation issues. |
Tue Jun 21 18:31:49 2022, Cassidy and Phoebe, Update, Cameras, IR Absorbing Screen and FLIR Camera Setup  
|
Today we set up the IR absorbing screen and the camera on the optical table, as well as tested that the camera was functioning as expected (picking up heat sources beyond the screen).
Screen Setup
The screen was set up by clamping it between two rectangular posts on each side. First, two posts were set up with 22 in. between them (thus allowing the screen to span a total distance of up to 24 in. when clamped down). To best stabilize the screen and to allow for it to be "pulled" taut by exploiting the give in the L-bracket, the L-bracket was bolted on the outside of the post, along the same axis as the screen itself.
On first attempt, the screen was too thin to be fully clamped between the posts. In order to have it fit snugly, sections of heat shrink tubing was used as a shim at the points where the posts were clamped together. The tubing was slid into the track of one optical post at the desired points. In order to accommodate the shim, the two posts had to be held together, ideally clamped, with the screen and shim in place. Then, the post clamps could be slid into the tracks of the post, moved to the optimal location, and tightened down. This required at least three people: two to tighten one side while the third holds up the screen on the other side. The screen was placed ~1/8" from the edge of the posts and flush with the top.
Camera Stage Setup
Once the screen was in place, the camera stage was set up by placing the XY-Translational with Rotation stage on four 3" optical posts. Then, the z-axis stage was placed in the center of that, with another 3" optical post on top, which was then topped with the camera. This was set and clamped down ~22.5" from the screen. This was about 1" closer than expected based on our theoretical models.
Fine Alignment
We used the visible camera to fine align the screen and to test the setup. Notably, the visible camera is placed below the infrared and thus requires a calibration in order to ensure the two are aligned on the computer image. This can be set by hand using the FLIR proprietary software (FLIR CamWeb) and adjusting the "MSX alignment". The image mode "Thermal MSX" allows both the visible and IR camera to be displayed at once and the difference in their positioning can be seen. We found an offset of ~0.5m to be nearly accurate (note: using this method, although you can get more accurate than this, the displayed value only has one significant figure).
In order to align the camera, we first used the exposed top edge to judge whether the camera was appropriately centered on the screen. We set the rotation as close as possible to being in line by eye, then adjusted the y-axis until the gap on both corners was a similar size, thus indicating that the rotation and y-position were correctly set. Rotationally, the camera required only a refinement of -1/2 degree. The y-axis is set at 1.25. Then, the camera was pulled as far from the screen as possible using the x-axis to allow the screen to be easily centered using the z-axis. Once the outlined test mass was centered, the x-axis was used to bring the camera close until the screen just barely filled the field of view. The x-axis is at 2.25. The z axis is set to it full dynamic range at 10. Unfortunately, the camera is still slightly too tall for the screen, likely requiring the purchase of a new optical post about 0.5in shorter the current one. This interchange will likely require a new fine alignment after.
Basic Imaging Tests
The camera was also focused on the screen based on the manufacturer's printed distance on the camera itself (using 22.5", or 0.572 m). Using the FLIR proprietary software, the camera appears to be in focus in IR (a hand was used as a good focusing tool for this). Additionally, the camera does pick up heat on the other side of the screen. A hand can be lightly seen warming the screen, as can a soldering iron tip. This was a very imprecise visual tool, but does indicate that the camera and screen are working roughly as expected.
Next Steps
A new optical post that is ~2.5" tall should be ordered to replace the one under the camera currently. The heating system also needs to be ordered and set up. Currently we are debating between a parabolic reflector with a hole in the back, and one without, as each would require a different mounting mechanism for the cartridge heater. |
Thu Jun 2 21:55:02 2022, Jon, Update, Cameras, FLIR Camera Setup 
|
The new FLIR A70 infrared camera has arrived. Tyler and I unpacked it in the lab yesterday. In less than an hour, we succeeded in powering it on and connecting it to the lab network. We have assigned it the static IP address 192.168.1.6.
Online Configuration Portal
The FLIR camera can be configured, as well as stream live data, through a web browser interface. It can be accessed from any workstation on the lab network by navigating in the browser to http://192.168.1.6. The login credentials are stored here (log in with your LIGO.ORG credentials).
Next Steps
The next step is to install FLIR's Python API for controlling and reading out the camera on chimay. The API comes with demo codes which we can use to test the basic connectivity and which will serve as a reference for developing our own Python interface over the summer. |
Fri Jun 3 13:03:33 2022, Jon, Update, Cameras, FLIR Camera Setup
|
Summary
I have installed the requisite software on chimay for interfacing the FLIR A70 camera in Python. There are two packages required from FLIR:
- Spinnaker SDK, which provides the low-level camera drivers and a C/C++ API.
- PySpin, a wrapper of the Spinnaker library which provides the Python API.
These installations did not work out-of-the-box for Debian 11 (only Ubuntu is officially supported). I had to make several modifications which are documented below for future reference.
This setup has not yet been tested with the camera connected to chimay.
Documentation and Demo Codes
The PySpin package comes with a number of Python demo codes and a complete API reference. These can be found on chimay at the following locations.
- Example codes:
/opt/spinnaker/python/Examples/Python3/
- Python API reference manual:
/opt/spinnaker/python/docs/PySpinDoc.pdf
Installing Spinnaker SDK
Below were the steps required to install Spinnaker on chimay (Debian 11).
- Download the Spinnaker binaries (AMD64 architecture) and copy the tarball to, e.g.,
/home/controls on chimay.
- Unpack the tarball contents and enter the new directory:
$ tar -xf spinnaker-2.6.0.160-Ubuntu20.04-amd64-pkg.tar.gz $ cd spinnaker-2.6.0.160-amd64
Next, install the dependencies (on chimay, these were all already installed):
$ sudo apt-get install libavcodec58 libavformat58 \
libswscale5 libswresample3 libavutil56 libusb-1.0-0 \
libpcre2-16-0 libdouble-conversion3 libxcb-xinput0 \
libxcb-xinerama0
There is one additional dependency, qt5-default , which is obsolete in Debian and no longer available via the package manager (that is, its functionality was absorbed into other Qt packages). I was able to find a workaround based on these instructions.
- Install all the dependencies of
qt5-default :
$ sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
- Manually remove the
qt5-default dependency from the Spinnaker package.
Unpack the spinview-qt_2.6.0.160_amd64.deb package:
$ mkdir tmp $ cd tmp $ ar -x ../spinview-qt_2.6.0.160_amd64.deb $ tar xf control.tar.xz
Open the file control in a text editor and delete the qt5-default dependency from the Depends list.
Then repackage the contents:
$ tar cfJ control.tar.xz control
$ ar rcs ../spinview-qt_2.6.0.160_amd64.deb debian-binary control.tar.xz data.tar.xz
$ cd .. $ rm -rf tmp
This overwrites the original package with a version no longer containing the qt5-default dependency.
- Now proceed with running the install script:
$ sudo sh install_spinnaker.sh
This will install the Spinnaker library at /opt/spinnaker . Spinnaker also provides a standalone GUI application, SpinView, which can be executed from the terminal (from any directory) via the command spinview .
Installing PySpin
The main challenge with installing PySpin was that it is currently only supported for Python <=3.8. The system installation on Debian 11 is Python 3.9 and 3.8 is not available within the package manager. Following these instructions, I manually installed a second version of Python (3.8) on chimay, in a way that should not interfere with the system installation.
The Python 3.8 executable is in the system path and can be run only via the command python3.8 . It is not symlinked to python or to python3 . Those remain linked to the preexisting Python 3.9.
After installing Python 3.8, I proceeded with the installation as follows:
- Download the PySpin package (x86_64 architecture) and copy the tarball to, e.g.,
/home/controls on chimay.
- Unpack the tarball contents and into a new directory:
$ mkdir python
$ mv spinnaker_python-2.6.0.160-Ubuntu20.04-cp38-cp38-linux_x86_64.tar.gz python $ tar xf spinnaker_python-2.6.0.160-Ubuntu20.04-cp38-cp38-linux_x86_64.tar.gz
- Move the new directory into the Spinnaker installation directory:
$ sudo mv python /opt/spinnaker $ cd /opt/spinnaker/python
- Install the dependencies:
$ sudo python3.8 -m pip install --upgrade numpy matplotlib
- Finally, install PySpin itself:
$ sudo python3.8 -m pip install spinnaker_python-2.6.0.160-cp38-cp38-linux_x86_64.whl
If this succeeded, you should now be able to enter import the package PySpin as
$ python3.8 >>> import PySpin
without error.
|
Mon Jun 6 17:11:48 2022, Jon, Update, Cameras, FLIR Camera Setup 
|
Today I tested the Spinnaker/PySpin software installations (detailed in ELOG #4) with the FLIR camera connected to chimay. It works!
Example codes
I was able to run several of the PySpin example codes. In particular, there is one which connects to the camera and streams live data to a pop-up Matplotlib window that looks very useful. It is called AcquireAndDisplay.py .
When running these, it is important to keep in mind that PySpin requires Python 3.8, which is not the default system version on chimay. So to run AcquireAndDisplay.py , for example, you must explicitly call the correct version of Python:
$ python3.8 AcquireAndDisplay.py
The standard python and python3 aliases are still linked to the system version (3.9), so calling these will result in a PySpin import error.
Git repository
I have set up a git repo for our FLIR camera control code. I have populated it with an Examples directory which contains the PySpin Reference Manual as well as all the example codes (see the README). There is a local copy of this repo on chimay at /home/controls/FLIR .
Other FLIR streaming software
In addition to the PySpin demos, there are several fully developed applications provided by FLIR. While we do not plan to use these long term, they may be very useful for debugging and cross-validation of our Python interface during development:
- Browser interface: From any web browser on the local lab network, navigate to http://192.168.1.6 and log in (credentials here). This interface supports live data streaming as well as full control of the camera settings.
- SpinView: A standalone application provided as part of the Spinnaker SDK. It supports streaming live camera data as well as saving images and videos. It can be launched from the terminal on chimay via the command: $
spinview
- Research Studio: This is FLIR's proprietary software, for which we have a one-year license. It can be launched from the terminal on chimay via the command:
$ FLIRResearchStudio
Permanent cabling
Since everything appears to be working, I ran a permanent Cat 6 cable from the lab switch to the camera's power+I/O adapter. The adapter is plugged into a UPS-protected power strip overhanging the optical table, as pictured below. To prevent the adapter from unplugging itself under its own weight, I attached a zip tie around the adapter to hold it securely in place. |
Thu Jun 2 16:14:58 2022, Jon, HowTo, General, Custom conda environment on JupyterHub
|
Cross-linking instructions: How to run a Jupyter notebook in your custom Conda environment |
Sun Apr 10 15:39:49 2022, Rutuja Gurav, HowTo, Computer Scripts/Programs, HowTo: Renew the Let's Encrypt SSL certificate using certbot
|
Port 80 is kept closed by default. This might be causing the certbot auto-renewal cronjob to fail. Therefore we must renew the certificate manually.
Step 1: Open port 80. (This is needed as the certificate renewal process runs some tests which requires client communication over port 80)
Step 2: Run the following command
sudo certbot certonly --force-renew -d richardsonlab.ucr.edu
Step 3: Confirm the certificate was renewed by running the following command
sudo certbot certificates
|
|