key: cord-0580611-b1ppywvd authors: Meeker, Seth R.; Truong, Tuan N.; Roberts, Jennifer E.; Shelton, J. Chris; Fregoso, S. Felipe; Burruss, Rick S.; Dekany, Richard G.; Wallace, J. Kent; Baker, John W.; Heffner, Carolyn M.; Mawet, Dimitri; Rykoski, Kevin M.; Tesch, Jonathan A.; Vasisht, Gautam title: Design and performance of the PALM-3000 3.5 kHz upgrade date: 2020-12-15 journal: nan DOI: nan sha: c8bd33611f9a445981cf38fefe8d5a128164c2d5 doc_id: 580611 cord_uid: b1ppywvd PALM-3000 (P3K), the second generation adaptive optics (AO) instrument for the 5.1 meter Hale telescope at Palomar Observatory, was released as a facility class instrument in October 2011 and has since been used on-sky for over 600 nights as a workhorse science instrument and testbed for coronagraph and detector development. In late 2019 P3K underwent a significant upgrade to its wavefront sensor (WFS) arm and real-time control (RTC) system to reinforce its position as a state-of-the-art AO facility and extend its faint-end capability for high-resolution imaging and precision radial velocity follow-up of Kepler and TESS targets. The main features of this upgrade include an EM-CCD WFS camera capable of 3.5 kHz framerates, and an advanced Digital signal Processor (DSP) based RTC system to replace the aging GPU based system. Similar to the pre-upgrade system, the Shack-Hartmann wavefront sensor supports multiple pupil sampling modes using a motorized lenslet stage. The default sampling mode with 64x64 subapertures has been re-commissioned on-sky in late 2019, with a successful return to science observations in November 2019. In 64x mode the upgraded system is already achieving K-band Strehl ratios up to 85% on sky and can lock on natural guide stars as faint as mV=16. A 16x16 subaperture mode is scheduled for on-sky commissioning in Fall 2020 and will extend the system's faint limit even further. Here we present the design and on-sky re-commissioning results of the upgraded system, dubbed P3K-II. The PALM-3000 (P3K) facility adaptive optics (AO) system [1] is an "extreme" AO (XAO) upgrade to the previous Palomar AO system [2, PALAO] , engineered to achieve RMS residual wavefront errors down to 105 nm on bright natural guide stars for high-contrast observations, while also supporting general natural guide star use to V≈17. P3K re-purposed the original 241 active actuator deformable mirror (DM) of PALAO as the low-order DM (LODM) of the system, while adding the (then) largest format astronomical DM to date [3] with 66 × 66 PMN actuators (3388 active) as the high-order DM (HODM) in a woofer-tweeter configuration. This high-order correction was necessary for the driving science cases of the system, including imaging of faint Kuiper Belt Objects, stellar evolution studies of pre-main sequence binaries at visible wavelengths, and, especially, the direct imaging and spectroscopy of circumstellar environments and hot, young exo-Jupiters with the P1640 high-contrast integral field spectrograph (IFS) [4] . In addition to the main P1640 survey and the continued utilization of the facility Palomar High Angular Resolution Observer [5, PHARO] , P3K has served as a vital testbed for other high-resolution and high-contrast instruments and technology demonstrations, including the ten-milliarcseconds per-pixel EM-CCD camera (TMAS) and a myriad of experiments [6, 7, 8, 9] with the Stellar Double Coronagraph [10] . Figure 1 : Distribution of TESS candidate targets from the TESS Input Catalog v7, as a function of effective temperature, and TESS magnitude. PHARO and PARVI follow-up of a significant fraction of the coolest targets requires NGS operation down to V≈17. Image generated from the visualization tool found at tess.mit.edu/science/tess-input-catalogue/. Following P3K commissioning, the system has undergone continuous improvement and optimization [11] , including the roll-out of 32× and 8× pupil sub-sampling modes in the wavefront sensor (WFS) to trade highorder correction for decreased measurement noise, thus extending the faint-end performance of the system. This capability enabled and enhanced other science cases for the facility, including monitoring of Pluto and Charon near opposition [12] and follow-up of Kepler, K2, and TESS targets to check for stellar multiplicity or background sources. Additionally, after the P1640 survey was completed in 2018, the P1640 dewar and optics were re-purposed to build the Palomar Radial Velocity Instrument (PARVI, Beichman et al. in prep), a diffraction limited fiber-fed spectrograph for precision RV measurements. As such, while the SDC continues to operate for high-contrast experiments at Palomar, the dominant science cases for P3K have shifted from highcontrast to high-Strehl applications, with considerable interest in the follow-up of the faintest, reddest targets expected from TESS (see Figure 1 ). This provided the scientific motivation behind an upgrade of the existing CCD50 frame-transfer-CCD WFS camera to an OCAM 2 K electron-multiplying CCD (EMCCD) with enhanced red-sensitivity from First-Light Imaging, which would simultaneously improve performance and stability on faint targets with lower read-noise, while allowing a faster maximum frame-rate on bright targets. In addition to the above science motivations, the P3K real-time control (RTC) hardware was beginning to show signs of aging with several of the GPUs used for the wavefront reconstruction calculation failing and being replaced over the years. Beyond that maintenance issue, the RTC hardware and software would require some re-working to support the faster max frame-rate of OCAM 2 K. Leveraging our recent experience developing the RTC for NASA's Laser Communication Relay Demonstration (LCRD) integrated optical system [13, IOS] , a full update of the P3K RTC hardware and software was chosen, based on digital signal processors (DSPs) rather than GPUs, which enabled direct memory access (DMA) transfer from the camera framegrabber for the lowest possible compute latencies. Following development throughout 2017 and 2018, the upgraded system, referred to hereafter as P3K-II, underwent in-lab integration during Summer 2019, with several nights of on-sky re-commissioning for the default 64× WFS sampling mode in September through November 2019, and a successful return to science operations in November 2019. The 16× WFS sampling mode is currently undergoing on-sky commissioning after being postponed due to the COVID-19 facility shutdown. In this proceeding we will present an overview of the P3K-II upgrade, performance estimates, and first on-sky results for 64× mode. Details of the PALM-3000 Shack-Hartmann wavefront sensor and RTC can be found in Dekany et al. [1] , but we will briefly summarize the pre-upgrade system here for purpose of camera comparison. The original camera was a 128 × 128 pixel split frame transfer CCD50 from E2V, packaged in a "Li'l Joe" controller head from SciMeasure Analytical Systems. The data are read out at a handful of selectable pixel rates, with corresponding read-noise values. Continuous frame rate selection was enabled by programming a delay between read-out of the final pixel and execution of frame transfer. Camera data was transferred to the Cassegrain cage electronics rack via two cable bundles, where the WFS controller electronics box was mounted, then subsequently sent by CameraLink over optical fiber and optically split to the bank of 8 PCs hosting 16 GPUs that performed wavefront reconstruction. The new OCAM 2 K WFS significantly simplifies this configuration. All control electronics exist within the OCAM 2 K itself with commanding over serial connection through the use of full CameraLink. An EDT full CameraLink transceiver is installed within the P3K-II enclosure, allowing us to command OCAM 2 K and readout frames via a direct fiber link from the P3K-II enclosure to the Palomar computer room, reducing weight and heat load in the Cassegrain cage electronics. The P3K-II OCAM 2 K is programmed with a custom firmware from First-Light Imaging to provide a region-of-interest (ROI) readout mode, capable of 3.5 kHz frame rate, with 128 × 128 pixel format to match the format of our previous camera. Matching the custom OCAM 2 K ROI to the CCD50 array format is one of several measures taken during this upgrade to avoid modifications to other software, algorithms, and calibration scripts. Of course, the other major benefits of upgrading to OCAM 2 K are the sub-electron read-noise when operating at high EM gain, and the increased red sensitivity. We characterized OCAM 2 K in the AO lab at Palomar and confirmed the expected 0.3 e − mean read-noise in our ROI when operating at the highest EM gain of 600. The full noise curve is shown in Figure 2 along with quantum efficiency (QE) curves for CCD50 and OCAM 2 K that illustrate the increased red sensitivity of OCAM 2 K at the expense of lowered blue sensitivity. A comparison of relevant detector parameters is tabulated in Table 1 . Both CCD50 and OCAM 2 K have 24µm pixels, which greatly simplified the opto-mechanical interfacing to the new camera. Figure 3 shows the CAD model and photograph of the WFS assembly with OCAM 2 K installed. Because of the identical pixel sizes, the same relay optics could be used for either camera, and thus no optical redesign was required. The baseplate that supports the relay optics and the WFS camera was redesigned with hole patterns and alignment pins to support either CCD50 or OCAM 2 K to enable the relatively easy swapping of cameras if necessary. The OCAM 2 K detector must be operated at -45 • C, requiring the camera to be liquid cooled. This adds some additional consideration since P3K-II is a Cassegrain mounted instrument and is frequently moved between observing floor and AO lab for instrument changes. To reduce the cycling of the quick-release connectors on the OCAM 2 K camera itself, the flexible hoses from OCAM 2 K connect to a small assembly of rigid plumbing installed within the P3K-II enclosure, including a small expansion tank to accommodate internal pressure swings when moving from the cold observing floor to the warm AO lab. The rigid plumbing exits the enclosure through a bulkhead and terminates with two more quick release connectors. During instrument moves the facility glycol lines are easily attached/detached at this external access point, eliminating extra handling of the enclosure plumbing. As additional safeguards, the enclosure plumbing includes an in-line flow meter, and a length of wetness-sensor rope along the hoses and perimeter of the enclosure. The facility cooling loop and OCAM 2 K are both shutdown if wetness is detected within the enclosure or if flow is lost to OCAM 2 K. The original P3K RTC was based on a GPU implementation of sixteen retail NVIDIA 8800 GTX graphics cards hosted in eight HP Opteron PCs (PC1-8), in conjunction with a Servo PC (PC0) that consolidated the reconstruction results and a Database PC (p3k-telem) that provided overall control and logging of high-speed telemetry. The WFS signal was split using an optical splitter and distributed to PC1-8, each of which captured the frames with EDT framegrabbers. All ten PCs were interconnected using a Quadrics QsNetII 16 port switch for high speed communication. After reconstructed wavefront and computation of mirror commands on the Servo PC, a HODM inter-actuator check was performed in software, as the HODM driver electronics do not Figure 3 : (Top) Side-view of the P3K-II WFS assembly. Light enters from the left, indicated by the blue arrow, passing through an acquisition camera (ACAM) pickoff, field stop, and baffle, then following the blue raytrace to the interchangeable lenslet assembly. Lenslet spots are re-imaged through a two-lens telecentric relay to OCAM 2 K. The camera and relay are mounted on a linear stage to adjust for the different focal lengths of the lenslets. (Bottom) a top-down view of the WFS assembly with covers removed for clarity. OCAM 2 K is in the top left of this image. include a safeguard against applying too-large interactuator strokes. The TTM, LODM, and HODM commands were then issued through a 4-channel Curtis-Wright FibreExtreme over fiber to the driver electronics in the Cassegrain cage. The HODM control electronics implemented another inter-actuator check in FPGA firmware for redundancy. A detailed explanation of the original P3K RTC architechture and performance can be found in Truong et al. [14] . Another driving constraint for this upgrade was to maintain the formatting and syntax of all pre-upgrade Database products, commands, and status messages to ensure compatibility with the GUI software, motor automations, and many calibration and analysis scripts. The P3K-II upgraded RTC is based on a digital signal processor (DSP) implementation over four DSPC-8682G2-00A2E DSP cards from Advantech, housed in a PCIe expansion box, which functionally increases the PCIe backplane capacity of the new combined Servo and Database PC (p3k-telem2). WFS frames are captured using an Alacron Fast1703 framegrabber, which was selected because it provides the key innovation of this configuration by enabling direct memory access (DMA) transfer of the camera data to the DSP boards. Camera command and data capture is all performed by a single framegrabber over full CameraLink, removing the need for optically splitting the WFS signal over multiple machines. Instead, we use PCIe multicast functionality to instantly distribute pixel data to all DSPs without executing additional transfers and eliminating any timing jitter that would be incurred by routing through the host machine. Wavefront reconstruction is performed by a vector matrix multiplication, split over the 32 cores of the four DSP boards. Each board receives the full set of WFS pixel data, and each core is responsible for computing a sub-region of the centroids, then multiplying by the associated segment of the reconstructor matrix. After camera integration, the frame is transferred to the optically shielded storage areas for each amplifier region on the chip and readout through the EM registers, with a 43µs latency from end of integration to first pixel data availability. Computation begins as soon as the first four lines of pixel data are received on the DSPs to parallelize with the collection of pixel data. The full readout time takes 243µs, and with this parallelization the RTC computation takes only an additional 4 µs. The HODM interactuator check algorithm is included in this computation stage, before consolidating the HODM position commands. Consolidation of the TTM, LODM, and HODM commands are done on the DSPs, and data is then DMA transferred to a Curtis-Wright board for optical fiber transfer of the commands to the driver electronics. A more detailed description of this DSP RTC implementation is given by Truong et al. (these proceedings). The Cassegrain cage DM electronics are unchanged, and the P3K-II servo control block diagram remains the same as that presented in Truong et al. [14] . The full RTC latency at 3500 Hz from the end of camera integration to sending of DM commands from the Curtis-Wright board takes 300µs. Since the driver electronics for TTM, LODM, and HODM are unchanged, the latencies associated with execution of those commands after leaving the DSP are unchanged, and are expected to match the timing benchmarked in Dekany et al. [1] of 50 µs for inter-actuator voltage check in FPGA hardware and 60 µs in the HODM electronics themselves. This suggests a total latency from end of camera integration to HODM movement of 410µs for the HODM -or 553 µs (2 frames) total latency when measured from middle of camera integration through HODM voltage settling. Figures 4 and 5 provide comparisons between the hardware configuration and timing performance of the original RTC and P3K-II. In-lab direct measurement of this full system latency still needs to be verified. In the DSP RTC implementation for IOS, from which this design was largely inherited, the reconstructor and other calibration table sizes were small enough to store two full copies in dual compute buffers, such that new tables could be loaded during closed-loop operation and activated by simply switching a pointer with no frames skipped in the computation. Part-way through development we discovered that a direct port of the IOS RTC architecture, scaled up for P3K-II would not fit on the cache memory resources available in the DSPs. Dual compute buffers would have required a doubling of the number of RTC boards, and possibly an additional PCIe expansion. Instead, when loading a new table, each element in the lone compute buffer is updated as soon as the computation is done with that element. This architecture rework resulted in more efficient resource usage, which ultimately led to some time saved in the RTC computation, at the expense of further development time. Because of the size of the reconstructor table, loading requires several compute cycles. Other tables can still be loaded with sub-frame latency during closed-loop operation, which was especially desirable for using externally computed centroid offsets as a means of injecting external wavefront control. Expected performance is estimated using an error budget tool developed and refined over many years at Caltech and JPL for PALAO, P3K, IOS, and Keck NGAO. Atmospheric assumptions from the error budget, performance and dominant error terms are listed in Table 2 for a V=7 M3 NGS, comparing P3K-II with OCAM 2 K against the pre-upgrade expectation with CCD50. Considering that the camera and RTC are the only components changed with this upgrade, any error terms related to the rest of the system and the DMs remain unchanged. Aside from some negligible difference in chromatic error due to the different detector QEs, the major difference is the ability to run P3K-II faster, decreasing Bandwidth and Measurement error terms. A comparison of performance curves as a function of NGS brightness is included in Figure 10 . P3K-II re-commissioning of the 64× mode took place on the calendar dates of September 12-14, October 08, and November 07, 2019. P3K-II is not equipped with an atmospheric turbulence simulator, so just as with the original P3K commissioning, performance as a function of NGS brightness could only be determined onsky. Data were collected using PHARO, prioritizing K-band observations using K, K s , or Brackett-γ filters depending on target brightness. Pre-upgrade engineering data was typically collected in these filters, allowing easy comparison to the pre-and post-upgrade system performance, which is assessed by the K-band Strehl ratio as a function of NGS V magnitude. Over the six re-commissioning nights we collected data across the full span of brightnesses that 64× mode could safely operate on, with EM-CCD over-illumination potentially occurring for targets brighter than V≈-1. During science operations in November 2019, stable lock was achieved on targets as faint as V=16.2. Figure 6 presents all re-commissioning K-band Strehl ratios, divided by observing night, along with the error budget predicted 64× performance curve. Average conditions from each night are tabulated in Table 3 . Throughout re-commissioning we primarily targeted M type stars down to V≈11, beyond which spectral type is not known. In addition to K-band Strehl ratio vs. NGS magnitude, we characterized the system's on-sky disturbance rejection and -3dB bandwidths for the TTM and both DMs at a variety of gains, checked for any NGS color dependency in the level of correction achieved, and demonstrated closed-loop performance on extended objects by observing Neptune. Initial results from these measurements show the expected performance compared to the pre-upgrade system, but full analysis is on-going. For comparison with pre-upgrade performance we re-processed and recomputed Strehl ratio for our full archive of P3K+PHARO engineering data covering all WFS sampling modes previously supported. Figure 10 presents this data against P3K-II 64× re-commissioning data, with data series identified by the WFS camera name and sampling mode. For reference, the error budget expected curves are also included for both versions of the system. Overall, we see that the greatly improved faint NGS stability of the P3K-II upgrade provides 64× mode Strehl ratios that rival the pre-upgrade performance over all modes, which depended quite strongly on the prevailing conditions. On the bright NGS end we see P3K-II slightly underperforming expectation. The highest 64× Kband Strehl ratio achieved by P3K-II to date is 85% (Figure 7) , versus 91% pre-upgrade. It is worth mentioning that the best pre-upgrade K-band Strehl ratio was achieved under excellent conditions. Along those same lines, when examining the re-commissioning performance breakdown by date in Figure 6 we see an interesting correlation with the conditions in Table 3 . Despite having poorer seeing conditions than the two previous nights, consistently better performance was achieved on the evening of 20190915 when the wind shifted direction. This data supports something that has been known anecdotally at Palomar, that better AO performance has historically been achieved when the winds are out of the West. This illustrates further that, even though average seeing and wind speeds may suggest median conditions, a joint analysis of measured Strehl ratios with archived weather data (seeing, temperature, wind at all altitudes, etc.) is needed to truly understand if the system is underperforming relative to previous data. On faint NGS, P3K-II is outperforming the error budget expectation considerably. This was true with the pre-upgrade system as well, but not made as clear due to the larger variation in performance depending on prevailing conditions. This performance boost is attributed to improvements in the Shack-Hartmann centroiding algorithm [15] and a Bayesian reconstructor algorithm [16] that computes an optimal regularization parameter based on a measurement of r 0 extracted from the WFS residuals. These improvements were added to the system throughout the original P3K optimization effort to improve faint NGS performance, but are not captured in an analytical way in our error budget. We will instead explore the benefit of these techniques in future work via This major upgrade was not without some issues and lessons learned along the way. A development issue related to limited DSP memory was already mentioned earlier. Following the 64× re-commissioning phase, we also discovered significantly higher flexure in the WFS mounting coming from the focus stage supporting OCAM 2 K, causing a misalignment of the OCAM 2 K with respect to the lenslets whenever crossing meridian. After subsequent engineering time on-sky, this issue is well understood, and can be resolved with a calibrated adjustment to the lenslet positions when crossing meridian during an observation or telescope slew. Our investigation suggests the increased pitch and yaw error could result from the stage's roller bearings losing their pre-load. Repair is underway, though the cause of this remains a mystery. We are left to speculate that the issue was present prior to the upgrade, but only revealed itself with the additional weight of the new camera. The immediate near-term goal for the system is the commissioning of the 16 × 16 subaperture WFS sampling mode, operating in a Fried geometry with the LODM, which is expected to further extend the faint limit of the system by 2 magnitudes. This work was originally planned for early-mid 2020, but was postponed to late 2020 due to the COVID-19 pandemic. Further analysis is also required to quantify the improved performance, if any, on redder NGS. Preliminary analysis looking for higher throughput at redder wavelengths has so far shown no appreciable difference, however, our pre-upgrade engineering data predominantly targeted hotter stars and few M stars. In our future P3K-II engineering we will plan to target a broader range of spectral types to carry out this comparison. To further reduce the full system latency and improve bright NGS performance, we also hope to incorporate the adaptive control techniques previously demonstrated on P3K and IOS [17] as part of the standard P3K-II operation, which will require a modest expansion of the RTC hardware. We have presented the design and first on-sky results from P3K-II, a major upgrade to the PALM-3000 NGS AO system at Palomar. The upgrade to a OCAM 2 K EMCCD WFS has significantly improved the reliability of the system's default 64 × 64 subaperture mode, providing a stable loop-lock on-sky on NGS as faint as V=16. Onsky re-commissioning results from this mode show it is already performing well even in unfavorable conditions, though a direct comparison with pre-upgrade performance will require more extensive meta analysis to include weather and environmental factors along with the Strehl ratios achieved. In the very near future we expect to deliver the 16 × 16 subaperture mode, which will enable diffraction limited imaging follow-up and precision RV followup with PARVI on some of the faintest and coolest planet-hosting candidates identified by TESS. PALM-3000: Exoplanet Adaptive Optics for the 5 m Hale Telescope Palomar adaptive optics project: status and performance Optical characterization of the PALM-3000 3388-actuator deformable mirror A New High Contrast Imaging Program at Palomar Observatory PHARO: A Near-Infrared Camera for the Palomar Adaptive Optics System Minimization of non-common path aberrations at the Palomar telescope using a self-coherent camera DARKNESS: A Microwave Kinetic Inductance Detector Integral Field Spectrograph for High-contrast Astronomy High-contrast imaging of tight resolved binaries with two vector vortex coronagraphs in cascade with the Palomar SDC instrument Speckle suppression and companion detection using coherent differential imaging Stellar Double Coronagraph: A Multistage Coronagraphic Platform at Palomar Observatory Status of the PALM-3000 high order adaptive optics instrument Pluto at opposition: The Palomar Adaptive Optics Campaign First Results from the Adaptive Optics System for LCRD's Optical Ground Station One Design and implementation of the PALM-3000 realtime control system Denominator-free control algorithms for adaptive optics Innovative wavefront estimators for zonal adaptive optics systems: II Adaptive control for the IOS adaptive optics system The authors would like to acknowledge the excellent (and patient) support of the Palomar Observatory staff during this instrument upgrade, re-commissioning, and beyond as we worked to understand this new system. This research was carried out in part at the Jet Propulsion Laboratory, California Institute of Technology, under a contract with the National Aeronautics and Space Administration.