I have previously covered the importance of warping, tuning the Keck primary mirror segments for optimum optical performance. Warping has been my responsibility for some years now. Reading out the settings of the thirty strain gauges on the back of each segment is performed by a test fixture, a computer and a sensitive data acquisition system. Over the last year I have designed, built, and programmed a new test fixture.
The old warping fixture was showing its age. Built in 2000 it has been in use for 16 years. It is the computer that I was most worried about, it has begun to crash randomly, usually at the worst possible time. Replacing the computer has some issues as well, the A/D system uses a parallel interface, something not found on any modern computer. The operating system is Windows XP, while unsupported, at least you can still install and use this old operating system. The software is in an ancient version of LabView. I have no love for LabView, too many bad experiences with it, it crashes too often and the licensing issues are horrible.
As this is the third generation warping test fixture the name of the software is obvious… Warp3
The hardware is simple… A data acquisition system to read the analog voltages. A tablet computer to control everything. There is a calibration reference built into the fixture for calibrating out the little errors that will be there when measuring microvolts. Everything is built into a single hard case, nice and small, easy to carry. The old system took two trips to move into the mirror cell, not fun when climbing stairs at 14,000ft elevation.
The operating system is Windows 8, not much choice with the National Instruments data acquisition system (DAQ). This runs on a WinBook TW700, a $70 tablet with a touch screen interface. The DAQ runs on USB, the warping files are loaded and the results files returned on an external USB drive. There is no WiFi on the summit, you have to manually move things. Indeed, the computer is cut off from the network, and always will be, no more updates.
The new software is written entirely in Python. This is an open source programming language with no licencing issues, it is simply free. With a huge worldwide intertia behind Python it will be here for decades to come. A plus is that most of the programmers around the observatory use Python, no issues with maintenance.
I automated a lot of the file operations that were manual before. No more dragging files around, the software locates everything automatically and writes it back to the USB drive. I also put a lot of thought into quality control. In case something goes wrong there are log files and a lot of checks in the software to keep everything on the right path.
The program represents the largest programming project I have done in many years. Just under ten thousand lines of code, pressing my skill and knowledge. The setup is a tabbed system, each tab in the user interface representing one step in the process. Each tab is implemented by a class, this neatly broke the process down in to manageable parts for programming.
Interface with the National Instruments drivers is done with the PyDAQmx library. This is a Python wrapper that provides an interface between the NIDAQmx driver C functions and Python. The availability of this library was a primary consideration when I bought the National Instruments data acquisition systems. It worked, but required quite a bit of learning and experimentation on my part to figure out the complexities of C-Types and the DAQmx drivers.
The goal was to have the gear ready for the 2016 SegEx season when we would exchange all of the segments of Keck 2, six segments each month. As the May 18th deadline drew closer I frantically finished the last tasks and began testing the new warping gear. My test subject would be segment 5-27, sitting in the mirror barn the segment has some damage and is awaiting its turn in the new segment repair facility being readied at HQ.
I had great hopes for the first real segment to be warped. Segment 2-32 would be the first real trial of the fixture. One the first day of segment exchange there would be three segments to be warped, two would be done with the old fixture, one with the new fixture.
Rob is scheduled to be in the mirror cell with me for the first day of SegEx, warping the freshly exchanged segments. Ready to get going he grabs the new fixture and climbs down to the primary. “Uh Rob? I am sorry to inform you, you get to use the old gear.” We are only doing one segment with the new gear, and I get to do that. I watch as Rob’s expression fades, he is not happy, I have taken away the shiny new toy. Sorry Rob.
The segment warps easily, the new fixture operating as designed. After so many years of using the old gear this is so much easier and faster. Now I only need to sweat it overnight as I await the results.
I was not happy when I read the daylogs the next morning…
K2-25415 Time Lost: 00:00 h
SP12 looks like it was poorly warped, and SUFS showed many missed spots tonight. Mitch reported that it looked like the errors were twice as large as they were last night — perhaps a wrong sign in the warping?
Crash and burn.
After the initial despair at failure began to wane I began to think about how to recover. I had the two hour drive up the mountain to toss ideas around in my mind. How to test the segment before I un-warped it? How could I figure out what went wrong? Make measurements with the old fixture?
The clue was the “wrong sign” suggestion in the nightlog. Arriving at the summit I pulled the new and old warping files, we had generated files for every segment to use with both the new and old fixtures. They should match. Sure enough… The signs are reversed, but notable only if you look in the right place. No problem with Kuochou’s new software that produces the data. No problem with my new software in my fixture for loading the data. The negative sign is in the old format Excel warping file, a formula we overlooked in the middle. Ouch!
Error found we had a choice. Do we make another attempt to warp with the new fixture? Is there anything else wrong? Re-warping on day two of SegEx is fine, the PCS system is scheduled again that night for checking the optical performance of the primary mirror. If we fail a second time? I need to come up again, re-warp the failed segment, and there will be no chance to measure and verify the results with the PCS system. I talk it over with Kuochou… Go for it!
It is Bryan who is assisting me for the second day of warping. Along with the three new segments from the second day of SegEx, Bryan and I re-warp segment 2-32 with the new fixture and a corrected warping file. Stepping out on a limb a bit here, I really want to prove the new fixture. Sharing the chore I also do one of the segments with the old gear, thus we each do two for the day, allowing the other to go take a break and get warm.
The email hits my box late in the evening…
Hi Andrew,
SP12-SN2-32 result measured at UT date 5/20 is good. Theta80 is 0.3”. Congratulations to your new gear. In fact, all six SegEx segments are warped well.Aloha and Best Regards,
Kuochou
Relief and elation! After months of effort, thousands of lines of code, and sweating every little detail… It works!
A fair amount of work remains. A second fixture to be built, documents to clean up and release, and another round of testing during the June SegEx. but is should all be a smooth process from here.
engage!
Tricky to warp with cracks propagating through the segments !
My understanding was the warping software was completely flawed for most of Keck’s existence.
JF modified said software before they drove him off? Were his improvements implemented ? Another wasted opportunity.
Using sky time for warping is asinine. Nothing will give you better warping info than a flat wavefront laser during the daytime thereby saving numerous evenings of wasted sky time.