Warm Spitzer IRAC Photometry: dependencies on observing mode and exposure time

We investigate differences in Spitzer/IRAC 3.6 and 4.5micron photometry that depend on observing strategy. Using archival calibration data we perform an in-depth examination of the measured flux densities ("fluxes") of ten calibration stars, observed with all the possible observing strategies. We then quantify differences in the measured fluxes as a function of 1) array mode (full or subarray), 2) exposure time, and 3) dithering versus staring observations. We find that the median fluxes measured for sources observed using the full array are 1.6% and 1% lower than those observed with the subarray at [3.6] and [4.5], respectively. Additionally, we found a dependence on the exposure time such that for [3.6] observations the long frame times are measured to be lower than the short frame times by a median value of 3.4% in full array and 2.9% in subarray. For [4.5] observations the longer frame times are 0.6% and 1.5% in full and subarray respectively. These very small variations will likely only affect science users who require high-precision photometry from multiple different observing modes. We find no statistically significant difference for fluxes obtained with dithered and staring-modes. When considering all stars in the sample, the fractional well depth of the pixel is correlated with the different observed fluxes. We speculate the cause to be a small non-linearity in the pixels at the lowest well depths where deviations from linearity were previously assumed to be negligible.


Introduction
The Infrared Array Camera (IRAC) 1 was operational on the Spitzer Space Telescope 2 from 2003 -2020 with four broad mid-infrared bands with response covering 3.15 -9.25 µm (at 3.6, 4.5, 5.8, and 8.0 µm; also denoted channels 1 -4, respectively). These filter names are labels and not the actual effective wavelengths (for more detailed information on filter transmission see Ref. 3). After depletion of the cryogens, from mid 2009 until January 2020, only [3.6] and [4.5] were available for observations. In order to efficiently calibrate the telescope, a discrete set of observing templates was enabled for IRAC observers. Available options to define the templates included array mode, frame time, and dithering strategy. The array mode could be specified either as full array (meaning, the entire IRAC 256×256 array of 1.2 arcsecond pixels was read out after each exposure) or subarray, in which case 64 consecutive 32×32 pixel images were taken at a higher readout rate without moving the telescope (0.01 s single readout for subarray vs. 0.2 s for full array). A number of preset frame times were available; those and their corresponding exposure times are listed in Table 1. Frame time is a measure of time elapsed between successive array resets. The exposure time (effective integration times) is the time elapsed between the first pedestal and the first signal read, not including resets or multiple reads. High dynamic-range exposures, in which paired short and long exposures were acquired sequentially within a single full-array observing template, were also available to IRAC observers, but did not add diversity to the range of possible observations. Lastly, observers were able to choose from a discrete set of dither patterns, make their own mapping strategy, or employ a staring-mode. Dithering (small position changes to reduce noise) and mapping (position changes of order the size of the array to cover an area greater than the size of the array) were both possible in the full array mode. Dithering was available in the subarray mode between 64-frame sets, but not within the sets. Observations which do not move positions between frames are known as "staring-mode." Staring-mode was most often used for high-precision time-series observations of brown dwarfs and exoplanets.
The rich Spitzer/IRAC archive contains many observations of the same target taken with different array modes, frame times, or dithering strategies. This is often the case for serendipitous observations but also for observations designed intentionally in different modes. Possible science cases for this include, but are not limited to, 1) initial dithered observations to find proper motions of brown dwarfs followed by staring-mode data to refine the characterization of their atmospheres, 1 Entries with two exposure times are for [3.6] and [4.5] respectively. 2) dithered debris disk searches looking for IR excess followed by a staring-mode study of variations in specific debris disks, 3) archival dithered observations followed by targeted subarray staring observations for confirmation, or 4) observations that had either a too low signal-to-noise ratio (SNR) or were saturated at one exposure time were followed up later in the mission using a different exposure time. These science cases therefore require combining photometry from different modes to arrive at scientific conclusions.
In this work we examine how IRAC photometry depends on observing strategy. We emphasize that these are very small measured variations (a few percent at most) and so will likely only affect science users who require high-precision photometry from multiple different observing modes. A full set of calibration observations to test for variations in measured fluxes among observing modes were only taken during the warm IRAC mission. We consequently do not discuss data taken during the cryogenic mission (which ended in 2009), or in the [5.8] or [8.0] channels.
In Section 2 we describe the archival data used for this project. Section 2.2 covers our methods for reducing the data, carrying out photometry, and applying photometric corrections. Section 3 discusses the different potential correlations and photometry effects. We make concluding remarks in Section 4.

Observations
For this work we used the calibration observations taken for Spitzer Program ID (PID) 1336 and PID 1367. Specifically, we observed a set of ten stars with varying exposure times, in both subarray and in full array, and in staring and dithering modes. Almost always, staring-mode observations were taken on the same pixel ("the sweet spot"), as that pixel was the best characterized pixel on the array. Table 2 lists the stars. We searched the archive for additional data usable for this analysis but did not find anything suitable, combining non-variable stars with observations in all available modes and having a sufficient number of images to achieve statistical significance. Figure 1 shows a visualization of this dataset. We plot the exposure time(s) vs. aperture flux for just the [4.5] channel. Similar observations were made for [3.6]. All stars were observed with multiple exposure times. Not all of the ten stars could be observed at all exposure times due to SNR and saturation concerns. This plot illustrates how the range of stellar brightnesses and frame times in the sample filled the available phase space.
We considered how close to saturation(well depth) a star is as a means of interpreting our results. Looking at our sample as a whole, the range of possible well depths is not well sampled; having a median fractional well depth of 0.04 and 0.02 at [3.6] and [4.5], where a fractional well depth of 1.0 indicates saturation. The right panel of Figure 1 shows well depths of the sample. The median well depths of our sample correspond to a SNR of 39 and 24 at [3.6] and [4.5], respectively.
This dataset was not designed with well depth in mind, and was instead designed to find stars which would sample the available exposure time parameter space.
Although available, we reject the 0.02 s photometry because of its large scatter. We have also rejected any data where the well depth is greater than the listed saturation limit in the IRAC Instrument Handbook. 2 The saturation limit results in the rejection of around 250 photometry points at [4.5]. All observations used in this work have SNRs of six or greater. variability in the IRAC bands. 4 The three stars not included in that reference are NPM1+74.0514, NPM1+57.0835, and NPM1+66.0584. Specifically NPM1+66.0584 is one of the three stars in the subset taken with more observations in 2 s frame times. We cannot use this dataset to determine both if the stars are time variable, and if they vary as a function of the other parameters studied herein. While vetted, because these have not specifically been published as calibration stars, we experimented with removing these three stars from our sample. All plots look similar (albeit with larger scatter due to fewer data points), and conclusions remain the same if we remove those stars from the sample. We therefore choose to keep these in the sample for the remainder of this work.
Each of the [3.6] and [4.5] datasets include about 80,000 total individual observations. Specifically, for each channel we have roughly 65,000 subarray and 15,000 full array observations.

Photometry
We briefly describe our pipeline here, emphasizing where it is differs from previous work. One somewhat novel aspect of this work is that we apply a different dark correction to staringmode data than we do to dithered observations. Staring-mode data are processed in the standard pipeline in the same manner as dithered data, including using a dark image which was made by dithering. The delay time between frames affects the bias level in the frame (including in the dark); this is known as the "first-frame effect." Therefore, dithered observations will have different bias levels and patterns than staring-mode observations since staring-mode observations have shorter delay times between consecutive frames, although that pattern is constant if the delay time is constant. This effect adds both noise and systematics to the photometry. For this reason, dithered darks are inappropriate for staring-mode science frames when precision photometry is required.
We used PID 1345 to make our own staring-mode dark suite for all subarray frame times.
We began by removing the dithered dark correction from the PID 1345 data. Because the dark correction is not the last correction made to the BCD files, care was taken to first back out the other corrections, apply the staring-mode dark, then re-apply the other pipeline corrections. We then created a median image for each exposure time (0.02, 0.1, 0.4, 2.0 s) and used this median frame as the staring-mode dark. Applying this new staring-mode dark to the staring-mode data has a measurable impact on derived fluxes. We recommend that anyone doing precision photometry with staring-mode data use a staring-mode dark instead of the pipeline-provided, dithered dark.
While the IRAC pipeline will not include these starting-mode darks, code is available for users to to change which darks are used in a BCD frame on the contributed-code section of the Spitzer IRAC website. 3 To measure flux, we use our appropriately dark-corrected BCD exposures and make the following corrections in order. We first convert images into units of electrons to enable a statistical calculation of uncertainties. Second, we use a center-of-light method to find stellar centroids. 4 Third, we do aperture photometry with a three-pixel radius aperture and (3-7) pixel background annulus. The small aperture size is chosen to reduce noise and the number of cosmic rays in the aperture. Fourth, we make a correction for pixel-phase using pixel phase correct gauss.pro. 5 The pixel-phase correction accounts for gain changes as a function of the position within a pixel, coupled with the undersampling of a point source by IRAC. Fifth, we make a correction for array location. The array location-dependent correction takes into account the variation in system response of the instrument across the field of view, which is primarily due to the change in the angle of incidence of light through the bandpass filter as a function of position on the array. Lastly, we discard the first frame of every subarray FITS file and of every full array AOR. These frames are affected by the first-frame effect discussed above and are likely to have measured fluxes that differ from those of subsequent images. We do not apply an aperture correction since the same aperture is used for all photometry regardless of observing mode.
To compare photometry for all stars on the same plots, we normalize the stars to the same absolute level by dividing all photometry by the median stellar fluxes. The distributions of fluxes per star are somewhat skewed, so a mean does not capture the peak of the distribution. Having skewed distributions causes the mean levels in the subsequent plots to differ from unity.

Results and Discussion
This section describes how the measured IRAC photometry differs as a function of observing mode   Table 2 as a function of array mode, revealing that the measured fluxes appear on average to be lower for the full-array observations than the subarray observations of the same stars. We attempt to confirm this statistically by using an Anderson two-sample test, per star, to see if the distributions for full array and subarray are drawn from the same population. This statistical method considers the vertical distance between the two cumulative distributions. For all ten stars we can say that the full array and subarray data are not drawn from the same distribution at the 25% significance level (maximum possible significance). Thus, the difference between the fluxes measured in full array and subarray modes are statistically significant. Using all ten stars, the median difference between the full and subarray flux measurements is 1.6% at [3.6] and 1.0% at [4.5].   On average, fluxes measured at longer frame times are lower than those measured at shorter frame times.

Disentangling Exposure Time and Array Mode Effects
We examine the possibility of disentangling the effects of exposure time and array mode. Instead of dividing the dataset by star, here we consider all stellar photometry as a single dataset, and divide the dataset into four categories depending on the combination of array mode (full array vs. subarray) and exposure time (short vs. long). Each distribution has between 3000 and 50000 stars (subarray exposure times have lots more frames than full array). Exact exposure times cannot be compared in this analysis because they differ significantly for full and subarray modes (see Table 1). For that reason, the division between the short and long exposure times is set at 0.3 s, to construct statistically significant samples.  the shapes of the distributions. Longer exposure times are in red and light blue; shorter exposure times are in orange and dark blue. Especially at [3.6], an effect is apparent with both exposure time and observing mode. For the stars which have full-array observations in both short and long exposure times, the median difference in the flux is 3.4% at [3.6] (for six stars) and 0.6% at [4.5] (for ten stars). For subarray we find the median difference in flux between short and long exposure times to be 2.9% at [3.6] and 1.5% at [4.5].

Well Depth
The legend to Figure 5 lists median well depths for each of the distributions. Well depth is one physical feature which correlates with the difference between short and long and full and subarray exposures. We do expect that longer exposure times on the same set of stars will have larger fractional well depths, so it makes sense that the full long and sub long distributions have the larger median well depths in both channels. Also, subarray mode has the possibility of shorter frame times than full array, so we would expect that subarray would have lower well depths than full array. Both channels show this behavior. shows little, if any trend, consistent with trends seen in the observing mode and exposure time plots.
While there are sources at higher well depth than 50% full well, their distribution overlaps those of the 20-50% bin. We conclude that only fractional well-depths less than a few tens of percent are affected by this well-depth effect. Consideration of well-depth does not help to disentangle the effects we have seen with observing mode and exposure time, but it is a clue that potentially the source of some of what we are seeing is non-linearity in the low well-depth regime.

Dithering vs. Staring-mode
We do not detect a difference in photometry between the dithered and staring-mode observations.  The staring-mode photometry is consistent with the dithered mode photometry within one sigma in both channels.

Multiple Regression
Finding a relation among the observing parameters (array mode, exposure time, staring/dithering) may help both to a) understand the effects found in this paper and b) correct for them. We therefore use the statistical technique of multiple regression to search for any relations. Specifically, we used Multiple Linear Regression, i.e., multiple independent variables, to predict the value of the dependent variable. To correct IRAC photometry for these effects, we have tried ordinary least squares (OLS) as a multiple linear-regression technique. We used array mode, exposure time, and stare/dither as independent variables, and flux as the dependent variable. We used two different modules in Python for this work, statsmodels 7 and sklearn. 8 We are unable to find successful models. The R 2 goodness of fit is 0.037, when "good" models should have values close to 1.0.
The failure of OLS in this situation could imply that the relationship between the independent and dependent variables is nonlinear.

Conclusions
We document exposure time, array mode (full vs. subarray), and fractional well depth flux dependence in IRAC photometry. The full array has median fluxes higher than the subarray by 1.6% at [3.6] and 1.0% at [4.5]. Dividing the sample further, the long exposures have a lower median flux than shorter exposures. The difference at full array is 3.4% at [3.6] and 0.6% at [4.5]. For subarray we find the median difference in flux is 2.9% at [3.6] and 1.5% at [4.5]. These noted effects are only relevant for a small fraction of IRAC high precision users with data in multiple modes who should include these values in their uncertainty calculations. We posit two potential causes of the noted low-level differences in photometry.
Overall, the normalized fluxes decrease as well depth increases up to a few tens of percent full well. Well depth is correlated with the differences in the flux distributions between full and subarray and long and short exposures. While these correlations with array mode and exposure time are expected, it potentially indicates the presence of non-linearities at the low well depths sampled in this work.
Linearity corrections were made for warm IRAC to correct for a known effect where an increase in incoming photons does not correspond to an increase in counts (or data numbers DN).
This occurs because filling the well decreases the potential, which in turn results in a less responsive system. The linearity correction for the IRAC InSb arrays inherently assumes no linearity correction at low well depths. Therefore, time-intensive observations were not made during the mission to include extremely low well-depth observations. Instead, calibration observations focused on the moderate (> 20%) to high well depths where the linearity deviated most significantly from a straight line correlation between photons and DN (see IRAC data handbook for a description of the derivation of the warm linearity correction. 6 ) One explanation for why this low count linearity effect could exist at [3.6], but not [4.5] is that the applied biases are different between [3.6] and [4.5] implying that the electric potentials are different, which could explain the stronger effect at [3.6] than [4.5].
Understanding the root cause of non-linearities is beyond the scope of this paper. Many complicating issues are hiding under that designation including the 3D structure of a pixel, how the linearity interacts with Fowler sampling (specifically how to translate corrections derived at one set of Fowler sampling parameters to those in another, which would get worse as the integration times become comparable to the time spent reading the detector), the speed at which the electric fields are changing in these very short exposures compared to the timescales of the exposures or the readouts and persistent image trap filling.
Linearity can in some detectors depend on the flux of the source in the sense that it matters not only how many photons come in to the detector, but also the rate at which they fill the well. We do not have enough observations to know if the effect we are seeing is dependent on the brightness of the stars.
A second possible explanation for the difference between full and subarray photometry is that 6 https://irsa.ipac.caltech.edu/data/SPITZER/docs/irac/iracinstrumenthandbook/ the array is resetting faster between consecutive frames for the subarray. A faster reset applies a stronger reverse bias on the array more frequently, which could affect the distribution of photoelectron traps, and therefore could have a low-level effect on photometry. We know that other similar effects ( e.g., "first-frame effect") are more significant at [3.6] than [4.5]. 7 No flux difference is apparent between the staring and dithering mode observations after correcting the staring-mode data by a staring-mode dark. Anyone doing absolute photometry with staring-mode data should be using a staring-mode dark. The full and subarray staring-mode datapoints considered here are all taken on the same array pixel (the sweet spot of the subarray), which is not true for the dithered positions. Thus, residual pixel-phase uncertainties cannot be the cause of the measured flux differences between the full and subarray staring-modes, otherwise we would see this effect in this work when comparing staring and dithering modes.
We have no evidence for low level persistent images being the cause of the differences in photometry measured here. We know that the persistent images are stronger at [3.6]. However, for [3.6] the same fraction of observations were taken at the sweet-spot pixel in both full and subarray images. The sweet spot is the pixel at the center of the array where most observations are conducted in the subarray because it has been the best characterized for the pixel phase effect.
This means that the sweet spot pixel is more likely to have frequent low-level persistent images than other pixels on the array. If a larger fraction of observations in the subarray had been taken at the sweet spot than the full array, we might have expected persistent images to be the culprit. On the contrary, we see no evidence for this.
Our analysis implies that these differences in fluxes are systematic; they do not average out with more observations. All full-array photometry will be different than all subarray photometry, 7 https://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/som12.2.pdf no matter how many observations are taken in any given observing mode.  List of Tables   1  Available IRAC Frame Times   2 The Calibration Star Sample