Systematics in ZTF Photometry
Note: this calibration requires matching all the bright ZTF sources to PS1. At the time of this intial analysis I had no access to a full copy of PS1 DR1. Thus it was necessary to limit the sample to a few million in order to uses online matching services containing PS1 DR1, such as CDS XMatch.
Magnitude BiasThe initial results suggested that the bright-end magnitude bias within a field (shown above) is consistent for a given quadrant, but varies between each of the 64 CCD quadrants and filters. This seems most likely a detector gain issue. In discussions with R. Smith, he mentioned that the detector gain had been found to actually be significantly non-linear. There was also suggestions of the so called brighter-fatter effect and other detector-based possibilities.
When the photometry was combined the magnitude bias was found to extend to faint magnitudes. So the full photometry data sets were extracted for the selected fields (total 12 million sources). However, at the faint end, the magnitude bias becomes dominated by an Eddington bias. Thus the magnitude bias was only fit for ZTF sources brighter than ~19.25 to avoid this. For each quadrant, quadratic fits were used since the bias was evidently not linear.
Spatial Structure within ZTF Photometry
After correcting for the magnitude bias it was clear that the spatial variations in photometric uncertainty within a quadrant (above) were a reflection of the spatial variations in the photometry.
Corrections for this internal residual structure were underway by the Desy group using starflats. That is, observations where a single field(?) is dithered and photometry of sources are remeasured to determine spatial variations. The combined and binned starflat data is shown above. Since this data is taken in sequence on a single night, very similar observing conditions are expected. Thus the result should be largely free of effects due to changes in observing conditions.
A clear way to check the starflat-based determination of the spatial systematics is to use the photometry itself. The advantage of this data is that there are far larger numbers of measurements can be used in the determination. In principal such a dataset could have hundreds of times the amount of photometry in the starflats. Such a large data set makes it possible to limit the selection to the bright stars that have smaller intrinsic uncertainties than the systematics. So, overall the spatial variations can in principal be better sampled since millions of bright sources can be used to determine the structure within each of the 64 quadrants. However, in contrast to starflats, more careful consideration is needed to address any possible biases due to real variations observing conditions.
Full Camera FoV g-band systematics based on photometry data matched to PS1 (c.f. left figure above). Colours range from ~-0.03 to 0.03 mags.
Comparing the systematics from starflat data and those from combined photometry we see that the general structure of the systematic is this same. However, the structure based on the photometry is smoother and clearer due to the higher S/N of this combined photometry results.
Strong structure is seen on edges (due to reflections and possibly charge transfer issue seen in other data?) and discrete lumps (due to dust?). Full ccd show large features that also visible in the flat fields. Suggesting possible problems with them.
Notably, the borders of the CCD quadrants exhibit discontinuities between quadrants. This is most likely due to gradients spanning the full CCDs. Since the data is calibrated at the quadrant level this introduces an offset at the borders. This suggests that structures spanning full CCDs cannot be fit without correcting this.
The corrected starflat data still exhibits some clear spatial structure that is like hard to remove with with either data set.
Fitting the spatial structure
The extent of the structure within individual quadrants is very significant and most likely due to problems with flatfielding and gain corrections. That is to say, systematic uncertainties in the flatfields are propagated into the data and become apparent when the data is combined. This effect may be increased by the fact that different flatfields are constructed and used each night even when no changes have been made to the telescope setup.
Attempts to automatically model the photometric residual surfaces were undertaken with numerous (~100) different types functional fits. These ultimately failed to produce satisfactory results since the dust artifacts and very strong edge effects produce abrupt deviations that is not well modeled by smooth functional fits. Fitting in multiple steps is also not ideal.
Attempts to fit splines to the unbinned data were also unsatisfactory (residuals > 0.005 mags, clear systematic variations and spikes) because the raw data was insufficiently constrained. However, since the wasn't any clear significant structure on scales less than a couple of hundred pixels the binned data was used. If localized structure is actually present (that is not accounted for by flatfields, etc), corrections will require far more photometry (than ten fields) to properly constrain it.
As shown in the figure above, quadratic B-spline fits of high order (440 knots) were used to fit the binned data give good fit residuals (sigma of 0.002) magnitudes without spikes due to poor constraint. Although, care is still required to check the fits on image edges where strong gradients are present.
The figures above show how well the spline fits represent the actual structure in the binned photometry.
Verifying the spatial structure corrections.In order to verify that the corrections determined with the original photometry data set work for other fields work for both the selected data and other data in general it is necessary to verify the analysis. To do this, for a few quadrants, I selected an additional set of photometry for 8 fields. This photometry was corrected for the magnitude bias and quadrant structure.
The sigma of corrected residuals wrt PS1 (for sources with g < 17.5), for both the original set and the new ones, is ~0.008 mags. This suggests that the same structure is seen in multiple fields with a very similar in amplitude and distribution. That is to say, the result from the combined photometry is not strongly affected by variations in the observing conditions. However, see more analysis below.
Correcting structure across the full ZTF FoVInitial fits to the structure were poorly constrained on edges where few sources are detected. This is due to significant variations in pointing between the reference frames and the individual observations. To improve this situation the photometry sample was increased by a factor of three (so that each quadrant contained photometry from ~30 fields). The resulting residuals were much more clearly defined (c.f. the figures above). The residuals from the binned residuals spline fits were reduced from two milli-mags to one for many fields. Nevertheless, accurate values of residuals on quadrant edges was still not as good as it could be in many cases. Thus, extra care was taken to fit the individual quadrant values by hand. The edge bins with few points were further constrained by adding additional faint sources and by interpolating the values from neighbouring bins.
With the higher S/N of the new combined data some evidence of a large ring is seen that is due to the focal plane pattern. This is what was initially expected from the starflat analysis since it is seen in the DES analysis (Berstein et al. 2018, PASP, 130, Figure 2).
Since rainbow colour maps can exaggerate the presence of structure, additional greyscale images of the same data are given below. However, the variations at the edges of adjacent quadrant becomes less clear in the grayscale images since these differences are slight.
The structure within g and r-bands is very similar with only slight differences in residual amplitude and a few dust spots. This suggests that most of the dust spots are not on the filters, but other optics.
After fitting the spatial structure in each quadrant and subtracting it, the residual photometric structure is given above. The g-band data has more significant residuals at the top and bottom of quadrants than r-band due to the higher amplitude of differences compared to PS1 data. The amplitude of the residuals of the left and right edges of CCDs and similar in each band.
After applying the corrections to ~3 million sources with 14 < mag < 16.5 from across the full FoV we find residuals of ~7 milli-mags. Thus, overall the uncertainties are generally expected to be less than 1 percent.
The corrected data does exhibit extended tails (compared to a Gaussian fit) due to the remaining edge effects. Hence objects falling near edges will generally be more uncertain. The same edge structure is seen in DES skyflat subtracted residuals. We note that few objects are expect on the edges since such sources were clearly absent from the data.
The residuals for ZTF g-band wrt PS1. Black histogram original ZTF photometry calibrated to PS1 for ~3 million source with 14.0 < g < 16.5 . Blue, the histogram after applying the magnitude corrections. Red, the result after applying magntiude and structure corrections.
Systematic offsets between fields
Binned differences between the ZTF g-band and PS1. The black line is the original calibrated data. The blue line is corrected for the magnitude dependence. The red line is corrected for the spatial structure. The green line is after systematic offsets between each field and PS1 are removed.
After correcting for the magnitude dependence and the spatial dependence (as noted above), it became clear that the resulting residuals were not exactly centered on zero. As shown above there was a slight offset (~0.002 mags, red line).
Binned differences between ZTF and PS1 mags for corrected individual fields and bright (g < 17.5) sources.
Closer inspection of the individual fields showed systematic offsets wrt to PS1. This is offset was found to be up to 0.005 mags. Correcting each of the input fields for this offset further reduces the final observed scatter for the corrected photometry.
The sigma of the resulting residuals wrt PS1 (for sources with g < 17.5), after the magnitude and spatial corrections and field offset is ~0.007 mags (c.f. 0.008 without).
Determining systematic offsets for all ZTF fields
To correct for systematic offsets between ZTF and PS1 we obtained photometry for all ~300 million ZTF bright (mag < 18) stars. These data were matched with full PS1 DR1 combined catalog. The ZTF photometry was first corrected for the quadrant level magnitude biases and the median calibration colour coefficents required to match ZTF to PS1. Finally, the offsets between ZTF median mags and PS1 combined mags were calculated for every quadrant in every ZTF field with data.
A histogram g and r-band ZTF magnitude offsets wrt PS1 g and r-band mags on a per quadrant basis. The blue histogram gives the g-band offset mag distribution. The red lines gives the r-band offset mag distribution.
Overall we find that the g-band data exhibits larger offsets than the r-band data. This may simply be reflective of the fact that the residuals are larger in g-band data (as noted above). The field offset distributions have sigificant tails due to some regions having large offsets.
The observed plots of photometric offsets compared to PS1 show some significant systematics. These are particularly evident in the Galactic plane. This is most likely linked to crowding effects. The g-band data shows some larger offsets in sparse fields away from Galactic plane. This is probably due to poorer calibration due to a lack of calibrators (as mentioned below). A few isolated groups of quadrants that are far from the Galactic center also show large offsets in both g and r-band (for example near RA=100 deg, Dec=0 deg).
The colour dependence of photometric residualsDuring discussions of correcting the residual structure using photometry or starflats there was mention of the possible colour dependence of the structure. To quantify this more clearly I compared the residuals wrt PS1 in g-band with those in r-band.
The difference between ZTF g and r-band residuals compared to PS1 (CCD 5, quadrant 1).
This figure shows that the structure within a quadrant varies significantly between g and r bands. This figure relates to the same quadrant shown above. Based on the structure within that data we see that the difference between g and r is very likely not simply an offset or scaling between the two bands.
A difference in the g and r-band residual structure implies that there is some spatial variation in the colour response (in addition to possible local differences such as dust spots on filters).
Colour dependence across the full FoVWith the large sample of ZTF photometry used to determine the spatial structure, we investigate the differences between the structure in the g and r-band observations.
Comparison of g and r-band residuals. The red line has slope 1.37 corresponding the average ratio of g to r-band residuals.
Comparing the values in each of the g and r bins we see the the g-band residual structure is approximately 37% larger than the r-band structure. Notably the bulk of the residuals are not centered on zero, but near 0.005 mags in g and r.
If we subtract the binned r-band values from those in g we see that that the vertical lines on the edges of CCDs largely disappear, while the dust dot-like features remain. This suggests that the edge effects themselves are not wavelength dependent while the affect of the dust spots is.
To confirm this we multiple the r-band structure by 1.37 (to account for the difference in average offset amplitude) and subtract this from the g-band data we that the dust spot disappear. This suggests that the dust spots follow the same trend as the overall amplitude difference (i.e. they have the same dependency). However, large structures that are centered on each CCD remain. This suggests that the residuals cannot be account for by purely scaling the results between bands. The central and outer circular features of the focal plane become clearer in these figures.
The lines along the edges of CCDs have equal amplitude in g and r-band suggesting that the effect is not wavelength dependent. This suggest the affect originates from behind the filter. In contrast, most of the dust spots exhibit the same scaling as the general background structure and do not vary between filter. The dots are thus generally not located on the filters. A small number of out-of-focus rings are seen in only one filter suggesting these are on the filter itself.
Whatever the cause of the colour dependencies, corrections are required for both g and r separately. Some consideration of how these offsets affect objects of varying colours differently is worthwhile. This effect is equally important regardless of whether starflats or combined photometry is used for spatial corrections.