Spectral Calibration of the MethaneAIR Instrument

. MethaneAIR is the airborne simulator of MethaneSAT, an area-mapping satellite currently under development with the goal of locating and quantifying large anthropogenic point CH 4 sources as well as diffuse basin-scale emissions. Built to closely replicate the forthcoming satellite, MethaneAIR consists of two imaging spectrometers. One detects CH 4 and CO 2 absorption around 1.65 and 1.61 µ m, respectively, while the other constrains the optical path in the atmosphere by detecting O 2 absorption near 1.27 µ m. The high spectral resolution and stringent retrieval accuracy requirements of greenhouse gas remote 5 sensing in this spectral range necessitate a reliable spectral calibration. To this end, on-ground laboratory measurements were used to derive the spectral calibration of MethaneAIR, serving as a pathﬁnder for the future calibration of MethaneSAT. Stray light was characterized and corrected through Fast Fourier Transform (FFT)-based Van Cittert deconvolution. Wavelength registration was examined and found to be best described by a linear relationship for both bands with a precision of ∼ 0.02 spectral pixel. The instrument spectral spread function (ISSF), measured with ﬁne wavelength steps of 0.005 nm near a series 10 of central wavelengths across each band, was oversampled to construct the instrument spectral response function (ISRF) at each central wavelength and spatial pixel. The ISRFs were smoothed with a Savitzky-Golay ﬁlter for use in a lookup table in the retrieval algorithm. The MethaneAIR spectral calibration was evaluated through application to radiance spectra from an instrument ﬂight over the Colorado Front Range.

The infrared camera used in each channel is the 1280SCICAM from Princeton Infrared Technologies. The InGaAs focal plane provides greater than 0.7 quantum efficiency (QE) below 1650 nm. The QE begins to roll off above this wavelength, 90 reaching a minimum of about 0.15 at the 1680 nm end of the CH 4 passband. The focal plane operates at 0 • C, which provides a reasonable compromise between dark current and the temperature-sensitive long-wavelength cutoff. The 1024 columns and 1280 rows of the focal plane array (FPA) correspond to spectral and spatial pixels as shown in Figure 5. Only spatial pixel indices 135-997 and 308-1170 out of 1-1280 are illuminated by the slit for the CH 4 and O 2 bands, respectively. Initial MethaneAIR research flights were performed aboard the NSF GV aircraft. To simplify aircraft integration, the two 95 MethaneAIR spectrometers are mounted side by side in a single instrument rack (Figure 2), which is isolated from aircraft vibration by wire isolators. Each spectrometer was internally aligned from foreoptic to focal plane by Headwall, and the two spectrometers were co-boresighted to within 1 • when they were mounted in the rack. For CH 4 and CO 2 measurements, the spectrometers observe out of an 18 inch viewport on the bottom of the GV, using a 25 mm wide angle lens (23.7 • field of view).
Both panes of glass in the viewport window were anti-reflection coated by L&L Optical Services. The spectral reflectivity of 100 4 https://doi.org/10.5194/amt-2020-513 Preprint. Discussion started: 12 January 2021 c Author(s) 2021. CC BY 4.0 License. all four surfaces was measured from 400 to 1700 nm by the coating manufacturer. The resulting window transmittance is a smooth function ranging from 99.7% to 98.1% in the MethaneAIR spectral range. A 180 degree rotation of the instrument rack allows the O 2 spectrometer to observe out of the overhead viewport in order to image the airglow, using an 85 mm lens that provides a 7 • field of view.

Calibration measurements 105
In an effort to reproduce the mechanical and thermal environment experienced during flight, MethaneAIR was mounted during laboratory calibration activities on a rack in its downward viewing orientation and was controlled to just above room temperature by the same thermal housing used aboard the GV (Figure 3a-b). Calibration equipment (including an integrating sphere and a collimator) were placed under the rack pointing upward. Each spectrometer collected measurements for stray light and ISRF calibration, as described in the next two subsections. In addition, flat fields were taken using the integrating sphere coupled 110 with a broadband lamp behind a variable aperture.
The integrating sphere, model #OL 455-8SA-2 from Optronic Laboratories, has an overall diameter of 8 inches and a 2 inch diameter output port (Figure 3c). The spectral radiance at the output port was calibrated by the manufacturer every 10 nm between 350 nm and 2500 nm. During the MethaneAIR flat field measurements, the light level was tuned from zero to just beyond detector saturation in 40 steps by adjusting the aperture area. The aperture area was tied to the manufacturer calibration 115 value using a photodetector mounted on the wall of the sphere. Flat field data were taken at exposure times of 50, 100, and 150 ms, matching the exposure times used in flight and in the ISRF calibration. The resulting radiometric calibration curves were fitted by fifth-order polynomials with the intercept forced to be zero. The resultant coefficients were used to correct pixelto-pixel non-uniformity in the stray light and ISRF data. A separate linear (gain-only) calibration was used to flag defective pixels. Bad pixels were identified as those with a dark value more than 3-sigma from the mean or a gain value outside thresholds 120 (a) (b) (c) (d) Figure 3. During flight (a) and calibration (b), the instrument is mounted in the same orientation and controlled to the same temperature by the yellow thermal housing. An integrating sphere (c) is used to perform non-uniformity and ISRF calibration, while a collimator (d) is used for stray light measurements.
determined by visual inspection of the gain distribution. Bad pixels made up 0.19% and 0.055% of the active area of the O 2 and CH 4 FPAs, respectively.

Stray light measurements
Stray light measurements were made by systematically illuminating individual points on the focal plane and quantifying the light detected elsewhere on the detector. Preliminary stray light measurements used a 150 mm diameter f/12 Maksutov-

125
Cassegrain telescope ( Figure 3d) to collimate the incoming light. A 100 µm pinhole placed at the focus of the telescope was illuminated using fiber-coupled tunable lasers (SANTEC TSL-550s; one for O 2 and one for CH 4 ). The laser line width is 40 MHz, three orders of magnitude lower than the instrument spectral resolution, and hence the laser is considered as a delta function in wavelength space. At the slit, the image of the pinhole fit within 12 × 12 µm (equivalent to one FPA pixel).
At each sampled spatial position the tunable laser was stepped across the passband in increments of 0.5 nm. The collimator 130 was mounted on a goniometer stage and manually repositioned to sample three angles along the slit (0 . Exposure times of 10 ms, 100 ms, and 1000 ms were combined for high dynamic range, and one additional exposure was made at 1000 ms while increasing the laser power by a factor of 10 ( Figure 4a-d). Background measurements were made by temporarily closing a shutter internal to the tunable laser and subtracted from each individual exposure.

135
Future improvements to the measurement setup will include automated tilt and translation stages to address many more field angles and an all-reflective collimator to avoid stray reflections from the refractive corrector plate. The pinhole will be replaced with a 100 µm slit oriented perpendicular to the spectrometer entrance slit, in order to fill the width of the spectrometer slit while providing a point source in the across-track dimension.

140
ISRF measurements used the same tunable lasers as the stray light measurements. Each laser was coupled to the integrating sphere ( Figure 3c) in order to uniformly illuminate the slit at a single wavelength. An 8000 RPM vibration motor was attached to the fiber near the integrating sphere to avoid coherence effects in the image. The O 2 laser was stepped from 1247 nm to 1317 nm in increments of 7 nm, and the CH 4 laser was stepped from 1593 nm to 1679 nm in increments of at most 10 nm (see Figure 5). The vicinity of each center wavelength was finely sampled by scanning the laser ±0.1 nm from the central 145 wavelengths in steps of 0.005 nm. The 1247 nm central wavelength step was discarded in following analysis because it is right at the edge of the laser wavelength cut off. In the CH 4 band, the laser power was increased at long wavelengths to compensate for the decrease in QE. Both spectrometers recorded data with a fixed exposure time of 50 ms.

Stray light correction
Stray light correction for MethaneAIR follows an approach similar to the method set forth by Tol et al. (2018) for the TROPOMI 150 SWIR spectrometer. Preliminary processing of the stray light measurement data includes masking bad pixels and subtracting dark current. Radiometric calibration is applied to convert from digital number per second to radiance, and each frame is normalized by its corresponding laser power. Multiple frames at a given position on the FPA can then be combined into a single merged frame, as shown in Figure 4e. Merging different exposures allows for a more complete characterization of stray light structure since the peak is defined but the floor is incomplete at short exposures, and at longer exposures, the floor is 155 defined while the peak area is saturated. A 2D Gaussian function is fitted to each merged frame to identify the central spatial and spectral position of the peak. The identified spectral peak positions were analyzed as a potential supplement to ISRF measurements for wavelength registration, but were ultimately found to be too noisy for this purpose. The partial illumination The laser wavelengths in nm are labeled next to the corresponding slit images. The radiance is in photons s −1 cm −2 nm −1 sr −1 .
of the slit resulting from the use of the pinhole in the measurement setup likely contributed to the noise by distorting the spectral response.

160
All merged frames are interpolated to a common grid of spatial and spectral pixels that are relative to peak position obtained from the 2D Gaussian fitting. The stray light structure observed in the merged frames is generally consistent for different positions on the FPA. The only notable exceptions are spatial stray light features that are up to 10 −4 of the peak. These features, which appear in the tails of the spatial stray light profile, exhibit no apparent pattern relative to spatial position. That is, spatial stray light features at one spatial pixel were not observed in the profile measured at a nearby spatial pixel. Such 165 inconsistency suggests that these features are not internal to the instrument, but likely originated from the reflections from the refractive corrector plate within the collimator. As such, data displaying what appear to be spatial artifacts of the test setup are removed via replacement with NaN values. Since stray light measurements were taken for three spatial positions, at least one other spatial position that does not exhibit the observed artifact still supplies data at the replaced point. After excluding these spurious spatial stray light data points, all merged frames are stacked together and the median is determined to produce 170 a common kernel function for the entire FPA.
The median stray light kernels for both the CH 4 and O 2 bands are depicted in Figure 6, where it may be seen that the peaks are separated from the noise floor by over six orders of magnitude. For use in the stray light correction algorithm, the kernel is normalized such that all elements sum to unity. A central area of 11 spatial pixels by 15 spectral pixels is then set equal to zero. This window is determined by the extent of the ISRF in the spectral dimension and the width of the spatial response 175 function in the across-track dimension. The kernel is now referred to as the far-field kernel (K far ), which defines where stray light correction will be applied.
The correction algorithm is rooted in the idea that a measured frame can be viewed as an ideal frame convolved with K far .
Therefore, to correct the stray light, an iterative deconvolution algorithm is used, based on Van Cittert deconvolution (Tol et al., 2018). The correction is a redistribution rather than a removal of light in a given frame. As given by Tol et al. (2018), the frame 180 (J) after iteration i is where J 0 is the measured input frame and ⊗ denotes 2D convolution that is implemented through Fast Fourier Transform (FFT) in the astropy Python library. Three iterations were used after finding that a greater number did not significantly alter the correction results.

185
The stray light correction was relatively small for both MethaneAIR bands, approximately 2% of total detected light. A comparison of the slit images on the CH 4 and O 2 FPAs before and after applying the stray light correction is shown in Figure 7.
The slit images appear in sharper contrast with the noise floor after correction, and the spectral stray light beyond the 15-pixel window is substantially reduced. Figure 6. Median stray light kernels for (a) CH4 and (b) O2 bands. Multiple merged frames were interpolated to a common spatial/spectral pixel grid before taking the median of all frames to produce the kernels for use in the stray light correction algorithm. 190

Oversampling ISSF
The laser wavelength scans shown in Figure 5 yield a series of instrument spectral spread functions (ISSFs) positioned around selected central wavelengths for each spatial pixel in each band. Since each ISSF corresponds to a wavelength, there is theoret- Figure 7. Slit images on the FPA, as given by normalized radiance before (a1, b1) and after (a2, b2) applying stray light correction. After correction, the slit image at each row (i.e., spectral pixels at a given spatial pixel) is effectively an ISSF as discussed in Section 5.
ically an infinite number of ISSFs. In contrast, there is a single ISRF for each spectral pixel, defining the response of that pixel to light of different wavelengths. The relationship between the ISSF and ISRF is depicted in Figure 8a. Each ISSF extends over 195 multiple spectral pixels and is comprised of samples from the ISRFs of these spectral pixels. It is assumed that the ISRF does not vary significantly over a small sample of spectral pixels. Therefore, the ISSF can be viewed as a sparsely sampled version

Smoothed ISRF results
The ISRFs constructed from the oversampled ISSF data are noisy at the tails, as seen in Figure 11. Structures in the tails are inconsistent across spatial pixels and central wavelengths, so it is beneficial to smooth out these random features while preserving the ISRF shape at the core. Various analytical functions were tested to fit the ISRFs, including the TROPOMI ISRF    Figure 10. Demonstration of ISSF oversampling for the O2 band at a central wavelength of 1275 nm and spatial pixel 500. ISSF processing is as described in Figure 9.
in a moving window (Savitzky and Golay, 1964). A filter of order 3 with a window length of 40 points on either side of the the central point is used, i.e., a 3.40.40 filter. The Savitzky-Golay filter was found to effectively avoid peak flattening and provide superior processing speed compared to other filters (e.g., penalized spline and robust lowess smoothing). Applying the filter once smoothed the tails fairly well, as demonstrated by the red lines in Figure 11. Still, there is room for improvement after the 235 first pass, particularly in the O 2 band. In order to achieve a smoother result, an iterative version of the Savitzy-Golay filter is devised. This filter works by calculating the residuals between the logs of the raw data and the smoothed lines after an initial application of the filter. At locations outside of the core where the residuals are higher than a specified threshold, the ISRF data points are replaced by the filtered result. The same filter is then applied again to the updated set of ISRF data, and residuals are again calculated. With each iteration, the residual threshold for replacement is decreased. The numbers of iterations used for 240 the CH 4 and O 2 bands are five and six, respectively. The result of the iterative filter shows fewer defined features in the tails, as shown in Figure 11. Values in the smoothed ISRF beyond ± 7.5 pixels from the center are set equal to zero since these values should be taken care of by the spectral stray light correction as described in Section 4. The ISRF is then normalized so that it integrates to unity.
After examining the variation of the filtered ISRF across all spatial and spectral pixels, it was evident that additional smooth-245 ing was required for a small number of pixels (74 pixels in the CH 4 band, and 87 pixels in the O 2 band). By nature, the ISRF shape should vary smoothly between spatial and spectral pixels. However, some pixels exhibited anomalous behavior by way of sharp contrasts with neighboring pixels. The performance of these atypical pixels was irregular enough to be noticeable in the ISRF results, but not poor enough to be flagged in the bad pixel map. To remove the effects of these remaining anomalous pixels, a median filter was first applied to all ISRFs, which are assembled to a table defined in spatial, spectral, and relative 250 wavelength dimensions. The root-mean-square error (RMSE) between the original ISRF table and the median filtered ISRF table was calculated to define outliers with RMSE greater than three standard deviations from the mean for each central wavelength. Then, only ISRFs at outlier locations were replaced with the median filtered version. Due to the higher noise levels accompanying the decrease in QE at higher wavelengths in the CH 4 band, pixels at 1670 nm were not included in the replacement. Exceptions were also made at specific spatial pixel indices in both bands where real slit shape characteristics were seen 255 to cause significant irregular features, which is discussed in greater detail with the wavelength registration (Section 6).
Examples of the smoothed ISRF shapes after Savitzky-Golay filtering and outlier smoothing are given in Figures 12 and 13. Figure 14 displays the ISRF full width at 20%, 50%, and 80% of peak height, conveying the variation in ISRF shapes in both bands across the FPA. As shown by the figures, the ISRF is often asymmetric at both the core and the tails. The ISRF is broader and more triangular in the CH 4 band compared to the O 2 band. Additionally, the shape tends to grow wider with increasing

(b) O 2 band
Raw data Single pass filter Iterative filter Figure 11. Demonstration of the iterative Savitzky-Golay filter used to smooth ISRF measurement data in the CH4 (a) and O2 (b) bands.
One application of the filter, shown in red, was fairly effective, especially for the CH4 band. Successive iterations applied to the residuals at the tails provided additional smoothing while preserving the ISRF shape at the core, as indicated by the blue line.  , and 80% (c,f) of maximum peak height for all spatial and spectral pixels. The top three panels correspond to the CH4 band, which shows a general broadening of the ISRF with increasing wavelength and spatial pixel index. In contrast, the O2 band ISRF is more homogeneous across different spatial and spectral pixels, as reinforced by the relatively narrower scales for the bottom three panels. The color limit in each panel is fixed at ±25% from the FPA-mean value.
The ISRF construction process as previously described resulted in spectral pixel centers that correspond to the laser central wavelengths labeled in Figure 5. Those spectral pixel-wavelength relationships are determined with high accuracy for all illuminated spatial pixels. It is possible to derive the wavelength registration function for each spatial pixel by independently 270 fitting the spectral pixel centers vs. laser central wavelengths. However, we noticed some outliers that are caused by either inadequate filtering of bad pixels or the deficiency in the ISRF after a significant number of pixels are removed as bad pixels, as shown in Figure 15. To prevent the impact of those localized outliers from propagating to the wavelength calibration curves that cover the full spectral range, we apply an additional smoothing to the spectral pixel centers as described in the following.
For each central wavelength, the median is removed from the spectral pixel centers of all spatial pixels, and the resultant 275 relative spectral pixel values are highly consistent for all central wavelengths, as shown by the dots in Figure 15. The fine scale structures in the spatial dimension likely originate from irregularities of the slit along its length. Such structures are most easily seen near spatial pixel 505 in the CH 4 band and spatial pixel 780 in the O 2 band. Those structures are also observable in the ISRF widths shown in Figure 14. The medians along the wavelength dimension are then taken from the combined relative spectral pixel values of all wavelengths, represented by the black lines in Figure 15. These series of median values remain 280 largely unaffected by the random noise or outliers at individual wavelengths while preserving the structures that are common to all wavelengths. Finally, a linear fit is made between those median values and the spectral pixel center values for each center wavelength, and the predicted spectral pixel center values, which are smooth and free of outlier points, are used in the final wavelength calibration.
In both bands, a polynomial fit is applied to the smoothed spectral pixel centers as a function of wavelength. This is necessary 285 to map spectral pixel to wavelength at locations between the measured points. As shown by the bottom panels of Figure 16, the residuals for various polynomial degrees are quite similar, and less than approximately 0.02 spectral pixel. For clarity, only first through fourth order polynomial residuals are plotted, but higher orders, up to and including seventh, were tested. A first order polynomial was selected as the optimal model for both bands, in accordance with the Akaike information criterion (AIC) (Akaike, 1974) and Bayesian information criterion (BIC) (Schwarz, 1978). The linear fit between spectral pixel index and 290 wavelength is shown in the top panels of Figure 16.

Flight spectra demonstration
Here we evaluate the performance of the on-ground MethaneAIR calibration using radiance spectra from the first instrument flight over a clean region of the Colorado Front Range, using the optimal-estimation-based (Rodgers, 2000) retrieval algorithm being developed for MethaneAIR/MethaneSAT (Chan Miller et al., 2018). Further detailed description of the algorithm will 295 be provided in future publications on MethaneAIR retrieval. The Level 0 detector signals are converted to Level 1b radiance spectra through dark current subtraction, bad pixel removal, radiometric calibration, and stray light correction in a similar way as the ISRF calibration data. In addition, the wavelength-dependent viewport window transmittance is corrected. Fits for spectra in the O 2 and CH 4 bands are used for cloud filtering and CH 4 /CO 2 proxy retrieval, respectively. The algorithm settings are summarized in Table 2. Scattering is neglected in both retrievals; A reasonable assumption since Rayleigh scattering is 300 negligible, and aerosol loadings during the flight were low (observed 1640 nm aerosol optical depths were < 0.01 at the AERONET NEON-CPER site, close to the flight path).  Spectra are 10 second along-track aggregates for spatial pixel 600 (approximate center of detector). Blue color indicates the fit and residual using the laboratory calibrated ISRF look-up tables, and orange color indicates the fit and residual with an ISRF squeeze parameter.
18 https://doi.org/10.5194/amt-2020-513 Preprint. Discussion started: 12 January 2021 c Author(s) 2021. CC BY 4.0 License. Figure 17 shows spectral fits for each band for an across track position at the center of the detector. The spectra constitute a 10 s along-track aggregate of frames, taken when the flight was at cruise altitude (∼12 km). Time aggregation was performed to boost signal-to-noise and mitigate the impact of inhomogeneous slit illumination on the ISRF. Applying the nominal calibration 305 derived in this paper is shown by the blue lines, leading to fit residual RMSE of 1.12% and 0.52% in the O 2 and CH 4 bands, respectively.
The large difference in the residuals between instruments and simulations could be due to a change in the detector focus from on-ground to in-flight especially for the O 2 spectrometer. This may arise from a difference from the lab and flight environments, such as a change in the temperature of the optical bench or mechanical stress of the instrument. To first order, these changes 310 manifest as a change in ISRF width, which can be modeled by scaling the wavelength grid (λ) of the tabulated ISRF (Γ T AB (λ)) (Sun et al., 2017) via squeeze parameter (x sqz ): The orange lines in Figure 17 show the improvement in spectral fits after including x sqz in the retrieval state vector. The fitted x sqz for the O 2 /CH 4 bands for those particular across-track positions are 0.865 and 1.055, representing a broadening/narrowing 315 of the ISRF, respectively. Accounting for changes to the ISRF width yields comparable fit RMSE for both channels (0.6% for O 2 and 0.45% for CH 4 ). Application of the ISRF squeezing improves the fitting quality in other across-track positions similarly.
This indicates that the systematic difference between in-flight and on-ground calibration of ISRF needs to be accounted for in the retrieval algorithm.

320
This paper focuses on the spectral calibration of MethaneAIR including stray light correction, ISRF characterization, and wavelength calibration. The stray light was stable in both bands, allowing for the use of a position-independent median kernel in the correction algorithm based on Van Cittert deconvolution. The correction was rather minor since stray light accounted for only a small fraction of the total detected light.
The ISRF was determined by first oversampling the ISSF around roughly ten central wavelengths in each band. Each over-

325
sampled ISSF was reflected about its center of mass and projected to a fine wavelength grid to transform the profile into an ISRF. This ISSF approach, which allows for more precise correction of laser power/wavelength fluctuation, approximates the true ISRF better than direct ISRF measurements. The ISRFs were further processed by applying an iterative Savitzky-Golay filter to smooth high-frequency noise at the tails. Final ISRFs were saved to a lookup table for use in the retrieval algorithm since the shapes could not be satisfactorily modeled by an analytical function. The observed shape of the ISRF peak was more 330 triangular in the CH 4 band compared to the O 2 band. The ISRF shape in the CH 4 band varied considerably more than in the O 2 band in both spatial and spectral dimensions. This increased variability in the CH 4 band may have been due to optical influences from the internal alignment of the instrument. In contrast, the O 2 ISRF full width at half-maximum (FWHM) was dominated by the slit width, which is essentially constant. Analysis of the wavelength-spectral pixel relationship found that a linear wavelength calibration is sufficient after reducing individual noise contributions.
The performance of the on-ground MethaneAIR spectral calibration was demonstrated using radiance spectra retrieved from an instrument flight over the Colorado Front Range. Fitting the base calibration from the ISRF lookup table to the spectra resulted in larger residual RMSE for the O 2 band than the CH 4 band, which was presumably caused by a change in detector focus in flight. Slight differences in environmental conditions between lab and flight situations could contribute to this change, embodied by an adjustment in the ISRF width. Scaling the wavelength grid of the tabulated ISRF by a constant parameter 340 improves the spectral fit in both bands. This squeeze factor indicated a broadening of the ISRF in the O 2 band and a narrowing in the CH 4 band.
The general calibration framework as well as specific insights gained from MethaneAIR may help to advance the future spectral calibration of MethaneSAT. Stray light measurement data showed that the partial illumination of the slit width distorted the ISRF. In future stray light measurements, the pinhole will be replaced with a thin slit in order to fully illuminate the width 345 of the spectrometer slit. Similarly, the MethaneAIR ISRF construction process and results can be used to inform the necessary ISSF measurement extent for MethaneSAT. Measurements at ten or so central wavelengths appears to be adequate, given that the ISRF varies smoothly in the spectral dimension. However, the degree of spatial variation seen in the MethaneAIR ISRF suggests that it is important to assess all pixels in the spatial dimension. Application of the calibration to real flight data demonstrated the possibility that the ISRF width may change between on-ground calibration and in-flight or on-orbit 350 conditions; however, this may be compensated for by including a scaling parameter in the retrieval algorithm.
Competing interests. The authors declare that they have no conflict of interest.