{'fraction_non_alphanumeric': 0.03680999851212617, 'fraction_numerical': 0.02041362892426722, 'mean_word_length': 4.429079159935379, 'pattern_counts': {'":': 0, '<': 0, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Palomar Transient Factory photometric calibration

The Palomar Transient Factory (PTF) provides multiple epoch imaging for a large fraction of the sky. Here we describe the photometric calibration of the PTF data products that relates the PTF magnitudes to other mag systems. The calibration process utilizes SDSS r~16 mag point source objects as photometric standards. During photometric conditions, this allows us to solve for the extinction coefficients and color terms, and to estimate the camera illumination correction. This also enables the calibration of fields that are outside the SDSS footprint. We test the precision and repeatability of the PTF photometric calibration. Given that PTF is observing in a single filter each night, we define a PTF calibrated magnitude system for R-band and g-band. We show that, in this system, 59% (47%) of the photometrically calibrated PTF R-band (g-band) data achieve a photometric precision of 0.02-0.04 mag. Given the objects' color, the PTF magnitude system can be converted to other systems. A night-by-night comparison of the calibrated magnitudes of individual stars observed on multiple nights shows that they are consistent to a level of ~0.02 mag. Most of the data that were taken under non-photometric conditions can be calibrated relative to other epochs of the same sky footprint obtained during photometric conditions. We provide a guide describing the use of the PTF photometric calibration data products, as well as the transformations between the PTF magnitude system and the SDSS and Johnson-Cousins systems. (abridged).


INTRODUCTION
The Palomar Transient Factory 14 (PTF; Law et al. 2009;Rau et al. 2009) is a synoptic survey designed to explore the transient sky. The project utilizes the 48 ′′ Samuel Oschin Schmidt Telescope on Mount Palomar. The telescope has a digital camera equipped with 11 active CCDs, each 2K×4K pixels (Rahmer et al. 2008). Each PTF image covers 7.26 deg 2 with a pixel scale of 1.01 ′′ pix −1 . From the beginning of the PTF survey in March 2009 until January 2011, most of the images were taken with the Mould R filter. Starting January 2011, we performed the PTF main survey in g-band during dark time and in R-band during bright time. In addition, a few nights around times of full Moon are used for taking images with narrow-band Hα filters. A PTF system overview and review of the first year's performance are given in Law et al. (2010).
Accurate photometric calibration is a non-trivial task since one must know both the atmospheric transmission (e.g., Padmanabhan et al. 2008;Burke et al. 2010) and the optical/detector system response as a function of wavelength, time, and sky position. Moreover, observations of flux standards are required, and the true spectral energy distribution of these standards needs to be known. In practice simplifying assumptions are made in order to achieve solutions which are good to the few percent level. For example, in many cases, it is customary to use the calibrated magnitudes of the standard stars instead of their spectral energy distribution, and to assume that the atmospheric transmission is a smooth function of airmass. We note that relative-photometry approaches (e.g., Gilliland & Brown 1988;Gilliland et al. 1991;Honeycutt 1992;Everett & Howell 2001;Ofek et al. 2011a) can achieve better accuracy from the ground, but are limited by scintillation noise (e.g., Young 1967;Gilliland & Brown 1988), Poisson noise and flat-fielding errors.
There are several approaches to photometric calibration. For example, the Sloan Digital Sky Survey (SDSS; York et al. 2000) images are calibrated using an auxiliary 20-inch telescope, which determines the photometric condition on a nightly basis (Hogg et al. 2001). This telescope measures the extinction and photometric zero point using a network of standard stars (Smith et al. 2002), which, in turn, are tied to the standard star BD+17:4708. Furthermore, the photometric uniformity in the SDSS is achieved by the algorithm described in Padmanabhan et al. (2008). The SDSS photometry is uni-form to better than 2% in all bands (Adelman-McCarthy et al. 2008).
Ofek (2008; see also Pickles & Depagne 2010) has suggested using Tycho-2 (Høg et al. 2000) stars to photometrically calibrate astronomical images. The SDSS griz magnitudes of such stars are based on synthetic magnitudes of stellar spectral templates fitted with the Hipparchos B T , V T magnitudes and the 2MASS (Skrutskie et al. 2006) JHK magnitudes. However, this strategy requires images containing unsaturated Tycho calibration stars which lie in the ≈ 9-12 magnitude range. The saturation limit for the PTF g-and Rband survey is typically 15 around 14 magnitude.
Herein, we describe the method we have developed for the photometric calibration of PTF data taken in the g and R bands. The photometric calibration of the PTF Hα survey will be described elsewhere. We note that the relative photometric calibration of PTF currently 16 achieves precision as good as 3 mmag, in given fields, at magnitude 15 (e.g., van Eyken et al. 2011;Agüeros et al. 2011;Law et al. 2011;Levitan et al. 2011;Polishook et al. 2011). The PTF relative photometry pipeline will be described in Levitan et al. (in prep.).
Our method of photometric calibration for PTF data is similar to the "classical" method of observing a small number of calibration stars (e.g., Landolt 1992) through various airmasses and assuming photometric conditions -i.e., the atmosphere transmission properties are constant in time and are a continuous function of airmass. The main difference is that we are using SDSS stars as standard stars and we typically observe ∼ 10 5 SDSS stars with high S/N in each CCD per night. Another important difference is that PTF observations are done in a single filter each night. Therefore, in order to relate the PTF calibrated magnitudes to one of the common absolute systems one need to apply color terms. The paper is organized as follows. In §2, we describe the PTF photometriccalibration method. In §3, we discuss the illumination correction, while §4 describes a related problem that plagues early PTF data. In §5 we describe the data products and what calibration information is stored with the image-product data. The performance of the PTF magnitude calibration is given in §6, and the derived photometric parameter statistics are discussed in §7. We provide the color transformation between the PTF magnitude system and other systems in §8. Finally, we conclude the paper in §9. Unless specified otherwise, the statistics given here are based on all PTF data obtained from March 2009 to July 2011.
2. PHOTOMETRIC-CALIBRATION METHOD PTF has two main data-reduction pipelines. The first is for real-time (≈ 30 min; e.g., Gal-Yam et al. 2011) image subtraction and transient detection, hosted by the Lawrence Berkeley National Laboratory (Nugent et al., in prep.). This paper will make no further mention of this pipeline, as only the second pipeline is relevant here, as discussed below.
The photometric calibration described in this paper is implemented in the second pipeline. This pipeline, hosted by the Infrared Processing and Analysis Center (IPAC), performs final image reduction and extracts the source catalogs. The processing includes splitting the multi-extension FITS images, 15 The PTF camera electronics were modified on 2009 Oct 22 to increase the dynamic range. Before this date, the saturation limit was around 15th magnitude. 16 For relative photometry, we use a scheme similar to that proposed by Honeycutt (1992) with some modifications outlined in Ofek et al. (2011a). de-biasing, flat fielding, astrometric calibration, generation of mask images, source extraction and photometric calibration (the subject of this paper). This pipeline is described in Grillmair et al. (2010) and Laher et al. (in prep.).
Our photometric-calibration process runs on PTF data separately for each night, filter and CCD. It first attempts to match the sources extracted from the PTF images taken during a given night with SDSS-DR7 PhotoPrimary 17 point sources (i.e., SDSS type= 6). In order to assure good photometric quality, only SDSS stellar objects with photometric errors smaller than 0.05 mag in r-and i-bands and which are fainter than 15 mag (to avoid saturated stars) in the g-, r-and i-bands are used. The photometric solutions are calculated only if more than 30 science images were taken during the night, and only if we were able to select more than 1000 SDSS stars in all the images taken with a given CCD and filter during the entire night.
We use the SDSS-matched stars as a set of standard stars and solve for the photometric zero points, airmass terms and color terms in a given night. The fitting process is done separately for each one of the 11 active CCDs and the g-and R-band filters. This is required since the CCDs are not identical and some of them have a different spectral response (see Law et al. 2009 for details). For observations taken using the R-band 18 filter we fit the following model: while for g-band observations we fit: Here, f inst PTF is the PTF instrumental magnitudes in band f (either R or g), f SDSS is the SDSS magnitude in band f (either g, r or i), ZP f is the photometric zero point for filter f , α c, f is the color term for filter f , α a, f is the extinction coefficient (airmass term) for filter f , α ac, f is the airmass-color term for filter f , AM is the airmass, α t, f and α t2, f are the polynomial coefficients for the change in the zero point of filter f as a function of time, t in days, during the night, where t m in days is the middle of the night, and δt is the exposure time in seconds.
The instrumental magnitudes used in the photometric calibration process are based on the SExtractor (Bertin & Arnouts 1996)  sigma clipping of 3σ . The sigma clipping ensures removal of stars with bad photometry (e.g., influenced by cosmic rays; saturated pixels). Next, in order to be able to correct for zero-point variations across a given CCD (see §3), the residuals from the best fit of Equations 1 or 2 are binned in cells of 256 × 256 pix 2 along the X and Y dimensions of each CCD. In each cell, we take the mean of the residuals and subtract from it the mean of the residuals in the center-of-image cell 20 , in order to render the residuals relative to the residual at the image center. The resulting coarse image of the mean of the residuals is linearly interpolated to generate an image at the resolution of PTF images of pixel-to-pixel zero point variations. This image product is equivalent to an illumination correction, and herein also called the zero point variation map (ZPVM; see §3). The uncertainty in the ZPVM is estimated by calculating the standard deviation (StD) of the residuals in each cell 21 .
We note that the PTF illumination correction images are usually smooth on large scales (comparable with the CCD image size). Therefore, in most cases the ZPVM can be represented by low-order polynomials. In order to provide users with a simpler version of the illumination correction, we also fit versions of Equations 1 and 2 that consists of a low-orderpolynomial representation of the ZPVM, e.g., for the R-band: (3) where X and Y are the positions on the CCD, X size is the size of the CCD, in pixels, in the X dimension (2048 pix) and Y size corresponds to the Y dimension (4096 pix). A similar equation is fitted for the g-band observations (see Equation 2 for analogy). Here, the illumination correction is represented by polynomials with coefficients α x1, f , α y1, f , α y2, f , α y3, f , and α xy, f . This representation usually provides a good estimate of the illumination correction over the image. We note that for each solution we store a variety of information regarding the quality of the fit (see §5).

ILLUMINATION CORRECTION
The ZPVM and its polynomial representation amount to an illumination correction that describes the variations in the photometric zero point spatially across the image (e.g., Regnault et al. 2009). Naively, such zero-point variations should be removed by the flat-fielding process. However, for example, if the fraction of flux in the stars' point spread function (PSF) wings, relative to the flux integrated to infinity in the PSF, is variable as a function of position on the CCD then this may induce variations that are not removed by the flat-fielding process. Such CCD position-dependent variations are indeed detected in PTF images (e.g., §4). Figure 1 presents two examples of illumination correction images. The left panel 20 The position of the center of this central cell is x = 1025, y = 2049. 21 The StD is not divided by the square root of number of data points in each cell. Therefore, it represents the scatter rather than the error in the mean. In such bad cases the polynomial representation may deliver poor quality results. We note that this bad example is not representative of PTF data and that typical images obtained using this system have good image quality.
shows a typical case, in which the illumination corrections have a low range variations. The right panel shows one of the worst cases we encountered thus far, with larger amplitude variations (see §4). We note that the median peak-to-peak variations in the zero point across the image over all photometric nights, filters and CCDs is about 0.06 mag.
In the first year of the PTF project following first light, we detected a problem with the PTF image quality. This issue is referred to as the fogging problem, and it manifested itself as a diffuse halo around bright stars and a prominent large scale non-uniformity in the illumination corrections. The fogging problem and our testing and subsequent apparatus modifications for ameliorating its effects are described in §4.

THE FOGGING PROBLEM
The PTF camera window, which also acts as a field flattener, is fairly large (≈ 320 cm 2 ). The window surface temperature is ≈ 16 • C below the ambient temperature. To prevent condensation from forming on the window, a constant stream of dry air or nitrogen is blown across the window's outer surface. In the original installation of the camera, new nylon tubing was used to convey the gas to the window. This tubing was selected for its reported high durability, flexibility and low outgassing properties. Once the window fogging problem was discovered, a test chamber was assembled, which simulated the cold window environment in which dry nitrogen could be conveyed across a cold test surface.
The outgassing properties of various tubing materials were evaluated in the test chamber. The nylon tubing used in the original camera installation was found to have a moderate amount of outgassing which produced volatiles that would condense on the cold test surface. Tubing made from Teflon FEP (fluorinated ethylene propylene) was found to have low outgassing with no detectable volatile condensation on the cold test surface. The camera window was cleaned and all tubing between the dry nitrogen supply and the camera window was replaced with this material on 2010 September 2. No window fogging issues have been observed since the tubing material was replaced.
We note that the camera window was cleaned several times during PTF operations, and after each cleaning an immediate reduction in ZPVM deviations from zero is expected. The cleaning dates are listed in Table 1.
Fortunately, the method described in §2 provides an estimate of the zero-point variations across the CCD image. Therefore, the illumination correction is used to correct our photometry, and to monitor the PTF image quality.

CALIBRATION PRODUCTS
The parameters required for calibrating the instrumental magnitudes are stored in the PTF database, as well as in the image and catalog FITS file headers ( §5.1). In addition, a full version of each illumination-correction image is stored as ancillary calibration data in a FITS file, and associated metadata are stored in the PTF database ( §5.2). The use of these data products is discussed in §5.3.

FITS headers
The parameters based on the solution of Equation 3 are stored in the image headers. Moreover, generated from each image is a FITS binary table containing all the sources extracted from that image using SExtractor. The FITS binary table catalogs contain three header + data units (HDUs) and two FITS extensions. The first HDU (i.e., the primary HDU) contains a header with metadata from SExtractor and no data. The second HDU, or first FITS extension, is a binary table containing the properties of the sources extracted from the processed image, with its header giving information about the table columns. The source properties in the binary table include aperture-photometry instrumental magnitudes and other SExtractor outputs. The binary table has also been augmented with an additional column called ZEROPOINT, which stores the source-dependent zero points computed from our photometric-calibration parameters; these zero points already include the 2.5 log(δt) contribution for normalizing the image data by the exposures time, δt, in seconds, and so straightforwardly adding the instrumental magnitudes to their respective zero points will result in calibrated magnitudes. The third HDU, or second FITS extension, contains an empty image whose header is a copy of the processed-image header, which includes information about the photometric calibration as previously mentioned. The header keywords related to the photometric solutions are summarized in Table 2.
The FITS headers contain additional parameters related to photometric calibration. However, these parameters are based on different routines which are no longer supported. For completeness, these parameters are listed in Table 2 under the obsolete parameters section. These keywords are products of our first attempt at photometric calibration of PTF images, which is less sophisticated than the method presented here. Both methods are still being run in the pipeline and the results from both methods are still being written to the FITS headers of the processed images. A detailed description of the first version of photometric calibration is beyond the scope of the current paper, but will be available from online documentation. The illumination correction images are not applied to the individual processed PTF images. One reason is that the illumination correction images are reliable only for photometric nights. The selection of photometric nights is discussed in §7.

Use of data products
Each processed PTF image is accompanied by an associated FITS binary table containing a catalog of objects extracted from the processed image by SExtractor. The catalog source magnitudes are instrumental magnitudes, and users of this product can convert instrumental magnitudes into calibrated magnitudes using the provided PTF photometric parameters and the following procedure. In order to convert the MAG AUTO 22 instrumental magnitudes to calibrated magnitudes, one needs to apply Equation 1 or 2 and add the value of the ZPVM image at the location of the object. Alternatively, it is possible to directly use Equation 3.
Applying Equation 1, 2 or 3 requires the colors of individual sources in the SDSS system. If the color of a source is known, from PTF observations or other surveys (e.g., SDSS), then it is possible to use these equations to get the magnitude of that source in the SDSS system. However, not all PTF fields were observed in both the g and R filters or are within α x1, f mag (X size pix) −1 Value of parameter photometric calibration 07 APPARE07 ∆α x1, f mag (X size pix) −1 Error in parameter photometric calibration 07 APPN08 Name of parameter photometric calibration 08 (i.e., 'YTerm') APPAR08 α y1, f mag (Y size pix) −1 Value of parameter photometric calibration 08 APPARE08 ∆α y1, f mag (Y size pix) −1 Error in parameter photometric calibration 08 APPN09 Name of parameter photometric calibration 09 (i.e., 'Y2Term') APPAR09 α y2, f mag (Y size pix) −2 Value of parameter photometric calibration 09 APPARE09 ∆α y2, f mag (Y size pix) −2 Error in parameter photometric calibration 09 APPN10 Name of parameter photometric calibration 10 (i.e., 'Y3Term') APPAR10 α y3, f mag (Y size pix) −3 Value of parameter photometric calibration 10 APPARE10 ∆α y3, f mag (Y size pix) −3 Error in parameter photometric calibration 10 APPN11 Name of parameter photometric calibration 11 (i.e., 'XYTerm') APPAR11 α xy, f mag (X size Y size ) −1 pix −2 Value of parameter photometric calibration 11 APPARE11 ∆α xy, f mag (X size Y size ) −1 pix − . Symbol represents the parameter designation used throughout this paper (e.g., Eqs 1-3). The set of keywords below the horizontal line are obsolete parameters (see text). the SDSS footprint. In these cases, setting the color terms α c, f and α ac, f to zero will return the object's magnitude in the non-color-corrected PTF magnitude system (i.e., the natural PTF magnitude system). We denote magnitudes in this system by f PTF , where f is the filter moniker. PTF magnitudes which are color-corrected (i.e., the source color is known and applied to Equations 1, 2 or 3) are denoted by f PTF/SDSS . We note that applying Equations 1, 2 or 3 is done by isolating f SDSS and replacing it with f PTF/SDSS in cases where the color is known, or f PTF if the colors are set to zero. We note that the calibrated f PTF magnitudes of all sources detected in PTF images are available from the PTF database.
As in the case of any other magnitude system, in order to convert the PTF non-color corrected magnitudes to other systems, one needs to know the color index of the source. In some cases, it is possible to use some prior knowledge about the mean color index of a class of objects (e.g., RR Lyr stars; asteroids), in order to convert their PTF magnitudes (in a sin- gle band) into SDSS magnitudes. For example, 68% of mainbelt asteroids have r − i color index in a narrow range of about 0.2 mag (e.g., Ivezić et al. 2001). Therefore, given the PTF R-band color coefficients, α c,R ≈ 0.2, the scatter in the mean color correction for asteroids is about 0.04 mag. Neglecting the airmass-color terms (which are typically small; see Table 3), the relations between the PTF and the SDSS magnitude systems, for objects with stellar-like spectra, are given by: and where the values of the color terms are listed in Table 3. In order to apply the illumination correction to individual images, we need to multiply, pixel by pixel, the processed image by 10 −0.4×ZPVM , where ZPVM is the illumination correction image. Alternatively, one can use the less accurate polynomial representation of the ZPVM image. 6. PERFORMANCE The accuracy of our calibration process, relative to SDSS, is discussed in §6.1, while in §6.2, we discuss the repeatability of our photometric calibration. 6.1. Accuracy As described in §5.3, the PTF calibrated magnitudes can be given in two systems. A color-corrected magnitude system, denoted by R PTF/SDSS or g PTF/SDSS , in which the known color of the object is applied to Equations 1-2 or 3. By construction, this magnitude system is similar to the SDSS system. The other possibility is a "natural system" in which all the color terms involving α c, f and α ac, f are set to zero (i.e., the color indices of the objects are ignored). These magnitudes are denoted by R PTF or g PTF .
To demonstrate the current accuracy of the PTF photometric calibration, we show in Figure 2 the differences between SDSS magnitudes and color-corrected PTF R-band magnitudes (R PTF/SDSS ), as a function of SDSS magnitude.
In this particular example, the StD in the r SDSS − R PT F/SDSS for bright stars is smaller than ≈ 25 mmag. Figure 3 shows the same, but for PTF magnitudes not corrected for the color term (R PTF ). The scatter in the uncorrected color plot is larger, as expected. The larger scatter in Fig. 3 is due to the fact that different stars in the field of view have different colors. The 95th percentile range of r − i color of SDSS stars in the r-band magnitude range of 16 to 17 is between −0.2 and 1.2 mag (see Fig. 4). Given that the PTF mean r − i color term is about 0.2 mag, this corresponds to a color correction between −0.04 and 0.24 mag.
We note that in Figures 2-3, the magnitude difference is systematically tending toward larger negative values, starting around magnitude 19.5. This is due to the use of MAG AUTO. Indeed, using aperture magnitude (i.e., MAG APER), we do not see any evidence for this bias. This is because MAG AUTO adjusts the aperture used to extract the source magnitude for each object. Therefore, if MAG AUTO is used for sources near the survey detection limit it is recommended to estimate the aperture correction for these sources in order to obtain their unbiased magnitudes. We note that the MAG AUTO is different from aperture or PSF magnitudes. In order to convert between MAG AUTO and other kinds of magnitude estimators, one needs to find the aperture correction between these magnitudes. Both MAG AUTO and aperture magnitudes in predefined five apertures are available in the FITS binary source catalog associated with each image. Future versions of the PTF photometric pipeline will use aperture or PSF magnitudes.

Repeatability
The stability over time of the PTF R-band photometric solutions is demonstrated in Figure 5. This figure shows the scatter in the calibrated magnitude of each star, over multiple epochs, as a function of magnitude. The scatter is calculated using the 68th percentile range divided by two (i.e., equivalent to StD in case of a Gaussian distribution). This is based on 27 images of PTF field 23 100037 CCDID 24 = 0 taken between March and October 2010, which have photometric calibration bright-star root-mean squares (RMS) value (parameter APB-SRMS in Table 2) of less than 0.04 mag.
We choose to use the 68th percentile range instead of StD since it is more robust to outliers. For example, if a night was "photometric" for 90% of the time (e.g., clouds entered only toward the end of the night), then our pipeline might claim that the night was photometric, but the calibration of some of the data will be poor. Therefore, in order to get the calibrated source magnitudes, it is important to average the data taken over several photometric nights. We note that we are using this approach for the compilation of the PTF photometric catalog (Ofek et al., in prep.). In turn, this catalog will be used in later phases to calibrate the entire PTF data. Figure 5 suggests that, at the bright end, the repeatability of PTF calibrated magnitudes is good to a level of 0.02 mag. Figure 6 shows the same, but for stars in 100 representative PTF fields and all CCDs. The typical repeatability of PTF magnitudes is field-dependent. The median repeatability over all these 100 fields, for all CCDs, for stars between 15 to 15.5 mag, is about 11 mmag and the 95-percentile range is between 2 mmag to 44 mmag. We note that PTF g-band observations achieve similar repeatability. 7. PHOTOMETRIC PARAMETER STATISTICS The term "photometric night" is not well defined and depends on the required accuracy. Figure 7 shows the cumulative histogram of the RMS of the best-fit residuals of bright stars (parameter APBSRMS in Table 2) in all the images taken by PTF. This figure suggests that about 62% (50%) of the R-band (g-band) images taken by PTF have photometric calibration with bright-star RMS values smaller than about 0.04 magnitude. Figure 8 shows the R-band airmass term (α a,R ) vs. the color term (α c,R ), while Figure 9 shows the same for g-band.
These figures suggest that some nights that have small bright-star RMS values (i.e., smaller than 0.04 mag) have anomalous airmass or/and color coefficients. Therefore, it is better to select data taken in nights for which the airmass and color terms are close to their average values (e.g., see Table 3). Here we define photometric nights as nights with bright-star RMS value smaller than 0.04 mag and α c, f within the range α c, f ± 3∆[α c, f ] and α a,R within the range α a, f ± 3∆[α a, f ]. Here, α c, f , ∆[α c, f ], α a, f , and 23 PTF field (denoted by PTFFIELD) is a an internal index associated with a unique field position on the celestial sphere, where PTF fields are mostly non-overlapping. 24 CCD number is denoted by CCDID and runs from 0 to 11.  Table 2) of less than 0.04 mag. We note that the increase in scatter at the bright end is due to saturated stars. ∆[α a, f ] are the median and 1-σ width of the color and extinction coefficients for each CCD as listed in Table 3. We find that 59% (47%) of the R-band (g-band) PTF data were taken in such photometric nights.
The atmospheric extinction coefficients depend on the atmospheric conditions. Therefore, they may vary with season. Figure 10 shows the median R-band airmass coefficient (α a,R ) and the color term (α c,R ) as a function of month in the year. The error bars are given by the StD within each month divided by the square root of the number of photometric nights in each month. This figure indicates that there are small, but significant, seasonal variations in both the R-band extinction and color terms. Table 3 presents the median and 68th percentile range divided by 2, of the color-term, extinction-coefficient and airmass-color terms for each CCD and filter. These are cal- culated based on data from all nights in which the RMS of the best-fit residuals of bright stars is smaller than 0.04 mag and the limiting magnitude 25 is fainter than 20.5. We note that the R-band color terms are roughly the same for all CCDs, while the g-band color terms have a wider range. 8. COLOR TRANSFORMATIONS Approximate relations between the non-color-corrected PTF magnitude system and the SDSS magnitude system are given in Equations 4-5. The exact relations between the two systems depend on the details of the object's spectral energy distribution and the atmospheric conditions at the time of the observations. 25 The limiting magnitude is estimated based on the calibrated photometric parameters, the sky background and assuming a 3-σ detection limit. This property is stored in the image headers, as well as in the PTF database. FIG. 9.-The same as Figure 8 but for g-band. The bimodality is due to different blue-side spectral response of the various CCDs in the PTF camera (see Table 3). We note that most of the PTF data were taken in R-band. Using Equation 4 and the color transformations between the Johnson-Cousins (UBV R c I c ) system and the SDSS system 26 , we find an approximate transformation between PTF R-band magnitude and the Johnson-Cousins system: and similarly using Equation 5 we get for PTF g-band: Here T 1, f and T 2, f are the color-transformation coefficients for filter f . These parameters are listed in Table 3. Assuming 27 V = +0.03 and V − R c = R c − I c = 0, we find for the A0V star Vega:  NOTE. -The first column indicates the CCDID, where "All" represents all the CCDs. Parameters T 1 and T 2 for band f are defined in Equations 6-7. ∆ represents the 68th percentile range divided by 2, a robust measure of scatter in a parameter. and g Vega PTF ∼ = −0.08 + 0.25α c,g .
For the absolute magnitude of the Sun, assuming V = +4.82, V − R c = +0.36, R c − I c = +0.32 and using SDSS color transformations, we find: and g Sun PTF ∼ = 5.12 − 0.44α c,g .
9. CONCLUSION A wide variety of scientific applications require photometric calibration of astronomical images. In this paper, we provide a description of the current PTF photometric calibration process and products. We show that roughly half of the PTF data were taken under conditions that allow calibration of the images to an accuracy of 0.02-0.04 mag relative to SDSS. Most importantly, the rest of the data, taken under nonphotometric conditions, can be calibrated using data taken in photometric conditions. At the bright end (≈ 15 mag), the PTF photometric calibration is stable to a level of ≈ 0.02 mag. Future improvements to the PTF photometric calibration process that are important for the PTF type-Ia and IIp supernovae cosmology projects will be described elsewhere.
The PTF photometric calibration allows us to measure the calibrated magnitude of transients outside the SDSS footprint. We have used the PTF dataset to compile a photometric catalog. The first version of this catalog is described in Ofek et al. (in prep.). We note that our tests show that PTF data can deliver relative photometry, in single images, with precision as good as 3 mmag (e.g., van Eyken et al. 2011;Agüeros et al. 2011). This capability is being built into the PTF relative photometry pipeline and will be described in Levitan et al. (in prep.).
We thank Andrew Pickles and an anonymous referee for useful comments on the manuscript. This paper is based on observations obtained with the Samuel Oschin Telescope as part of the Palomar Transient Factory project, a scientific collaboration between the California Institute of Technology, Columbia University, Las Cumbres Observatory, the Lawrence Berkeley National Laboratory, the National Energy Research Scientific Computing Center, the University of Oxford, and the Weizmann Institute of Science. EOO is supported by an Einstein fellowship and NASA grants. SRK and his group are partially supported by the NSF grant AST-0507734. SBC acknowledges generous financial assistance from Gary & Cynthia Bengier, the Richard & Rhoda Goldman Fund, NASA/Swift grants NNX10AI21G and GO-7100028, the TABASGO Foundation, and NSF grant AST-0908886.