The Second Data Release of the Beijing-Arizona Sky Survey
Hu Zou Tianmeng Zhang Zhimin Zhou Xiyan Peng Jundan Nie Xu Zhou Xiaohui Fan Linhua Jiang Ian McGreer Arjun Dey Dongwei Fan Joseph R. Findlay Jinhua Gao Yizhou Gu Yucheng Guo Boliang He Junjie Jin Xu Kong Dustin Lang Fengjie Lei Michael Lesser Feng Li Jun Ma Xiaolei Meng Moe Maxwell Adam D. Myers Liming Rui David Schlegel Fengwu Sun Jiali Wang Qirong Yuan
astro-ph.IM astro-ph.GA





 

1Key Laboratory of Optical Astronomy, National Astronomical Observatories, Chinese Academy of Sciences, Beijing 100012, People's Republic of China; 
2College of Astronomy and Space Sciences, University of Chinese Academy of Sciences, Beijing 100049, People's Republic of China
3Steward Observatory, University of Arizona, Tucson, AZ 85721, USA
4Kavli Institute for Astronomy and Astrophysics, Peking University, Beijing 100871, People's Republic of China
5National Optical Astronomy Observatory, Tucson, AZ 85719, USA
6Department of Physics and Astronomy, University of Wyoming, Laramie, WY 82071, USA
7Department of Physics, Nanjing Normal University, WenYuan Road 1, Nanjing 210046, People's Republic of China
8Department of Astronomy, School of Physics, Peking University, Beijing 100871, People's Republic of China
9Key Laboratory for Research in Galaxies and Cosmology, Department of Astronomy, University of Science and Technology of China, Hefei 230026, People's Republic of China
10David Dunlap Institute, University of Toronto, Toronto, Canada
11Department of Physics and Tsinghua Center for Astrophysics, Tsinghua University, Beijing 100086, People's Republic of China
12Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 02138, USA
13Lawrence Berkeley National Labortatory, Berkeley, CA 94720, USA



 
This paper describes the second data release (DR2) of the Beijing–Arizona Sky Survey (BASS).  BASS is an imaging survey covering a 5400 deg^2 footprint in the g and r bands using the 2.3 m Bok telescope. DR2 includes the observations through 2017 July obtained by BASS and by the Mayall z-band Legacy Survey (MzLS), which used the 4 m Mayall telescope to observe the same footprint. BASS and MzLS have completed 72% and 76% of their observations. The two surveys will be served for the spectroscopic targeting of the upcoming Dark Energy Spectroscopic Instrument. Both BASS and MzLS data are reduced by the same pipeline. We have updated the basic data reduction and photometric calibrations in DR2. In particular, source detections are performed on stacked images, and photometric measurements are co-added from single-epoch images based on these sources. The median 5σ point-source depths after Galactic extinction corrections are 24.05, 23.61, and 23.10 mag for the g, r, and z bands, respectively. The DR2 data products include stacked images, co-added catalogs, and single-epoch images and catalogs. The BASS website (<http://batc.bao.ac.cn/BASS/>) provides detailed information and links to download the data.








§ INTRODUCTION

Large-scale spectroscopic surveys over the past 20 years have revolutionized our view of the universe from the structure of the Milk Way and galaxy evolution to large-scale structure and dark energy <cit.>. The Sloan Digital Sky Survey <cit.> began with spectroscopy on the brightest targets in its imaging data.  SDSS has since performed spectroscopy on progressively deeper targets, with SDSS-III/BOSS and SDSS-IV/eBOSS pushing to the faint limits of that imaging for the measurement of baryonic acoustic oscillations <cit.>. Deeper wide-field imaging data is required prior to the era of the Large Synoptic Survey Telescope <cit.> to select targets for upcoming wide-field spectroscopic surveys, such as the Dark Energy Spectroscopic Instrument <cit.> and Subaru Prime Focus Spectrograph <cit.>.

DESI is a next-generation dark energy experiment that will accurately measure the expansion rate and structure growth of the universe. It will obtain spectroscopic redshifts of about 34 million galaxies and quasars, which is one magnitude more than those of the SDSS <cit.>. In addition to cosmology, the DESI project will play an important role in shaping our understanding of the Milky Way and galaxy evolution by observing stars and low-redshift galaxies during bright time. 

The spectroscopic target selection for DESI will be based on three optical bands (g, r, and z) and two near-infrared bands (W1 and W2). The optical imaging surveys include three components: the Beijing–Arizona Sky Survey <cit.>, the Dark Energy Camera Legacy Survey <cit.>, and the Mayall z-band Legacy Survey <cit.>. DECaLS covers a 9000 deg^2 equatorial footprint using the Dark Energy Camera (DECam) on the 4 m Blanco telescope at CTIO. BASS and MzLS, using the Bok and Mayall Telescopes, respectively,  on Kitt Peak, are covering an adjacent 5000 deg^2 footprint in the north Galactic cap. All three optical surveys share a similar observing strategy. Dynamic exposure time calculators (ETCs) ensure their imaging depths will satisfy the requirement of the DESI spectroscopic target selection. The near-infrared images at wavelengths of 3.6 μm (W1) and 4.5 μm (W2) make use of the full-sky data from the Wide-field Infrared Survey Explorer mission <cit.> and the NEOWISE-Reactivation data <cit.>, coadded to their full depth <cit.>.



BASS is a g- and r-band imaging survey that uses the wide-field 90Prime camera mounted on the 2.3 m Bok telescope <cit.>. The observation started in 2015.  It mainly covered gray and dark nights from January to July of each year. BASS had its early data and first data releases (DR1) in 2015 December and 2017 January <cit.>.  DR1 only includes BASS data taken before 2016 July.  By 2017 July,  BASS has completed about 72% of the whole survey area. The MzLS covers the same area as BASS and have finished more than 76% of its observations by 2017 July. In this paper, we present the second BASS data release (DR2), which includes both BASS and MzLS data taken as of 2017 July. 

This paper describes the details of BASS DR2. The paper is organized as follows. Section <ref> presents basic information on the BASS and MzLS surveys and their observation status. Section <ref>  updates BASS data reduction. The source detection and photometry are described in Section <ref>. Section <ref> presents the data quality and provides comparisons with other photometric surveys.  Section <ref> describes data access and provides guidelines for users. Section <ref> is the summary. 



§ BASS AND MZLS SURVEYS
 


 §.§ Telescope and instruments

Table <ref> gives a summary of both the BASS and MzLS surveys. BASS uses the Bok telescope to image the northern part of the North Galactic cap with the optical g and r bands. The telescope is located on Kitt Peak near Tucson, Arizona. It is a 2.3 m telescope operated by Steward Observatory of University of Arizona. A wide-field camera, 90Prime, is mounted at the prime focus. It is composed of four 4k × 4k blue-sensitive CCDs, providing a feild of view (FoV) of 1.08×1.03. The CCD pixel scale is about 0.454. There are gaps between the CCDs and the filling factor is about 94%. 



MzLS uses the 4 m Mayall Telescope at Kitt Peak to image nearly the same area as BASS with the z band. The telescope is located at the highest peak of the mountain, close to the Bok telescope. Its mirror diameter is about 4 m and its clear aperture diameter is about 3.8 m. The survey uses the Mosaic-3 imager deployed at the prime focus. It is a new wide-field imaging camera installed in mid-2015, replacing the old Mosaic-2 instrument. There are four 4k×4k 500 μm thick deep-depletion CCDs, which significantly improved the z-band observing efficiency. The CCD pixel size is about 0.26. The camera FoV is about 36×36. Each CCD is read out through four amplifiers simultaneously. The readout time in the normal mode is about 30 s. The average gain and readout noise are 1.8 e/ADU and 9 e, respectively. The CCD quantum efficiency is optimized for red wavelengths, which can reach 85% at 900 nm. The dark current is 0.95 e/hr.  More information about Mosaic-3 can be found in the camera manual[<https://www.noao.edu/kpno/mosaic/manual/>]. 

In order to achieve homogeneous spectroscopic target selections for DESI, photometric systems of the imaging surveys should be as similar as possible. The DECaLS uses the DECam system, which is also used for the Dark Energy Survey <cit.>. The BASS g band is the existing SDSS g filter. It is very close to the DECam g band. The BASS r filter is newly purchased by the Lawrence Berkeley National Laboratory, which is almost the same as the DECam r band. The MzLS uses a newly purchased DECam z-band filter. Figure <ref> shows the filter responses of these three filters. The response is the total throughput,  including CCD quantum efficiency, filter transmission, and atmospheric extinction at the zenith, aluminum reflectivity of the prime mirror, and throughput of the optical corrector at the prime focus. The effective wavelengths for the BASS g and r and MzLS z bands are 4789, 6404, and 9210 Å, respectively (see Table <ref> for detailed filter parameters).  For comparison, DECam filter responses are also plotted in Figure <ref> and related parameters are presented in Table <ref>. The Galactic extinction coefficients are k_g =3.214, k_r =2.165, and k_z =1.211, which are adopted from the DECaLS webpage[<http://legacysurvey.org/dr5/description/#galactic-extinction>].









 §.§ Survey status

All DESI imaging surveys have similar observing strategies. Each survey tiles the sky in three passes or exposures. These three passes are dithered to fill CCD gaps. This is also benificial for detecting variable objects and allows zero-point determination with ubercalibration <cit.>. Pass 1 is observed in both photometric and good seeing conditions. Pass 2 is observed in either photometric or good seeing conditions. Pass 3 is observed in any other usable conditions. The seeing thresholds for BASS and MzLS are 1.7 and 1.3, respectively. Normally, g-band observation occur on dark nights, r-band observations occur on dark or gray nights, and z band observations occur on gray and bright nights. The ETC can adjust the exposure time for each pass in real time according to sky brightness, seeing, atmospheric transparency, and Galactic extinction. In this way, both surveys can maintain uniform imaging depths for different passes. 

BASS began its observation in 2015 January. The survey was awarded 55, 89, and 92 nights in the spring of 2015, 2016, and 2017, respectively. Since 2015, a number of updates have been implemented, such as instrument control software, telescope flexure maps, and observing tools, which greatly improved the pointing accuracy of the telescope, camera focusing, and observing efficiency. It was discovered that data taken in 2015 suffered from defective electronics in the read-out system, so these data were much noisier. Those electronics were replaced in 2015 September. The MzLS began regular observations in 2016 February. The imaging data suffered from variable crosstalk and pattern noise, which must specially treated. The MzLS has completed its scheduled with about 250 total observations. Figure <ref> presents the observation progress as of 2017 July. Some test regions (< 100 deg^2) located at Cosmic Evolution Survey (COSMOS) and SDSS Stripe 82 fields are not shown in this figure. The BASS has completed about 72% of its scheduled observations, while the MzLS has completed about 76%. With typical observational conditions, BASS is expected to finish all observations in 2018, with an additional 100 nights. The MzLS completed the remaining observations before the Mayall telescope was shut down in 2018 February. 





§ UPDATES ON DATA REDUCTION
 


 §.§ Image processing

The BASS and MzLS raw data are processed using the same pipeline. The basic corrections of overscan, bias, flat, and crosstalk effect are almost the same as those in BASS DR1. We make minor modifications when dealing with BASS data taken in 2015. The read-out mode was different in 2015. Bias frames were taken sequentially without flushing. Consequently, only the first bias frame can be used for bias subtraction. In addition, gain, readout noise, and crosstalk coefficients for each amplifier are calculated after the camera was remounted every summer. The identification of cosmic rays is also different in DR2. A Laplacian algorithm[<https://pypi.python.org/pypi/astroscrappy/1.0.3>] originating from <cit.> was used to detect cosmic rays.

The crosstalk effect in MzLS data is much more serious than that in BASS data. The maximum intra-CCD crosstalk coefficient in MzLS reaches up to 5.2%, while for BASS it is only about 0.3%. There is also serious pattern noise in MzLS caused by the electromagnetic interference during CCD reading out, which is demonstrated in the left panel of Figure <ref>. We apply a low-pass filter to reconstruct the noise pattern. First, a 5-order low-pass Butterworth digital filter is designed by using the “butter" program in a Python package  of SciPy [https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.butter.html]. Then, the low-pass filter is applied to the source-removed z-band image and a smoothed pattern is constructed as shown in the middle panel of Figure <ref>. Finally, the pattern is subtracted from the original image as shown in the right panel of this figure. 





 §.§ Astrometry

The Software for Calibrating AstroMetry and Photometry <cit.> is used for calculating astrometric solutions. In DR1, the SDSS and Two Micron All Sky Survey <cit.> point-source catalogs were used as the reference catalogs. However, the Gaia <cit.> catalog is adopted in DR2. The first data release of Gaia <cit.> was published in 2016 September. It provides accurate astrometric measurements for objects in the G band down to 20.5 mag over the entire sky. There are some images (about 1.5%) with faulty astrometry due to sparse sources in Gaia catalogs, the 2MASS catalog is used to derive astrometric solutions for these. 

Figure <ref> gives a comparison of the astrometric accuracy when using different reference catalogs. The astrometric accuracy is much improved when using the Gaia DR1 catalog as the reference. The median errors in R. A. and decl. are both about 28 mas. By contrast,  if the SDSS catalog is used, the median errors in R. A. and decl. are about 93 mas. 







 §.§ Zero-point calculation

As in DR1, the DR2 still uses Pan-STARRS1 data <cit.> to derive photometric solutions.  A large aperture diameter of 26 pixels is used for counting source fluxes. The aperture is equivalent to about 11.9 for BASS and 6.8 for MzLS (i.e. about 7 times the seeing FWHM). Point sources with S/N larger than 10 are selected and then matched to the PS1 catalogs with a cross-matching radius of 2. The PS1 magnitudes are transformed to the BASS and MzLS photometric systems using the following equations:

These color terms are valid for stars with 0.4 < g-i < 2.7. The constant terms are kept to ensure no systematic offsets between BASS/MzLS and PS1. The zero-point of a CCD image is calculated as the error-weighted difference between instrumental aperture magnitudes and transformed PS1 PSF magnitudes with outliers removed. 


In addition to the zero-point obtained with the external catalogs discussed above, we can also calculate an internal zero-point by using objects located in overlaps of different exposures.  We have three passes for each field.  Each pass has sufficiently large position offsets.  For a specified image, an internal zero-point offset is calculated by comparing magnitudes of common objects in adjacent images. This offset is derived iteratively until its change is less than 0.001. We require that there are at least 50 stars to calculate the offset and the maximum number of iterations is 20. Normally, the computations for most images are converged after 10 steps.  Figure <ref> shows the distributions of the zero-point offsets for different filters. The dispersions are 0.005, 0.008 and 0.01 for g, r, and z bands, respectively. Figure <ref> gives an example of the performance of zero-point correction in one specially selected g-band image. This image is out of the PS1 coverage, so we use the Fourth US Naval Observatory CCD Astrograph Catalog to calculate a crude external zero-point.  The histograms in this figure show the distributions of magnitude differences of common objects in multiple exposures before and after zero-point corrections are applied.  We can see that after applying the corrections, both offset and scatter decrease. In practice, the internal zero point is used in DR2 only if the number of common stars are larger than 100 and its RMS error is less than 0.1. Otherwise the external zero-point is used.  







§ PHOTOMETRY
 
There are significant changes in source detection and photometry between DR1 and DR2. In DR1,  the source detection and corresponding photometry are performed on single-epoch images. However, we detect sources in stacked images in order to improve the detection efficiency in DR2. The DR2 photometry occurs in single-epoch images based on the positions of those sources.



 §.§ Image stacking and source detection
 
As described in <cit.>, the full sky is equally divided into 96,775 blocks. These blocks are evenly spaced in decl.. Each block has an area of 0.681×0.681 deg^2, equal to an image size of 5400 × 5400 with a pixel scale of 0.454. There are overlaps of 0.02 in both R.A. and decl. between adjacent blocks. The stacked image is generated with a simple tangent-plane projection around the block center.

We create four stacked images: three images for the g, r, and z bands and one composite from these three stacks. The composite image is combined from g, r, and z-band stacked images with flux scales of 0.65, 1.0, and 1.5, respectively, which makes the g - r and r - z colors of F/G type stars close to zero. These flux scales are also used for generating color pictures. For a specified band and block, we collect single-epoch images that are connected to the block. These images are resampled and reprojected by Swarp [<http://www.astromatic.net/software/swarp>] and then combined by median to form a stacked image and corresponding weight image <cit.>. The sky background map for each single-exposure image is estimated by using a mesh with a grid size of 410 pixels and masking large objects from the Third Reference Catalog of bright galaxies (RC3) and New General Catalog (NGC). The flux of each single-epoch image is scaled to make the stack image have a photometric zero-point of 30 (i.e. magnitude is calculated as m = -2.5log_10 F + 30). The single-epoch images used for stacking should satisfy the following conditions: (a) exposure time > 30 s; (b) seeing < 3.5 for BASS and < 2.5 for MzLS; (c) zero-point RMS error < 0.2; (d) number of stars used for calculating the zero-point > 50; (e) astrometric RMS error in both R.A. and decl. < 0.5; (f) 5σ depths are at most 1.5 mag shallower than the required one; (g) sky ADU < 15,000 for BASS and < 25,000 for MzLS; (h) transparency > 0.5. Here the transparency is related to the level of atmospheric extinction. It is defined as 10^0.4(zp_0-zp), where zp is the zero-point of an image corrected with airmass and zp_0 is the typical zenith zero point on clear nights. Figure <ref> gives examples of a g-band stacked image, its weight map, and corresponding color image composed of three-band stacked images. 



Source detections are performed first on the composite image and then separately on g-, r-, and z-band stacked images by SExtractor <cit.>. Objects are kept only if they are detected at least twice in those four images. In this way, a majority of fake sources with brightnesses close to the detecting threshold in each stacked image can be filtered out. Table <ref> lists some key configuration parameters that significantly impact our detection and deblending. We chose a relative small threshold, minimum number of connected pixels, and convolution kernel so as to detect as many objects as possible for a single band. In addition, the minimum contrast parameter of “DEBLEND_MINCONST" is set to 0.001, which is determined as a compromise. A higher value will lead to more fragments of a large object and more fake sources within this object, while a lower value will give fewer fragments.

Figure <ref> shows Kron elliptical apertures (see Section <ref>) of final detected sources on composite images. From the left and middle panels of this figure, we can see that the deblending algorithm is suitable for small and medium-sized galaxies (typical size of about 1 arcmin). For larger extended galaxies, the deblending method may not be appropriate due to bright foreground stars and substructures hesitated in these galaxies. We also notice that there are still some fake sources surrounding large bright stars or galaxies that are detected due to large noise fluctuation. As checked with external deep catalogs from COSMOS and DEEP2[<http://deep.ps.uci.edu/DR4/photoprimer.html>], about 8% of objects might be spurious. Most of these objects are located around bright stars and large galaxies. A few of them are probably CCD artifacts such as cosmic rays (especially in the z band), which are not well identified by the imaging pipeline or not effectively removed due to a lack of enough exposure numbers.









 §.§ Methods of photometry
 
We have developed a new Python-based package for photometry (H. Zou et al. in preparation). It can be used for more general purposes, but at present it is just applied to BASS DR2. The current code can make accurate measurements of circular aperture, elliptical aperture, and PSF magnitudes at specific positions. However, model measurements with galaxy profiles, such as deVauculeurs, exponential profiles, and composite profiles, are still in development.  We describe a few key features below. 



  §.§.§ Segmentation and shape measurements

Different kinds of magnitude measurements are performed on a single-epoch image for objects detected on stacked images. These objects are first projected onto the image. A watershed segmentation algorithm [<http://scikit-image.org/docs/dev/auto_examples/segmentation/plot_watershed.html>] is then adopted to separate signal pixels belonging to each object. The signal pixels are identified with a detecting threshold at 1σ above the sky background after the image is smoothed with a Gaussian kernel of σ = 1.5 pixels. The global sky background and its RMS map are calculated in mesh grids. Based on the segmentation of each object, we calculate the centroid, shape parameters, and refined center using a Gaussian-kernel window. The shape parameters describe the shape of an object as an ellipse, including semi-major (A) and semi-minor (B) axis lengths and position angle (PA). They are also called as 1σ elliptical parameters. 



  §.§.§ Circular aperture photometry

We adopt 12 apertures for circular aperture photometry with radii ranging from 3 to 40 pixels. These aperture sizes are the same as those used in the South Galactic Cap u-band Sky Survey, which utilized the Bok telescope and the 90Prime camera to perform a u-band imaging survey <cit.>. Table <ref> shows the aperture radii in both pixels and arcseconds.




  §.§.§ Isophotal and Kron elliptical aperture photometry
 
Isophotal magnitudes are derived by simply integrating pixel fluxes within segments. For better magnitude measurements of galaxies, we estimate an appropriate elliptical aperture for each object. The elliptical aperture should enclose most flux. We use the “Kron aperture", which was introduced in <cit.>. The Kron aperture size is described by the Kron radius. This radius is determined in a similar way as in SExtractor.  First, a characteristic radius r_1 is calculated as the first-order moment within an large ellipse, whose size is 6 times the 1σ ellipse: r_1 = ∑rF(r)/∑F(r), where r is the elliptical distance of a pixel to the center and F(r) is the corresponding flux in this pixel. We set the Kron radius r_k to be 2.5r_1. The Kron aperture magnitudes are measured by integrating the fluxes of pixels within the Kron ellipse. The major and minor axis lengths of the Kron ellipse are computed as r_k√(e) and r_k/√(e), respectively, where e is the elongation. To avoid extremely small and large apertures, we set lower and upper limits of the Kron radius to be 3r_0 and 10r_0, where r_0 = √(AB). It is shown that more than 94% of the light for galaxies is located in the Kron ellipse, almost independent of their magnitudes. For both circular and Kron aperture photometry, special handling is done for objects contaminated by nearby sources in order to improve the photometric accuracy. In the aperture, the pixels occupied by nearby objects are filled by mirroring the opposite pixels relative to the object center. In addition, each pixel is divided into 5×5 sub-pixels to more accurately count the fluxes of pixels at the boundary of the aperture.



  §.§.§ PSF photometry

PSF magnitudes are measured with the PSF model derived by PSFEx <cit.>. PSFEx models the PSF as a linear combination of basis vectors. The pixel basis and automatic sampling step are selected in this software. We use a third-degree polynomial to model the position-dependent variation of the PSF. The PSF size is 45×45 for both BASS and MzLS, which is about 12 times the seeing FWHM. Table <ref> lists some key input parameters in PSFEx. When fitting with the PSF model using our code, the pixels belonging to the segment of each object are used. If objects are not isolated, i.e. their segments are connected to each other, they are fitted simultaneously. We use k-means clustering to iteratively group objects. First, two groups are generated by the k-means clustering algorithm. Then the members in each group are divided into two subgroups using the same algorithm. All groups are divided in this way until the number of members in each group is not larger than three. Finally, all groups are ranked by their brightest members, and the PSF magnitudes in each group are measured simultaneously.





 §.§ Co-adding measurements

Based on the detections on stacked images, we perform circular aperture, isophotal, Kron elliptical aperture, and PSF flux measurements on single-epoch images. As described in our DR1 paper <cit.>, the coordinates of objects are corrected with astrometric residuals, which mainly origin from poor charge transfer efficiencies of detectors. The amount of corrections is about a few percent of an arcsecond. All magnitudes are aperture-corrected with growth curves produced by circular aperture photometry. In addition, magnitudes are corrected with photometric residuals, which are mainly caused by the focal distortion, improper flat-fielding, and scattered light. These astrometric and photometric residuals are obtained by comparing the coordinates and magnitudes with those in the Gaia DR1 and PS1 catalogs, respectively. 

The parameters measured in single-epoch images are merged to generate co-added catalogs. For each object, we take weighted averages of the refined centers, shape parameters, and fluxes (equivalently magnitudes). Here, the weight is the inverse variance (w=1/σ^2). Thus, the errors of these averages come from errors of single-epoch measurements, which are computed as 1/√(Σ w_i), where w_i is the weight. We also calculate the parameter standard error, which is rms of multiple parameter measurements divided by the square root of the number of measurements. The standard error including all possible error sources is a more realistic error estimation. Particularly, a large magnitude standard error for a variable star indicates light variation. The effective seeing and sky background, number of exposures, and average, minimum, and maximum of the Julian day when observations were taken, are recorded in the catalogs.



§ DATA ANALYSES AND COMPARISONS
 


 §.§ Data quality of single-epoch images

The ETC ensures our imaging depths to meet the requirements, although the observing strategy entails different passes being observed under different weather conditions. Table <ref> presents median observational and imaging parameters for different filters. The z-band seeing is the best. The depth is estimated as the median PSF magnitude at the error of about 0.21 mag (5σ). The single-epoch depths are 23.3, 23.1, and 22.6 mag for the g, r, and z bands, respectively. We also have checked that the depths for different passes of the same filter are quite similar owing to the ETC. 
     



 §.§ Co-added Depths

The depth requirements for DESI are 23.91, 23.47, and 22.60 mag for the g, r, and z bands, respectively, which are defined by 5σ extended sources with a correction of Galactic extinction and converted to our photometric systems with color terms as shown in Equation (<ref>). The Galactic reddening map comes from <cit.>. We estimate the 5σ depths by using co-added PSF magnitude errors. Figure <ref> shows the depth distributions of all blocks with exposure numbers equal to 3. They are so-called “full depth," with three complete passes. The g-band distribution has a fatter tail at the bright end. Because of this we include the data taken in 2015. These data were shallower due to the imperfect ETC and problematic due to bad A/D converters. The low bits of ADU integers were lost. This seriously affects the photometry of faint sources. This issue mostly affects the g-band images. Some of the affected areas have been re-observed in recent years and will be totally covered in future observations. Table <ref> lists the median depths and fractions of objects for different exposure numbers. The median 5σ depths for the g, r, and z bands are 24.05, 23.61, and 23.10 mag, respectively. Most of the area covered by the g band has more than 3 exposures due to duplicate observations from 2015. 


Figure <ref> shows the number counts of objects in the g, r and z bands in the regions of DEEP2 fields. The Kron magnitude is adopted here, which is a good brightness measurement for both stars and galaxies. The DEEP2 photometric data were taken with the CFH12K camera on the 3.6 m Canada-France-Hawaii Telescope and cover about 5 deg^2 over the sky, with completeness limits of B = 25.25, R = 24.75, and I = 24.25 mag <cit.>. We overplot the R-band number count in Figure <ref> after the R-band magnitude is converted to BASS r using a color term based on B-R. In general, the BASS and MzLS completeness limits reach or exceed the nominal DESI depths and the r-band magnitude distribution matches well with the DEEP2 R-band distribution. About 2% of objects have BASS r-band exposure numbers less than 3, so corresponding magnitude limits are about 0.3–0.6 mag shallower. This causes a slightly lower number count at r ∼ 22. In addition, different photometric systems and photometric methods between BASS and DEEP2 might also affect the discrepancy of the magnitude distribution. The co-added depths are 1.5–2.5 mag deeper than the SDSS imaging. For a visual comparison, we demonstrate the imaging data around a group of galaxies from both BASS/MzLS and SDSS in Figure <ref>. There are many more fainter objects that can be seen in BASS/MzLS images. The SDSS z-band is much shallower, leading to a much noisier background. 












 §.§ Photometric comparisons

The DECaLS has released its DR5 in 2017 June. Its typical depths with three exposures are 24.7, 23.6 and 22.8 mag for the g, r, and z bands, respectively. The g-band and r-band depths are a little deeper than those of BASS DR2, while the z band is somewhat shallower. There are some overlaps between DECaLS and BASS observations. These two surveys almost cover the whole SDSS footprint, but they are 1.5–2.5 mag deeper. We show some photometric comparisons of the three surveys with the data in the overlapping area. Figure <ref> shows the magnitude difference as function of magnitude for point sources, which are randomly selected based on the morphological type in DECaLS DR5. The DECaLS and SDSS data are both transformed to the BASS/MzLS photometric systems using different color terms. The photometric scatters of point sources brighter than 20 mag between DECaLS and BASS are about half of those between SDSS and BASS. We also compare the color-color diagrams of three surveys with the same dataset (r < 23 mag), as shown in the upper panels of Figure <ref>. The color distributions of g - r at r - z ∼ 1.6 and  r - z at g - r ∼ 0.7 are also shown in the middle and bottom panels of Figure <ref>. The standard deviations of the color distributions are annotated in each panel. From these plots, we can see that BASS DR2 is as good as DECaLS DR5, and it is obviously better than the SDSS data. 







§ DATA ACCESS AND GUIDELINES FOR DR2
  


 §.§ Data Access

Information about the surveys, such as the telescopes, instruments, and observations, can be retrieved on the public data release website[<http://batc.bao.ac.cn/BASS/doku.php?id=datarelease:>]. The data cover the observations between 2015 January and 2017 July. There are 297,367 calibrated single-epoch CCD images. Those images with zero-point calibrations have corresponding catalogs. There are 13,419 blocks in total that have stacked images. For each block, there are three stacked images for the g, r, and z bands and one co-added catalog. The summary files for single-epoch images and blocks can be found on the webpage[<http://batc.bao.ac.cn/BASS/doku.php?id=datarelease:dr2:home#data_access>]. Figure <ref> shows the sky coverage of the DR2 catalogs. In addition to the regular survey area as shown in a green envelope, there are some test regions (e.g. COSMOS and Stripe 82) and scattered regions with observations shared with BASS by other observers.
 

Access to DR2 data is provided by the Chinese Virtual Observatory. Select data can be acquired from the following links.

   
  * DR2 release webpage: <http://batc.bao.ac.cn/BASS/doku.php?id=datarelease:dr2:>
   
  * To search for single-epoch image and catalog files: <http://explore.china-vo.org/data/bassdr2images/f>
   
  * To search for stacked image and co-added catalog files: <http://explore.china-vo.org/data/bassdr2stack/f>
   
  * To search for sources in co-added catalogs: <http://explore.china-vo.org/data/bassdr2coadd/f>
   
  * To generate “wget" scripts for downloading files: <http://batc.bao.ac.cn/BASS/doku.php?id=datarelease:dr2:dr2_wgetbulk:>
   
  * Sky viewer for visualizing the data: <http://batc.bao.ac.cn/BASS/doku.php?id=datarelease:dr2:dr2skyviewer:>

The sky viewer is based on Aladin HiPS [<http://aladin.u-strasbg.fr/hips/>].



 §.§ A few guidelines for using the data



  §.§.§ Images

The calibrated single-epoch images have astrometric and photometric solutions stored in the FITS header. The flux units in the images are e/s. For each image, we have corresponding weight and flag images. The flag image tags the problematic pixels, the same as in DR1. We summerize useful parameters for single-epoch images in a FITS table [<http://batc.bao.ac.cn/BASS/lib/exe/fetch.php?media=datarelease:dr2:bassmzls-dr2-ccdinfo.fits>] and the user can find the column description on the wiki page[<http://batc.bao.ac.cn/BASS/doku.php?id=datarelease:dr2:dr2_ccdinfo:home>]. The single-epoch images with the column “imq" =  1 are used for generating stacked images and co-added catalogs. There are several columns, as shown in Table <ref>, that denote astrometry qualities and zero-point. The “astr_ref" have two options: GAIA-DR1 and 2MASS. Usually, the astrometric accuracy obtained from using 2MASS as the reference catalog is worse than that using the Gaia catalog. The internal and external zero-points are combined as “zp", which is used in our photometry. The magnitude can be calculated as m = -2.5log_10F + zp, where F is the integrated flux of an object. Note that the single-epoch images have both astrometric and photometric residuals even though we can correct them in the catalogs. If the user wants higher accuracies for the astrometry and photometry from images, one should apply the residual maps to the coordinates and magnitudes[<http://batc.bao.ac.cn/online-data/BASS/dr2-residual-maps>]. The astrometric correction can be as much as 0.04 for both BASS and MzLS. The photometric correction can be as much as 0.02 and 0.05 mag for BASS and MzLS, respectively.  


The stacked images cannot be used for accurate photometric measurements because they are combined from many single-epoch images with different qualities. Each stacked image has a weight image. We adopt standard WCS parameters with a simple “TAN" projection. The zero-points are fixed to 30. 



  §.§.§ Catalogs

The co-added catalogs provide the deepest and most accurate magnitude measurements for objects with multiple exposures. A co-added catalog covers an area of about 0.68×0.68 deg^2 with an 0.02 overlap with other neighboring blocks. For each source in the catalog, we provide the minimums, maximums, and averages of modified Julian date, seeing in FWHM, sky brightness, and zero-point from single-epoch observations, and provide the total exposure time and number of exposures in each band. The catalogs include Galactic reddening from the map of <cit.>, some measurements from stacked images derived by SExtractor, such as shape parameters and star/galaxy classification (marked with a postfix “_Stack"), and “Mag_Auto" magnitudes for three bands. These measurements are only recorded and much less accurate. The other measurements in the catalogs are obtained by co-adding parameters from single-epoch images by our own photometric code. For each band, there are coordinates, shape parameters (e.g. half major/minor axis length, ellipticity, PA and Kron radius), all kinds of fluxes and magnitudes, and flags. For the magnitude error, we provide both normal parameter error and standard error. The standard error is related to the magnitude rms of multiple observations. It contains information of light variation, which can be useful for variable objects. Shape parameters are directly computed from the images. They are not intrinsic due to the seeing effect. The single-epoch catalogs contains the measurements for objects detected on stacked images. The object ID is unique in the co-added catalogs, while objects in single-epoch catalogs use the same ID. This means that the ID in single-epoch catalogs can be duplicated for objects with multiple observations. All fluxes in the catalogs are in nanomaggy, where magnitudes can be calculated as -2.5log_10F + 22.5. We recommend the PSF magnitude for point sources and Kron magnitudes for extended sources. For very large galaxies with apparent diameters larger than about 1, they might be fragmented due to foreground stars and their substructures, which might mean the photometry might not be reliable. 

For star/galaxy separation, the column “Type_Stack" gives a median of class parameters from stacked images derived by SExtractor. We can also identify point sources from the reduced χ^2 of PSF fitting. The reduced χ^2 can be computed as the ratio of “Chi2_PSF" and “DOF_PSF" columns in the catalogs. If it is close to 1, the object is likely to be a point-like source. In addition, the ellipticity, color, and magnitude difference between PSF and Kron magnitudes can be also useful for classification. The user can even combine all these parameters to separate objects. We expect a classification to be added in the next data release. 



§ SUMMARY
  
The BASS made its first data release be public in 2017 January. It only includes the BASS g-band and r-band observations taken before 2016 July.  This paper describes the details of our second data release, which include new datasets and updates to the data reduction. We summarize these updates as follows:



  * The DR2 includes the data taken as of 2017 July. This release includes the MzLS data. The BASS and MzLS have respectively completed about 72% and 76% of their observations over the footprint of over 5000 deg^2. 

  * BASS and MzLS data are reduced by the same pipeline, which includes some updates from DR1, such as bias correction of 2015 BASS data, identification of cosmic rays, crosstalk correction, and subtraction of pattern noise in MzLS images.

  * Gaia DR1 catalogs are utilized to derive astrometric solutions. The global astrometric error is about 0.03. This is much better than DR1, where SDSS DR9 was used as the reference catalog. 

  * External photometric zero-points are calculated using point-source catalogs of PS1, the same as in DR1. To improve the accuracy of flux calibrations, internal zero-points are computed by comparing the magnitude differences of common objects in different exposures. 

  * Source detection is implemented in stacked images and photometry is made in single-epoch images. We provide circular aperture, Isophotal, Kron elliptical aperture, and PSF magnitudes. The median depths over the whole coverage are 24.05, 23.61, and 23.10 mag for the g, r, and z bands, respectively. 

  * The DR2 data products include calibrated single-epoch images, single-epoch catalogs, stacked images, and co-added catalogs. They can be accessed through links in the BASS data release webpage (<http://batc.bao.ac.cn/BASS/doku.php?id=datarelease:dr2:>).


The MzLS finished its observations in February of 2018 and the BASS will complete the observations in of 2019 January. The next data release (DR3) is expected to include all BASS and MzLS survey data. Furthermore, we will have some new features in DR3, such as astrometry by Gaia DR2, a new source detecting algorithm, a star-galaxy separation, a flag to mark objects close to bright stars and large galaxies, new PSF modeling, and Galactic extinction from Planck dust map.

We thank the anonymous referee for providing a rapid and thoughtful comments that improve our paper greatly. The BASS is a collaborative program between the National Astronomical Observatories of the Chinese Academy of Science and Steward Observatory of the University of Arizona. It is a key project of the Telescope Access Program (TAP), which has been funded by the National Astronomical Observatories of China, the Chinese Academy of Sciences (the Strategic Priority Research Program “The Emergence of Cosmological Structures" Grant No. XDB09000000), and the Special Fund for Astronomy from the Ministry of Finance. The BASS is also supported by the External Cooperation Program of Chinese Academy of Sciences (grant No. 114A11KYSB20160057) and the Chinese National Natural Science Foundation (grant No. 11433005). The BASS data release is based on the Chinese Virtual Observatory (China-VO).

This work is also supported by the Young Researcher Grant of National Astronomical Observatories, Chinese, Academy of Sciences, the Chinese National Natural Science Foundation (grants No. 11673027, 11733007, 11603034, 11503051, U1531115, and U1731243), and the National Basic Research Program of China (973 Program; Grants No. 2015CB857004, 2014CB845704, 2014CB845702, and 2013CB834902). L.J. acknowledges support from the National Key R&D Program of China (2016YFA0400703) and from the Chinese National Science Foundation (grant No. 11533001). A.D.M. and J.R.F. were supported by the Director, Office of Science, Office of High Energy Physics of the U.S. Department of Energy under Contract No. DE-AC02-05CH1123.

The Pan-STARRS1 Surveys (PS1) and the PS1 public science archive have been made possible through contributions by the Institute for Astronomy, the University of Hawaii, the Pan-STARRS Project Office, the Max-Planck Society and its participating institutes, the Max Planck Institute for Astronomy, Heidelberg and the Max Planck Institute for Extraterrestrial Physics, Garching, The Johns Hopkins University, Durham University, the University of Edinburgh, the Queen's University Belfast, the Harvard-Smithsonian Center for Astrophysics, the Las Cumbres Observatory Global Telescope Network Incorporated, the National Central University of Taiwan, the Space Telescope Science Institute, the National Aeronautics and Space Administration under grant No. NNX08AR22G issued through the Planetary Science Division of the NASA Science Mission Directorate, the National Science Foundation Grant No. AST-1238877, the University of Maryland, Eotvos Lorand University (ELTE), the Los Alamos National Laboratory, and the Gordon and Betty Moore Foundation.

This work has made use of data from the European Space Agency (ESA) mission Gaia (<https://www.cosmos.esa.int/gaia>), processed by the Gaia Data Processing and Analysis Consortium (DPAC, <https://www.cosmos.esa.int/web/gaia/dpac/consortium>). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the Gaia Multilateral Agreement.

This publication makes use of data products from the Two Micron All Sky Survey, which is a joint project of the University of Massachusetts and the Infrared Processing and Analysis Center/California Institute of Technology, funded by the National Aeronautics and Space Administration and the National Science Foundation.

SDSS-III is managed by the Astrophysical Research Consortium for the Participating Institutions of the SDSS-III Collaboration including the University of Arizona, the Brazilian Participation Group, Brookhaven National Laboratory, Carnegie Mellon University, University of Florida, the French Participation Group, the German Participation Group, Harvard University, the Instituto de Astrofisica de Canarias, the Michigan State/Notre Dame/JINA Participation Group, Johns Hopkins University, Lawrence Berkeley National Laboratory, Max Planck Institute for Astrophysics, Max Planck Institute for Extraterrestrial Physics, New Mexico State University, New York University, Ohio State University, Pennsylvania State University, University of Portsmouth, Princeton University, the Spanish Participation Group, University of Tokyo, University of Utah, Vanderbilt University, University of Virginia, University of Washington, and Yale University.
 
[Bertin & Arnouts(1996)]ber96 Bertin, E., & Arnouts, S. 1996, , 117, 393
[Bertin(2006)]ber06 Bertin, E. 2006, Astronomical Data Analysis Software and Systems XV, 351, 112 
[Bertin(2011)]ber11 Bertin, E. 2011, Astronomical Data Analysis Software and Systems XX, 442, 435 
[Bertin et al.(2002)]ber02 Bertin, E., Mellier, Y., Radovich, M., et al. 2002, Astronomical Data Analysis Software and Systems XI, 281, 228 
[Blum et al.(2016)]blu16 Blum, R. D., Burleigh, K., Dey, A., et al. 2016, American Astronomical Society Meeting Abstracts, 228, 317.01
[Chambers et al.(2016)]cha16 Chambers, K. C., Magnier, E. A., Metcalfe, N., et al. 2016, arXiv:1612.05560 
[Coil et al.(2004)]coi04 Coil, A. L., Newman, J. A., Kaiser, N., et al. 2004, , 617, 765 
[Colless et al.(2001)]col01 Colless, M., Dalton, G., Maddox, S., et al. 2001, , 328, 1039
[Dawson et al.(2013)]daw13 Dawson, K. S., Schlegel, D. J., Ahn, C. P., et al. 2013, , 145, 10 
[Dawson et al.(2016)]daw16 Dawson, K. S., Kneib, J.-P., Percival, W. J., et al. 2016, , 151, 44
[DESI Collaboration et al.(2016)]des16 DESI Collaboration, Aghamousa, A., Aguilar, J., et al. 2016, arXiv:1611.00036
[Doi et al.(2010)]doi10 Doi, M., Tanaka, M., Fukugita, M., et al. 2010, , 139, 1628 
[Gaia Collaboration et al.(2016)]gai16a Gaia Collaboration, Brown, A. G. A., Vallenari, A., et al. 2016a, , 595, A2 
[Gaia Collaboration et al.(2016)]gai16b Gaia Collaboration, Prusti, T., de Bruijne, J. H. J., et al. 2016b, , 595, A1 
[Kron(1980)]kro80 Kron, R. G. 1980, , 43, 305 

[Liske et al.(2015)]lis15 Liske, J., Baldry, I. K., Driver, S. P., et al. 2015, , 452, 208
[LSST Science Collaboration et al.(2009)]lss09 LSST Science Collaboration, Abell, P. A., Allison, J., et al. 2009, arXiv:0912.0201 
[Mainzer et al.(2014)]mai14 Mainzer, A., Bauer, J., Cutri, R., et al. 2014, , 792, 30
[Meisner, Lang & Schlegel(2017)]mei17 Meisner, A.M., Lang, D., & Schlegel, D.J. 2017, , 153, 38
[Meisner, Lang & Schlegel(2018)]mei18 Meisner, A.M., Lang, D., & Schlegel, D.J. 2018, RNAAS, 2, 1
[Newman et al.(2013)]new13 Newman, J. A., Cooper, M. C., Davis, M., et al. 2013, , 208, 5 
[Sánchez et al.(2012)]san12 Sánchez, S. F., Kennicutt, R. C., Gil de Paz, A., et al. 2012, , 538, A8  
[Schlegel et al.(1998)]sch98 Schlegel, D. J., Finkbeiner, D. P., & Davis, M. 1998, , 500, 525
[Scoville et al.(2007)]sco07 Scoville, N., Aussel, H., Brusa, M., et al. 2007, , 172, 1
[Silva et al.(2016)]sil16 Silva, D. R., Blum, R. D., Allen, L., et al. 2016, American Astronomical Society Meeting Abstracts, 228, 317.02
[Skrutskie et al.(2006)]skr06 Skrutskie, M. F., Cutri, R. M., Stiening, R., et al. 2006, , 131, 1163  
[Takada et al.(2014)]tak14 Takada, M., Ellis, R. S., Chiba, M., et al. 2014, , 66, R1 
[The Dark Energy Survey Collaboration(2005)]des05 The Dark Energy Survey Collaboration 2005, arXiv:astro-ph/0510346
[van Dokkum(2001)]van01 van Dokkum, P. G. 2001, , 113, 1420
[Williams et al.(2004)]wil04 Williams, G., Olszewski, E., Lesser, M., & Burge, J. 2004, SPIE, 5492, 787
[Wright et al.(2010)]wri10 Wright, E. L., Eisenhardt, P. R. M., Mainzer, A. K., et al. 2010, , 140, 1868-1881 
[York et al.(2000)]yor00 York, D. G., Adelman, J., Anderson, J. E., Jr., et al. 2000, , 120, 1579  
[Zhao et al.(2012)]zha12 Zhao, G., Zhao, Y.-H., Chu, Y.-Q., Jing, Y.-P., & Deng, L.-C. 2012, Research in Astronomy and Astrophysics, 12, 723 
[Zhou et al.(2016)]zho16 Zhou, X., Fan, X.-H., Fan, Z., et al. 2016, Research in Astronomy and Astrophysics, 16, 69 
[Zou et al.(2015)]zou15 Zou, H., Jiang, Z.-J., Zhou, X., et al. 2015, , 150, 104 
[Zou et al.(2016)]zou16 Zou, H., Zhou, X., Jiang, Z., et al. 2016, , 151, 37
[Zou et al.(2017a)]zou17a Zou, H., Zhang, T., Zhou, Z., et al. 2017, , 153, 276 
[Zou et al.(2017b)]zou17b Zou, H., Zhou, X., Fan, X., et al. 2017, , 129, 064101 










