{'fraction_non_alphanumeric': 0.023845410628019325, 'fraction_numerical': 0.014067632850241546, 'mean_word_length': 4.884921537411872, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Pointing Limits of Transiting Exoplanet Light Curve Characterization with Pixel Level De-correlation

We present scope (Simulated CCD Observations for Photometric Experimentation), a Python package to create a forward model of telescope detectors and simulate stellar targets with motion relative to the CCD. The primary application of this package is the simulation of the Kepler Space Telescope detector to predict and characterize increased instrumental noise in the spacecraft's final campaigns of observation. As the fuel powering the spacecraft's stabilizing thrusters ran out and thruster fires began to sputter and fail, stellar Point Spread Functions (PSFs) experienced more extreme and less predictable motion relative to regions of varied sensitivity on the spacecraft detector, generating more noise in transiting exoplanet light curves. Using our simulations, we demonstrate that current de-trending techniques effectively capture and remove systematics caused by sensitivity variation for spacecraft motion as high as about ten times that typically experienced by K2. The scope package is open-source and has been generalized to allow custom detector and stellar target parameters. Future applications include simulating observations made by the Transiting Exoplanet Survey Satellite (TESS) and ground based observations with synthetic atmospheric interference as testbeds for noise-removal techniques.


INTRODUCTION
Despite the failure of two reaction wheels in 2012 and 2013, the Kepler Space Telescope produced valuable data in its new configuration, K2, with significantly higher precision than ground based telescopes (Howell et al. 2014). However, due to the unstable pointing caused by the missing reaction wheels, targets in K2 observations have significant motion relative to the quantum sensitivity variation of the telescope detector, creating noise in K2 light curves. A number of attempts have been made to isolate and remove the instrumental noise from K2 data (Vanderburg & Johnson 2014;Armstrong et al. 2015;Lund et al. 2015;Huang et al. 2015;Aigrain et al. 2015Aigrain et al. , 2016. Through the application of data processing pipelines, namely the EPIC Variability Extraction and Removal for Exoplanet Science Targets (EVEREST) pipeline developed by Luger et al. (2016), the noise in K2 light curves can be reduced to the level of the original Kepler mission for up to 15 th magnitude (Luger et al. 2018b).
However, as the Kepler Space Telescope ran out of fuel, its motion due to thruster fires became less predictable and the magnitude of targets' motion relative to the detector increased. With higher motion, targets traversed more regions of varied pixel sensitivity, contributing more noise to the light curves of K2 targets. This increase in motion also increased the likelihood of flux pollution from neighbors, as stellar PSFs were more likely to overlap over the course of a campaign. Larger apertures were required for targets observed during motion because more pixels were sampled, further contributing to flux pollution from nearby stars.
In this paper, we present an approach to characterize increased noise due to high motion and assess noise-removal methods. §2 describes the mathematical methods of our simulation, §3 explores the results of our testing, §4 presents discussion of the context and future applications of this work, and §5 discusses our conclusions. Usage examples can be found in Appendix A.

METHODS
Effective removal of instrumental noise requires a thorough understanding of its source. Stellar motion relative to the pixel sensitivity variation on the Kepler CCD causes fluctuation in the amount of light recorded by the telescope detector over time. In order to accurately simulate the instrumental noise characteristic of K2 light curves, it is necessary to generate a forward model for the pixel sensitivity variation of the CCD. The properties of simulated targets are well understood, allowing the output light curves to be used for a variety of analyses. In particular, we use the simulated data to characterize noise levels resulting from conditions of high spacecraft motion and test the efficacy of de-trending methods. To accurately represent the Kepler CCD, we generated a model for the detector that included both inter-pixel sensitivity variation between pixels and intra-pixel sensitivity variation within each pixel.

PSF Model
A stellar PSF was generated with a characteristic two-dimensional Gaussian shape, which includes covariance between x and y dimensions to capture PSF distortion due to incident light aberration on the Kepler detector. We define our model for F (t), the total flux absorbed by the telescope detector as a function of time, to be where s(x, y) is the sensitivity variation function, modeled by a low order polynomial, and P (x, y) is the PSF of the star, centered at (x 0 , y 0 ) with amplitude A. τ (t) is a simulated transit model. The pixel sensitivity model in the i th pixel is given by the bivariate polynomial with coefficients a x,n , a y,m defined to result in a sensitivity map that peaks in the center of each pixel and falls off toward the edge. The coefficient b i defines the inter-pixel sensitivity variation for the i th pixel. The PSF model is given by a sum over two-dimensional Gaussians where σ x , σ y are the standard deviations of the PSF in x and y, and ρ is the correlation coefficient between x and y. The mathematical PSF model (Equation 3) represents the detector's ideal response to the incident stellar flux before taking into account variation in pixel sensitivity. This "ideally-measured" PSF is multiplied by the sensitivity function (Equation 2) to model the flux ultimately received by the CCD.
The coefficients a x,n , a y,n were determined to emulate the magnitude of sensitivity variation on the Kepler CCD based on its contribution to the noise in K2 light curves. Sensitivity coefficients are defined as independent in x and y for consistency with the Kepler Instrument Handbook (Van Cleve & Caldwell 2016). Our method for choosing values for sensitivity variation coefficients a n is described in the following section.

Pixel Sensitivity Variation
Our model for the sensitivity variation was chosen to emulate the same noise magnitude as real K2 observations. For our noise metric, we use the Combined Differential Photometric Precision (CDPP) (Christiansen et al. 2012). We used a two-step benchmarking process to estimate the magnitude of variation in quantum sensitivity and contribution by photon noise and background noise.
In Benchmark Test 1, we consider the no-motion case. We generate a set of high-precision simulated targets, which do not have increased systematic noise caused by motion. For this simulated data set, the noise versus magnitude trend should closely follow that of the original Kepler mission. To most accurately capture the noise characteristics of the detector, our model included two sources of synthetic noise -photon noise and background noise -which contribute to the trend of increased noise for higher magnitude targets for the Kepler mission. Benchmark Test 1 serves to constrain the levels of injected photon noise and background noise. The test consisted of plotting the CDPP for 1,000 targets from the original Kepler mission and calculating the median value for each Kp Mag at intervals of 0.5.
We generated five synthetic stellar targets for each 0.5-Mag interval with the following random variation of PSF parameters for each individual simulation: centroid position varied by up to 0.2 pixels in both x and y, σ x and σ y varied up to 10% (∼0.05 pixels), and correlation coefficient ρ varied up to 40%. Each of these five simulated light curves is plotted against the Kepler noise trend. This test was run iteratively on varied values of both background and photon noise until the slopes of the two trends approximately corresponded. To see the comparative noise of the resultant simulation, see Figure   In Benchmark Test 2, we consider the case of typical K2 motion. To accomplish this, we injected motion from 1,000 cadences of the K2 target EPIC 205998445, creating a simulated example of a current observation to benchmark our model against K2 data. EPIC 205998445 is a K2 C03 star with Kp = 12.029 located ∼60% of the distance from the center of the detector plane to its edge. Statistics about the motion data used in our simulation can be found in Table  1. This star was chosen because it is an isolated 12 th magnitude star, and the peak of the magnitude distribution for C03 was roughly 12. It is also located far enough from the center of the detector that it experiences significant motion during roll events, but not too near the edge that its motion is uncharacteristically high for K2 targets.
To calculate motion, the column pixel correction (header keyword POS CORR1 in K2 fits files) and row pixel correction (header keyword POS CORR2), corresponding to motion in x and y respectively, were accessed from the target pixel file header. These offsets were added to the calculated centroid position of the simulated PSF for each cadence. Total magnitude of motion as reported in Table 1 represents the calculated maximum distance between centroid positions over the course of the simulated cadences.
With real K2 motion applied, sensitivity variation parameters were adjusted until CDPP versus Kp Mag were approximately equal to the trend of real K2 observations. Sensitivity variation was altered by adjusting the a i coefficients in the polynomial model (Equation 2) to achieve different drops in sensitivity from pixels' centers to their edges, as well as adjusting the random variation in sensitivity between pixels with the b i sensitivity term. We found that a stochastic distribution of sensitivity with up to 1% variation between pixels and 2.48% variation within pixels, from center to edge, resulted in Benchmark Test 2 following the most similar trend to the expected result. Our sensitivity polynomial went up to third order with coefficients {1, 0, -0.05}. The results of Benchmark Test 2 can be seen in Figure 2.
A sample detector with included sensitivity variation can be seen in Figure 3. For campaigns up to 17, stellar PSFs already traverse various regions of sensitivity variation on the CCD due to pointing instability. As spacecraft motion increased, PSFs moved more dramatically across many pixels, which contributed significant noise to sputtering-K2 light curves. With a working model for sensitivity variation, we examined the high-motion case.

Increased Motion
To test how our de-trending methods perform on targets with high motion relative to the detector, we injected motion vectors with various coefficients into our synthetic models. A coefficient of 1 corresponds to typical K2 motion (maximum of ∼ 0.59 pixels), while a coefficient of 10 results in motion of up to 5.85 pixels. More detail about the motion used in our simulations can be found in Table 1 Our method to increase motion involved simply multiplying the pixel offset due to typical K2 motion by constant coefficients. This ensured the target traversed more pixels over a wider range of the detector while keeping the position calculation simple enough to avoid introducing new opportunity for error. It should be noted that this may not be the most appropriate treatment for all de-trending methods, particularly those that rely on fitting the centroid position of the target. However, the method used in the EVEREST pipeline (pixel level de-correlation) is agnostic to centroid position and relies simply on the measured flux in each pixel, so our treatment of motion is thorough enough for the goal of testing noise-removal methods.
With a forward model of K2 established, including both motion and sensitivity variation, we were able to apply our de-trending methods to stars with various tiers of increased motion to predict and understand the results of thruster failure. To elaborate on the results of our test, we first introduce our de-trending methods ( §2.4), and then examine the application of these methods to our simulated data ( §3.1). Raw K2 Synthetic (1x motion) Figure 2. Benchmark Test 2: Noise level (CDPP) of our simulated light curves with K2 motion compared to real K2 targets as a function of Kp Mag. The points displayed in red show the noise of 1,000 raw K2 observations before de-trending with the EVEREST pipeline, and the larger red points outlined in black follow the median of the trend. Each blue point is a simulated target with typical K2 motion and randomly varied initial centroid position and PSF shape. Our simulated data follow the primary trend of the CDPP vs. Kp Mag relationship as real data. Where the simulated trend deviates roughly between 11 th and 13 th magnitude, the raw K2 CDPP is inflated for two reasons: first, the K2 observations contain a population of targets near the edge of the detector which have higher levels of systematic noise. A number of the observed targets also have shortperiod variability, which drives up CDPP levels. Our simulated targets are not placed at the edge of the detector and have no variability, and therefore follow the lower trend. This figure indicates that the sensitivity variation in our model appropriately captures the features of the detector.

PLD
After generating a set of light curves representative of extreme motion K2 observations, we tested systematics removal methods to assess the potential value of sputtering-K2 data. To de-trend our synthetic light curves, we used a variant of the method applied in the EVEREST pipeline. EVEREST utilizes a method called pixel level de-correlation (PLD), developed by Deming et al. (2015) for the Spitzer Space Telescope.
We applied second-order PLD to our simulated light curves. Second-order PLD performed significantly better than the first-order model, but produced diminishing returns for higher orders when tested on our simulated observations with no variability. The second-order linear model for noise is defined by where m i is the noise model at time t i , f il is the flux in the l th pixel at time t i , a l is the first-order PLD coefficient on the linear term, and b lm is the second-order PLD coefficient on the l th , m th pixel pair. α, β, and γ are the Gaussian Process terms applied to capture long-period variability. Using Equation 4 to construct a model for the systematic noise, the remaining de-trending process is consistent with Luger et al. (2016).  Figure 3. (a) A sample detector with sensitivity variation and no stellar targets, where white represents 100% photon detection efficiency, and the shaded regions have lower values for quantum sensitivity. Note that our model peaks in sensitivity at the center of each pixel and falls off towards the edges. There is also slight random variation in sensitivity between pixels. (b) A Stellar PSF projected onto the detector at the sub-pixel level. (c) The final interpolated image. The value of each pixel is the integral over x and y of the sub-pixel flux. It should be noted that the sensitivity variation for this particular detector has been exaggerated to display the effects of sub-pixel response on the measurement of the PSF.
PLD seeks to remove noise generated by intra-pixel sensitivity variation without solving for the centroid position of the target star. This method is particularly effective for K2 light curves despite the magnitude of apparent motion being high, and can recover Kepler -like precision in exoplanet light curves for targets up to Kp = 15. For a more detailed treatment of PLD, see the paper by Deming et al. (2015) and the first two EVEREST papers (Luger et al. 2016(Luger et al. , 2018b.

Motion Tests
For each motion coefficient, 5 simulated light curves were generated for magnitudes from Kp Mag = 10 to Kp Mag = 15.5 at 0.5-magnitude intervals. Each light curve was de-trended with 2 nd order PLD, and the CDPP was calculated. The average CDPP of the 5 simulations was calculated and plotted as a function of Kp Mag. A detailed look at the results of our motion tests can be found in Figure 4.
Synthetic targets with 2x typical K2 motion achieved Kepler -like photometry up to Kp = 13 when de-trended with 2 nd order PLD, and noise levels remained below 200 ppm up to Kp = 15 (compared to < 100 ppm for Kepler ). Noise in light curves of targets with 5x motion remained below 400 ppm up to Kp = 15.5. After de-trending with PLD, we were able to retrieve transit parameters from simulated light curves with this magnitude of noise. This indicates that sustained observation during periods of increased spacecraft motion may result in the continued collection of valuable data.
These results were achieved by applying PLD to pixels within an aperture around our simulated stars. The aperture is defined to exclude extraneous background and photon noise in order to maximize light from our target. In applications for real targets, it is often necessary to also consider nearby bright stars when defining an aperture. The scope software package includes the ability to add neighboring stars, however they were excluded from these tests for simplicity. Future consideration will be given to automating aperture definitions, particularly because high motion PSFs will traverse more pixels and will therefore have a higher likelihood of crowding.

DISCUSSION
Our simulations reproduce the noise properties of K2 observations and allow us to model potential sources of increased systematic noise. We have shown that modern de-trending methods, specifically PLD, remain effective at removing instrumental noise for observations taken during spacecraft thruster failure. In the following section, we demonstrate that our de-trended light curves with up to 10x typical motion retain higher precision than typical ground-based observations.

Comparison to Ground-Based Photometry
Ground-based photometric time series observations face challenges in achieving high precision due to atmospheric interference. Stefansson et al. (2017) presents a comparison of modern high-precision observations from the ground.  De-trended simulated light curves with 1x, 2x, 4x, and 10x typical K2 motion are represented by the solid trends, and each point is the mean of 5 simulated light curves of a given Kp Mag with slightly varied PSF shape and initial centroid positions. We achieve sub-400 ppm CDPP up to 5x motion for targets up to Kp Mag = 14.5, and de-trended light curves up to 10x motion perform better that ground-based observation (for which < 1, 000 ppm is difficult to achieve).
Their comparison reports that telescopes with diameters similar to that of Kepler fail to achieve sub parts-per-thousand precision from the ground. Observations with modern methods such as adaptive optics, defocusing, and defusers can achieve sub-300 ppm precision with telescopes of diameter greater than 3.5 m.
For simulated observations with with up to 2 times typical motion, Kepler -like photometry is still possible up to Kp = 13. For up to 10 times typical motion, sub-1,000 ppm is possible to achieve, performing better than ground-based observations for similar telescope diameters.

Direct Measurement of Sensitivity
A recent publication by Vorobiev et al. (2018) measured a dramatic drop in the sensitivity of Kepler CCD pixels from center to edge. We acknowledge the inconsistency in resultant intra-pixel sensitivity variation between our calibration tests and the direct measurement of the sub-pixel response. Future work is necessary to identify the source of the meaningfully different conclusions, and we would like to identify a number of factors that likely contribute. The primary suspect is the degeneracy between inter-and intra-pixel sensitivity variation in our motion benchmark, both of which contribute to the systematic noise of synthetic light curves. Also included in this degeneracy are the magnitudes of background noise and photon noise. With some variation in the distribution of sensitivity, it is possible to achieve similar noise values as those estimated for K2 observations. Our values were determined by calculating the best fit of our synthetic light curves to observed noise trends.
Additionally, our calibration was based on K2 observations, and there are a number of physical differences between the state of the space telescope detectors and the laboratory environment. Vorobiev et al. (2018) acknowledge the temperature difference, and when considered in combination with the potential degradation of the telescope detector after nearly a decade of use, this could result in a significant difference in measured sensitivity.
It is also possible that the size and brightness of a stellar PSF would elicit a different response from the CCD's pixels compared to the much smaller point-scan PSF used to measure sub-pixel response. Antilogus et al. (2014) demonstrate that with increased brightness, the spread of a PSF also increases more than would be expected by a linearly increasing PSF, possibly due to the repulsive forces between electrons captured in a pixel. Because of this effect, the light curve generated by performing aperture photometry on larger, brighter PSFs may produce a level of noise consistent with a less significant drop intra-pixel sensitivity variation.

Future Applications
The Transiting Exoplanet Survey Satellite (TESS) recently started delivering light curves for nearby stars. TESS pixels are larger than those of Kepler (21 arcseconds per pixel compared to Kepler 's 3.98), and contamination by nearby targets is common. In the instance that TESS also faces motion issues, there will be a significant need to test de-trending methods with an emphasis on defining ideal apertures. With a combination of crowded PSFs and increased noise, apertures and associated aperture-based PLD methods will be an essential piece of our noise-removal strategy for TESS.
Further, the space telescope's trajectory could cause a periodic variation in the incident sunlight on the telescope, which will affect the quantum sensitivity of pixels. Periodically changing sensitivity could cause TESS PSFs to "breathe" as the temperature rises and falls, and apertures around TESS targets will need to expand and contract correspondingly to effectively capture the desired stellar signal. Our forward model serves as an established simulation for cases of time-variable PSFs due to both motion and periodic sensitivity changes. The stellar PSF parameters can be easily adjusted in the forward model produced by scope to cover more pixels and more accurately capture PSFs characteristic of TESS observations. Seeing aberration and atmospheric interference are additional sources of noise that could be included in the scope model. PLD was developed for Spitzer and modified for application to K2, but has seen little application elsewhere. For ground-based observations with significant noise due to pointing issues or atmospheric interference, PLD may be a valuable tool to make the most of data. scope is an ideal testbed for this type of noise-removal because it allows users to perform tests on noisy observations of synthetic sources that are well understood with input parameters that can be compared to post-processing results. Though it was initially imagined for space-based telescopes, this software has potentially useful applications for ground-based telescopes.

CONCLUSIONS
We have created a forward model of the Kepler space telescope detector, scope, which includes inter-and intra-pixel sensitivity variation and mathematical simulations of stellar PSFs to test de-trending methods for exoplanet targets. Using these simulations, we have demonstrated that PLD is capable of reducing systematic noise to higher precision than ground-based observations in K2 light curves with up to 10x typical spacecraft motion. We have shown that in the event of spacecraft thruster sputtering due to diminishing fuel reserves, valuable data can likely still be collected by space telescopes. This provides valuable insight for the future of space-based observatories such as TESS, CHEOPS, and JWST in the event that they experience similar systematics to K2. The question surrounding the usefulness of high-motion data is increasingly relevant to the study of K2 's observations, and our hope is to emphasize the potential value still untapped in data collected during the final campaigns of observation.
Though TESS, a successor to Kepler, has launched, there remains a wealth of existing archival K2 data that offers valuable contribution to our understanding of exoplanetary systems. Earth-like exoplanets can be difficult to identify in the high-magnitude noise of K2 data, which continued to get noisier as the mission reached its conclusion. TESS and JWST will likely face their own challenges with data analysis and noise-removal, and the tools developed for K2 will be foundations and references for new solutions. The methods we have presented aim to produce the most precise exoplanet identification, characterization, and analysis from the data we have available, and prepare for the next generation of space telescopes.
A fixed version of the open source Python package scope (Saunders 2019) can be found at doi:10.5281/zenodo.2542227.
Follow the development or make contributions at github.com/nksaunders/scope. This work was supported by NASA grant NNX14AK26G and by the NASA Astrobiology Institute's Virtual Planetary Laboratory. We would like to thank Geert Barentsen, Christina Hedges, and Michael Gully-Santiago for valuable discussion. Computing for this research was performed on the Hyak supercomputer system at the University of Washington.  (Luger et al. 2016), Matplotlib (Hunter 2007), NumPy (Oliphant 2006), SciPy (Jones et al. 2001), starry (Luger et al. 2018a).