- Timestamp:
- Jan 6, 2017, 11:15:00 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20160809/doc/release.2015/ps1.detrend/detrend.tex
r39618 r39920 1 1 \documentclass[12pt,preprint]{aastex} 2 2 %\documentclass[iop,floatfix]{emulateapj} 3 3 4 %\pdfoutput=14 \pdfoutput=1 5 5 6 6 % see latex.readme.txt for notes on using the PS1 template 7 \documentclass[12pt,preprint]{aastex} 7 8 8 %\documentclass[manuscript]{aastex} 9 9 %\documentclass[preprint2]{aastex} 10 10 %\documentclass[preprint2,longabstract]{aastex} 11 11 12 \RequirePackage{color} 12 13 \input{astro.sty} 13 14 %\usepackage{subcaption} 15 %\usepackage{natbib} 14 16 15 17 % online version may use color, but print version needs b/w … … 33 35 } 34 36 \newcommand{\erfcinv}{\mathop{\rm erfcinv}\nolimits} 35 \newcommand{\ippprog}[1]{\textbf{\texttt{#1}}} 36 \newcommand{\ippstage}[1]{\textsc{#1}} 37 % CZW Moved to global input file. 38 %\newcommand{\ippprog}[1]{\textbf{\texttt{#1}}} 39 %\newcommand{\ippstage}[1]{\textsc{#1}} 37 40 \newcommand{\asinh}{\mathop{\rm asinh}\nolimits} 38 39 41 40 42 % Pick a terse version of the title here; … … 49 51 % list and (2) re-order the list at the bottom (and comment-out as needed) 50 52 \def\IfA{1} 51 \def\CfA{2} 52 \def\MPIA{3} 53 \def\Princeton{3} 54 \def\USNO{4} 55 \def\JHU{1} 53 \def\Princeton{2} 54 \def\DUR{3} 55 \def\STSCI{4} 56 \def\Pitt{5} 57 %\def\CfA{2} 58 %\def\MPIA{3} 59 %\def\USNO{4} 60 %\def\JHU{1} 56 61 57 62 % This example has a first author from UH: 58 63 \author{ 59 C. Z. Waters,\altaffilmark{\IfA} 60 IPP Team, 64 C.~Z. Waters,\altaffilmark{\IfA} 65 E.~A. Magnier,\altaffilmark{\IfA} 66 P.~A. Price,\altaffilmark{\Princeton} 67 K.~C. Chambers,\altaffilmark{\IfA} 68 W.~S. Burgett,\altaffilmark{\IfA} 69 P. Draper,\altaffilmark{\DUR} 70 H.~A. Flewelling,\altaffilmark{\IfA} 71 K. W. Hodapp,\altaffilmark{\IfA} 72 M.~E. Huber,\altaffilmark{\IfA} 73 R. Jedicke,\altaffilmark{\IfA} 74 N. Kaiser,\altaffilmark{\IfA} 75 R.-P. Kudritzki,\altaffilmark{\IfA} 76 R.~H. Lupton,\altaffilmark{\Princeton} 77 N. Metcalfe,\altaffilmark{\DUR} 78 A. Rest,\altaffilmark{\STSCI} 79 W.~E. Sweeney,\altaffilmark{\IfA} 80 J.~L. Tonry, \altaffilmark{\IfA} 81 R.~J. Wainscoat,\altaffilmark{\IfA} 82 W.~M. Wood-Vasey\altaffilmark{\Pitt} 83 } 84 %PS1 Builders 61 85 %PS Builder List 62 % W.~S. Burgett,\altaffilmark{\IfA} 63 % K.~C. Chambers,\altaffilmark{\IfA} 86 64 87 % L. Denneau,\altaffilmark{\IfA} 65 % P. Draper,\altaffilmark{\DUR}66 % H.~A. Flewelling,\altaffilmark{\IfA}67 88 % T. Grav,\altaffilmark{\IfA} 68 89 % J. N. Heasley,\altaffilmark{\IfA} 69 % K. W. Hodapp,\altaffilmark{\IfA}70 % M. E. Huber,\altaffilmark{\IfA}71 % R. Jedicke,\altaffilmark{\IfA}72 % N. Kaiser,\altaffilmark{\IfA}73 % R.-P. Kudritzki,\altaffilmark{\IfA}74 90 % G. A. Luppino,\altaffilmark{\IfA} 75 % R. H. Lupton,\altaffilmark{\Princeton}76 % E. A. Magnier,\altaffilmark{\IfA}77 % N. Metcalfe,\altaffilmark{\DUH}78 91 % D. G. Monet,\altaffilmark{\USNO} 79 92 % J.~S. Morgan,\altaffilmark{\IfA} 80 93 % P. M. Onaka,\altaffilmark{\IfA} 81 % P.~A. Price,\altaffilmark{\Princeton}82 94 % C.~W. Stubbs,\altaffilmark{\CfA} 83 % W.~E. Sweeney,\altaffilmark{\IfA} 84 % J.~L. Tonry, \altaffilmark{\IfA} 85 % R. J. Wainscoat,\altaffilmark{\IfA} and 86 % C. Z. Waters,\altaffilmark{\IfA} 87 } % this bracket terminates author list 95 % this bracket terminates author list 88 96 89 97 % The ordering here should be sequential, matching the sequence in the list of authors: 90 98 \altaffiltext{\IfA}{Institute for Astronomy, University of Hawaii, 2680 Woodlawn Drive, Honolulu HI 96822} 91 99 % \altaffiltext{\CfA}{Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA 02138} 92 % \altaffiltext{\Princeton}{Department of Astrophysical Sciences, Princeton University, Princeton, NJ 08544, USA} 100 \altaffiltext{\Princeton}{Department of Astrophysical Sciences, Princeton University, Princeton, NJ 08544, USA} 101 \altaffiltext{\STSCI}{Space Telescope Science Institute, 3700 San Martin Drive, Baltimore, MD 21218, USA} 102 \altaffiltext{\DUR}{Department of Physics, Durham University, South Road, Durham DH1 3LE, UK} 103 \altaffiltext{\Pitt}{Pittsburgh Particle Physics, Astrophysics, and Cosmology Center (PITT PACC), Physics and Astronomy Department, University of Pittsburgh, Pittsburgh, PA 15260, USA} 93 104 % \altaffiltext{\USNO}{US Naval Observatory, Flagstaff Station, Flagstaff, AZ 86001, USA} 94 105 % \altaffiltext{\JHU}{Department of Physics and Astronomy, Johns Hopkins University, 3400 North Charles Street, Baltimore, MD 21218, USA} … … 96 107 \begin{abstract} 97 108 98 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum 99 bibendum nisi id tristique posuere. Duis eu mollis nulla. Maecenas est 100 turpis, mattis tempor urna vitae, placerat rhoncus sem. Lorem ipsum 101 dolor sit amet, consectetur adipiscing elit. Sed quis velit 102 nisl. Aliquam erat volutpat. Cras lacinia, nisl tristique auctor 103 molestie, dolor nulla rhoncus purus, ac accumsan nunc nunc ac 104 nibh. Maecenas vitae mollis mauris. Ut sollicitudin pulvinar purus, 105 eget luctus lorem tincidunt vitae. Vestibulum eu mattis neque. Nulla 106 in tortor id urna dapibus gravida a vel leo. 109 The Pan-STARRS1 Science Consortium have carried out a set of imaging 110 surveys using the 1.4 giga-pixel GPC1 camera on the PS1 telescope. As 111 this camera is composed of many individual electronic readouts, and 112 covers a very large field of view, great care was taken to ensure that 113 the many instrumental effects were corrected to produce the most 114 uniform detector response possible. We present the image detrending 115 steps used as part of the processing of the data contained within the 116 public release of the Pan-STARRS1 Data Release 1 (DR1). In addition 117 to the single image processing, the methods used to transform the 118 375,573 individual exposures into a common sky-oriented grid are 119 discussed, as well as those used to produce both the image stack and 120 difference combination products. 107 121 108 122 \end{abstract} … … 111 125 \keywords{Surveys:\PSONE } 112 126 113 %% http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?2007ASPC..364..153M&data_type=PDF_HIGH&whole_paper=YES&type=PRINTER&filetype=.pdf114 127 \section{Introduction and Survey Description} 128 129 This is the third in a series of seven papers describing the Pan-STARRS1 130 Surveys, 131 the data reduction techniques and the resulting data products. This paper (Paper III) 132 describes the details of the pixel processing algorithms, including 133 detrending, warping, and adding (to create stacked images) and subtracting 134 (to create difference images) and resulting image products and their 135 properties. 136 \citet[][Paper I]{chambers2017} provides an overview of the Pan-STARRS System, the 137 design and execution of the Surveys, the resulting image and catalog data 138 products, a discussion of the overall data quality and basic 139 characteristics, and a brief summary of important results. 140 %Magnier et al. 2017 (Paper II) 141 %Pan-STARRS Data Processing Stages 142 \citet[][Paper II]{magnier2017a} 143 describes how the various data processing stages are organized and 144 implemented 145 in the Imaging Processing Pipeline (IPP), including details of the 146 the processing database which is a critical element in the IPP 147 infrastructure. 148 %Waters et al. 2017 (Paper III) 149 %Pan-STARRS Pixel Processing : Detrending, Warping, Stacking 150 %\citet[][Paper III]{waters2017} 151 %Magnier et al. 2017 (Paper IV) 152 %Pan-STARRS Pixel Analysis : Source Detection 153 \citet[][Paper IV]{magnier2017b} 154 describes the details of the source detection and photometry, including 155 point-spread-function and extended source fitting models, and the 156 techniques for ``forced'' photometry measurements. 157 %Magnier et al. 2017 (Paper V) 158 %Pan-STARRS Photometric and Astrometric Calibration 159 \citet[][Paper V]{magnier2017c} 160 describes the final calibration process, and the resulting photometric and 161 astrometric quality. 162 %Flewelling et al. 2017 (Paper VI) 163 %Pan-STARRS 1 Database and Data Products 164 \citet[][Paper VI]{flewelling2017} 165 describes the details of the resulting catalog data and its organization 166 in the Pan-STARRS database. 167 % 168 % 169 \citet[][Paper VII]{huber2017} 170 %Huber et al. 2017 (Paper VII) 171 describes the Medium Deep Survey in detail, including the unique issues and 172 data products specific to that survey. The Medium Deep Survey is not part 173 of Data Release 1. (DR1) 174 The Pan-STARRS1 filters and photometric system has already been described 175 in detail in \cite{2012ApJ...750...99T}. 115 176 116 177 … … 118 179 with the PS1 telescope on Haleakala Maui to image the sky north of 119 180 $-30^\circ$ declination. The GPC1 camera is composed of 60 orthogonal 120 transfer array (OTA) devices, each of w ith is an $8\times{}8$ grid of181 transfer array (OTA) devices, each of which is an $8\times{}8$ grid of 121 182 readout cells. This parallelizes the readout process, reducing the 122 183 overhead in each exposure. However, as a consequence of this large 123 number of individual detector readouts, there are a number of 124 calibrations that need to be included to ensure the response is 125 consistent across the entire field of view. 126 127 The PV3 reduction represents the third full processing version of the 128 Pan-STARRS archival data. The first two reductions were used 129 internally for pipeline optimization and the development of the 130 initial photometric and astrometric reference catalog. The products 131 from these reductions were not publicly released, but have been used 132 to produce a wide range of scientific papers from the Pan-STARRS 1 133 Science Consortium members. 184 number of individual detector readouts, many calibrations are needed 185 to ensure the response is consistent across the entire field of view. 186 187 The Processing Version 3 (PV3) reduction represents the third full 188 reduction of the Pan-STARRS archival data. The first two reductions 189 were used internally for pipeline optimization and the development of 190 the initial photometric and astrometric reference catalog \citep{magnier2017c}. The 191 products from these reductions were not publicly released, but have 192 been used to produce a wide range of scientific papers from the 193 Pan-STARRS 1 Science Consortium members. 134 194 135 195 The Pan-STARRS image processing pipeline (IPP) is described elsewhere 136 \citep{ MagnierKaiserChambers2006}, but a short summary follows. The196 \citep{magnier2017a}, but a short summary follows. The 137 197 archive of raw exposures is stored on disk, with a database storing 138 198 the metadata of exposure parameters. For the PV3 processing, large … … 141 201 This stage performs the image detrending (described below in section 142 202 \ref{sec:detrending}), as well as the single epoch photometry 143 \citep{ MagnierXXY}, in parallel on the individual OTA device data.203 \citep{magnier2017b}, in parallel on the individual OTA device data. 144 204 Following the \ippstage{chip} stage is the \ippstage{camera} stage, in 145 205 which the astrometry and photometry for the entire exposure is 146 calibrated against the reference catalog. This stage also performs147 masking updates based on the now-known positions and brightnesses of 148 stars that create dynamic features (see Section 149 \ref{sec:dynamic_masks} below). The \ippstage{warp} stage is the next 150 t o operate on the data, transforming the detector oriented151 \ippstage{chip} stage images into sky oriented images that have common152 tessellations and sky projections (Section \ref{sec:warping}). When 153 all \ippstage{warp} stage processing is done for the region of the 154 sky, \ippstage{stack} processing is performed (Section 155 \ref{sec:stacking}) to construct deeper, fully populated images from 156 the set of \ippstage{warp} images that cover that region of the sky. 157 Beyond the \ippstage{stack} stage, a series of additional stages are 158 done that are more fully described in other papers. Transient 159 features are identified in the \ippstage{diff} stage, which takes 160 input\ippstage{warp} and/or \ippstage{stack} data and performs image161 differencing \citep{HuberXXX}. Further photometry is performed in the162 \ippstage{staticsky} and \ippstage{skycal} stages, which add extended 163 source fitting to the point source photometry of objects detected in 164 the \ippstage{stack} images, and calibrate the results againstthe165 re ference catalog. The \ippstage{fullforce} stage takes the catalog166 output of the \ippstage{skycal} stage, and uses the objects detected 167 in that to perform forced photometry on the individual \ippstage{warp} 168 stage images. The details of these stages are provided in 169 \citet{MagnierXXY}.206 calibrated by matching the detections against the reference catalog. 207 This stage also performs masking updates based on the now-known 208 positions and brightnesses of stars that create dynamic features (see 209 Section \ref{sec:dynamic_masks} below). The \ippstage{warp} stage is 210 the next to operate on the data, transforming the detector oriented 211 \ippstage{chip} stage images onto common sky oriented images that have 212 fixed sky projections (Section \ref{sec:warping}). When all 213 \ippstage{warp} stage processing is done for the region of the sky, 214 \ippstage{stack} processing is performed (Section \ref{sec:stacking}) 215 to construct deeper, fully populated images from the set of 216 \ippstage{warp} images that cover that region of the sky. Beyond the 217 \ippstage{stack} stage, a series of additional stages are done that 218 are more fully described in other papers. Transient features are 219 identified in the \ippstage{diff} stage, which takes input 220 \ippstage{warp} and/or \ippstage{stack} data and performs image 221 differencing (Section \ref{sec:diffs}). Further photometry is 222 performed in the \ippstage{staticsky} and \ippstage{skycal} stages, 223 which add extended source fitting to the point source photometry of 224 objects detected in the \ippstage{stack} images, and calibrate the 225 results against the reference catalog. The \ippstage{fullforce} stage 226 takes the catalog output of the \ippstage{skycal} stage, and uses the 227 objects detected in that to perform forced photometry on the 228 individual \ippstage{warp} stage images. The details of these stages 229 are provided in \citet{magnier2017b}. 170 230 171 231 The same reduction procedure described above is also performed in real … … 178 238 \ippstage{diff} stage. This allows the ongoing solar system moving 179 239 object search to identify candidates for follow up observations within 180 24 hours of the initial set of observations \citep{WainscoatXXX}. 181 182 \czwdraft{Should there be a discussion of any header keywords/OTA file formats?} 183 184 Section \ref{sec:detrend construction} provides an overview of the 185 detrend creation process for GPC1, with details of the application of 186 those detrends to correct particular issues in Section 187 \ref{sec:detrending}. An analysis of the algorithms used to complete 188 the \ippstage{warp} (section \ref{sec:warping}) and \ippstage{stack} 189 (section \ref{sec:stacking}) stage transformations of the image data 190 to from the detector frame to a common sky frame, and the co-adding of 240 24 hours of the initial set of observations \citep{2015IAUGA..2251124W}. 241 242 Section \ref{sec:detrending} provides an overview of the detrending 243 process that corrects the instrumental signatures of GPC1, with 244 details of the construction of those detrends in Section 245 \ref{sec:detrend construction}. An analysis of the algorithms used to 246 complete the \ippstage{warp} (section \ref{sec:warping}), 247 \ippstage{stack} (section \ref{sec:stacking}), and \ippstage{diff} 248 (section \ref{sec:diffs}) stage transformations of the image data to 249 from the detector frame to a common sky frame, and the co-adding of 191 250 those common sky frame images continues after the list of detrend 192 251 steps. Finally, a discussion of the remaining issues and possible 193 252 future improvements is presented in section \ref{sec:discussion}. 194 253 195 196 \czwdraft{Is this a sufficient explanation? Also, is this the right 197 place for it?} Image products presented in figures have been 198 mosaicked to arrange pixels in the following way. Single cell images 199 are arranged such that pixel $(1,1)$ is at the lower left corner. 200 Images mosaicked to the OTA level have cell xy00 in the lower left 201 corner, with cells xy10, xy20, etc. sequentially to the right, and 202 cells xy01, xy02, etc. sequentially to the top of this cell. Again, 203 pixel $(1,1)$ of cell xy00 is located in the lower left corner of the 204 image. For mosaics of the full field of view, the OTAs are arranged 205 as they see the sky. The lower left corner is the empty location 206 where OTA70 would exist. Toward the right, the OTA labels decrease in 207 $X$ label, with the empty OTA00 located in the lower right. The OTA 208 $Y$ labels increase upward in the mosaic. The OTAs to the left of the 209 midplane (OTA4Y-OTA7Y) are oriented with cell xy00 and pixel $(1,1)$ 210 to the lower left of their position. Due to the electronic 211 connections of the OTAs in the focal plane, the OTAs to the right of 212 the midplane (OTA0Y-OTA3Y) oriented with cell xy00 and pixel $(1,1)$ 213 to the top right of their position, and have a negative parity to the 214 mosaic in both x and y. 215 216 % Discuss 2-phase/3-phase device differnces 217 218 %\section{General Detrend Discussion} 219 %\label{sec:detrending} 254 Image products presented in figures have been 255 mosaicked to arrange pixels as follows. Single cell images are 256 arranged such that pixel $(1,1)$ is at the lower left corner. Images 257 mosaicked to the OTA level have cell xy00 in the lower left corner, 258 with cells xy10, xy20, etc. sequentially to the right, and cells xy01, 259 xy02, etc. sequentially to the top of this cell. Again, pixel $(1,1)$ 260 of cell xy00 is located in the lower left corner of the image. For 261 mosaicks of the full field of view, the OTAs are arranged as they see 262 the sky. The lower left corner is the empty location where OTA70 263 would exist. Toward the right, the OTA labels decrease in $X$ label, 264 with the empty OTA00 located in the lower right. The OTA $Y$ labels 265 increase upward in the mosaic. The OTAs to the left of the midplane 266 (OTA4Y-OTA7Y) are oriented with cell xy00 and pixel $(1,1)$ to the 267 lower left of their position. Due to the electronic connections of 268 the OTAs in the focal plane, the OTAs to the right of the midplane 269 (OTA0Y-OTA3Y) are rotated 180 degrees, and are oriented with cell xy00 270 and pixel $(1,1)$ to the top right of their position. 271 272 \textit{Note: These papers are being placed on the arXiv.org to 273 provide crucial support information at the time of the public 274 release of Data Release 1 (DR1). We expect the arXiv versions to be 275 updated prior to submission to the Astrophysical Journal in January 276 2017. Feedback and suggestions for additional information from early 277 users of the data products are welcome during the submission and 278 refereeing process.} 279 280 281 \section{GPC1 Detrend Details} 282 \label{sec:detrending} 283 284 Ensuring a consistent and uniform detector response across the 285 three-degree diameter field of view of the GPC1 camera is essential to 286 a well calibrated survey. Many standard image detrending steps are 287 done for GPC1, with overscan subtraction removing the detector bias 288 level, dark frame subtraction to remove temperature and exposure time 289 dependent detector glows, and flat field correction to remove pixel to 290 pixel response functions. We also construct fringe correction for the 291 reddest data in the \yps{} filter, to remove the interference patterns that 292 arise in that filter due to the variations in the thickness of the 293 detector surface. 294 295 These corrections, however, assume that the detector response is 296 linear across the full range of values. This is not universally the 297 case with GPC1, and this requires an additional set of detrending 298 steps to remove these non-linear responses. The first of these is the 299 \ippprog{burntool} correction, which removes the persistence trails 300 caused by the incomplete transfer of charge along the readout columns. 301 This bright-end nonlinearity is generally only evident for the 302 brightest stars, as only pixels that are at or beyond the saturation 303 point of the detector have this issue. More widespread is the 304 non-linearity at the faint end of the pixel range. Some readout cells 305 and some readout cell edge pixels experience a sag relative to linear 306 at low illumination, such that faint pixels appear fainter than 307 expected. The correction to this requires amplifying the pixel values 308 in these regions to match the expected model. 309 310 The final non-linear response issue has no good option for correction. 311 Large regions of some OTA cells experience significant charge transfer 312 issues, making them unusable for science observations. These regions 313 are therefore masked in processing, with these CTE regions making up 314 the largest fraction of masked pixels on the detector. Other regions 315 are masked for other regions, such as static bad pixel features or 316 temporary readout masking caused by issues in the camera electronics 317 that make these regions unreliable. These all contribute to the 318 detector mask, which is augmented in each exposure for dynamic 319 features that are masked based on the astronomical features within the 320 field of view. 321 322 For the PV3 processing, all detrending is done by the 323 \ippprog{ppImage} program. This program applies the detrends to the 324 individual cells, and then an OTA level mosaic is constructed for the 325 science image, the mask image, and the variance map image. The single 326 epoch photometry is done at this stage as well. The following 327 subsections (\ref{sec:burntool} - \ref{sec:background}) detail these 328 detrending steps, presented in the order in which they are applied to 329 the individual OTA image data. 330 331 \subsection{Burntool / Persistence effect} 332 \label{sec:burntool} 333 334 Pixels that approach the saturation point on GPC1, which varies by 335 readout with common values around 60000 DN, cause persistence problems 336 on that and subsequent images. During the read out process of an 337 image with such a bright pixel, some of the charge associated with it 338 is not fully shifted down the detector column toward the amplifier. 339 As a result, this charge remains in the starting cell, and is 340 partially collected in subsequent shifts, resulting in a ``burn 341 trail'' that extends from the center of the bright source away from 342 the amplifier (vertically along the pixel columns toward the top of 343 the cell). 344 345 This incomplete charge shifting in nearly full wells continues as each 346 row is read out. This results in a remnant charge being deposited in 347 the pixels that the full well was shifted through. In following 348 exposures, this remnant charge leaks out, resulting in a trail that 349 extends from the initial location of the bright source on the previous 350 image towards the amplifier (vertically down along the pixel column). 351 This remnant charge can remain on the detector for up to thirty 352 minutes, requiring the locations of these ``burns'' be retained 353 between exposures. 354 355 Both of these types of persistence trails are measured and optionally 356 repaired via the \ippprog{burntool} program. This program does an 357 initial scan of the images, and identifies objects with pixel values 358 brighter than a conservative threshold of 30000 DN. The trail from 359 the peak of that object is fit with a one-dimensional power law in 360 each pixel column above the threshold, based on empirical evidence 361 that this is the functional form of this persistence effect. This 362 also matches the expectation that a constant fraction of charge is 363 incompletely transferred at each shift beyond the persistence 364 threshold. Once this fit is done, the model can be subtracted from 365 the image, and the location of the star is stored in a table along 366 with the exposure PONTIME, which denotes the number of seconds since 367 the detector was last powered on, and provides an internally consistent 368 time scale. 369 370 For subsequent exposures, the table associated with the previous image 371 is read in, and after correcting trails from the stars on the new 372 image, the positions of the bright stars from the table are used to 373 check for remnant trails on the image. These are fit and subtracted 374 using a one-dimensional exponential model, again based on empirical 375 studies. If a significant model is found, then this location is 376 retained in the image output table. If not, the old burn is allowed 377 to expire. 378 379 The main concern with this method of correcting the persistence trails 380 is that it is based on fits to the raw image data, which may have 381 other signal sources not determined by the persistence effect. The 382 presence of other stars or artifacts along the path of the burn can 383 result in a poor model to be fit, resulting in either an over- or 384 under-subtraction of the persistence burn. For this reason, the image 385 mask is marked with a value indicating that this correction has been 386 applied. These pixels are not fully excluded, but they are marked as 387 suspect, which allows them to be excluded from consideration in 388 subsequent stages, such as image stacking. 389 390 Another concern is that the cores of very bright stars are deformed by 391 this process, as the burntool fitting subtracts flux 392 from only one side of the star. As most stars that result in burns already 393 have saturated cores, they are already ignored for the purpose of 394 PSF determination and are flagged as saturated by the photometry 395 reduction. 396 397 \begin{figure} 398 \centering 399 \begin{minipage}{0.45\hsize} 400 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt_trail.png} 401 % \caption{(a)} 402 % \end{subfigure}% 403 % \begin{subfigure}[]{.45\hsize} 404 \end{minipage}% 405 \begin{minipage}{0.45\hsize} 406 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt_trail.png} 407 % \caption{(b)} 408 % \end{subfigure} 409 \end{minipage} 410 411 \caption{Example of a profile cut along the y-axis through a bright star on exposure o5677g0123o OTA11 in cell xy60 (left panel) and on the subsequent exposure o5677g0124o (right panel). In both figures, the green points show the image corrected with all appropriate detrending steps, but without burntool applied, illustrating the amplitude of the persistence trails. The red points show the same data after the burntool correction, which reduces the impact of these features. Both exposures are in the \gps{} filter with exposure times of 43s} 412 \end{figure} 413 414 \begin{figure} 415 \centering 416 \begin{minipage}{0.45\hsize} 417 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_nobt.png} 418 % \caption{(a)} 419 % \end{subfigure}% 420 % \begin{subfigure}[]{.45\hsize} 421 \end{minipage}% 422 \begin{minipage}{0.45\hsize} 423 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_nobt.png} 424 % \caption{(b)} 425 % \end{subfigure} 426 \end{minipage} 427 \begin{minipage}{0.45\hsize} 428 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt.png} 429 % \caption{(a)} 430 % \end{subfigure}% 431 % \begin{subfigure}[]{.45\hsize} 432 \end{minipage}% 433 \begin{minipage}{0.45\hsize} 434 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt.png} 435 % \caption{(b)} 436 % \end{subfigure} 437 \end{minipage} 438 \caption{Example of OTA11 cell xy60 on exposures o5677g0123o (left) and o5677g0124o (right). The top panels show the image with all appropriate detrending steps, but without burntool, and the bottom show the same with burntool applied. There is some slight over subtraction in fitting the initial trail, but the impact of the trail is greatly reduced in both exposures.} 439 \end{figure} 440 441 442 \subsection{Overscan} 443 \label{sec:overscan} 444 445 Each cell on GPC1 has an overscan region that covers the first 34 446 columns of each row, and the last 10 rows of each column. No light 447 lands on these pixels, so the image region is trimmed to exclude them. 448 Each row has an overscan value subtracted, calculated by finding the 449 median value of that row's overscan pixels and then smoothing between 450 rows with a three-row boxcar median. 451 452 \subsection{Non-linearity Correction} 453 \label{sec:nonlinearity} 454 455 The pixels of GPC1 are not uniformly linear at all flux levels. In 456 particular, at low flux levels, some pixels have a tendency to sag 457 relative to the expected linear value. This effect is most pronounced 458 along the edges of the detector cells, although some entire cells show 459 evidence of this effect. 460 461 To correct this sag, we studied the flux behavior of a series of flat 462 frames for a ramp of exposure times with approximate logarithmically 463 equal spacing between 0.01s and 57.04s. As the exposure time 464 increases, the flux on each pixel also increases in what is expected 465 to be a linear manner. Each of these flat exposures in this ramp is 466 overscan corrected, and then the median is calculated for each cell, 467 as well as for the rows and columns within ten pixels of the edge of 468 the science region. From these median values at each exposure time 469 value, we can construct the expected trend by fitting a linear model, 470 $f_{region} = G * t_{exp} + B$, to determine the gain, $G$, and the 471 bias, $B$, for the region considered. This fitting was limited to only 472 the range of fluxes between 12000 and 38000 counts, as these ranges 473 were found to match the linear model well. This range avoids the 474 non-linearity at low fluxes, as well as the possibility of high-flux 475 non-linearity effects. 476 477 We store the average flux measurement and deviation from the linear 478 fit for each exposure time for all regions on all detector cells in 479 the linearity detrend look up tables. When this is applied to science 480 data, these lookup tables are loaded, and a linear interpolation is 481 performed to determine the correction needed for the flux in that 482 pixel. This look up is performed for both the row and column of each 483 pixel, to allow the edge correction to be applied where applicable, 484 and the full cell correction elsewhere. The average of these two 485 values is then applied to the pixel value, reducing the effects of 486 pixel nonlinearity. 487 488 This non-linearity effect appears to be stable in time for the 489 majority of the detector pixels, with little evident change over the 490 survey duration. However, as the non-linearity is most pronounced at 491 the edges of the detector cells, those are the regions where the 492 correction is most likely to be incomplete. Because of this fact, 493 most pixels in the static mask with either the DARKMASK or FLATMASK 494 bit set are found along these edges. As the non-linearity correction 495 is unable to reliably restore these pixels, they produce inconsistent 496 values after the dark and flat have been applied, and are therefore 497 rejected. 498 499 \begin{figure} 500 \centering 501 \includegraphics[width=0.9\hsize,angle=0,clip]{images/linearity_XY27_xy16.png} 502 \caption{Example plot of the linearity correction as a fraction of observed flux for OTA27, cell xy16.} 503 \end{figure} 504 505 \subsection{Dark/Bias Subtraction} 506 \label{sec:dark} 507 508 The dark model we make for GPC1 considers each pixel individually, 509 independent of any neighbors. To construct this model, we fit a 510 multi-dimensional model to the array of input pixels from a randomly 511 selected set of 100-150 overscan and non-linearity corrected dark 512 frames chosen from a given date range. The model fits each pixel as a 513 function of the exposure time $t_{exp}$ and the detector temperature 514 $T_{chip}$ of the input images such that $\mathrm{dark} = a_0 + a_1 515 t_{exp} + a_2 T_{chip} t_{exp} + a_3 T_{chip}^2 t_{exp}$. This 516 fitting uses two iterations to produce a clipped fit, rejecting at the 517 $3\sigma$ level. The final coefficients $a_i$ for the dark model are 518 stored in the detrend image. The constant $a_0$ term includes the 519 residual bias signal after overscan subtraction, and as such, a 520 separate bias subtraction is not necessary. 521 522 Applying the dark model is simply a matter of calculating the response 523 to the exposure time and detector temperature for the image to be 524 corrected, and subtracting the resulting dark signal from the image. 525 526 \subsubsection{Time evolution} 527 528 The dark model is not consistently stable over the full survey, with 529 significant drift over the course of multiple months. Some of the 530 changes in the dark can be attributed to changes in the voltage 531 settings of the GPC1 controller electronics, but the majority seem to 532 be the result of some unknown parameter. We can separate the dark 533 model history of GPC1 into three epochs. The first epoch covers all 534 data taken prior to 2010-01-23. This epoch used a different header 535 keyword for the detector temperature, making data from this epoch 536 incompatible with later dark models. 537 538 The second epoch covers data between 2010-01-23 and 2011-05-01, and is 539 characterized by a largely stable but oscillatory dark solution. 540 There are two modes that the dark model switches between apparently at 541 random. No clear cause has been established for the switching, but 542 there are clear differences between the two modes that require the 543 observation dates to be split to use the model that is most 544 appropriate. 545 546 The initial evidence of these two modes comes from the discovery of a 547 slight gradient along the rows of certain cells. This is a result of 548 a drift in the bias level of the detector as it is read out. An 549 appropriate dark model should remove this gradient entirely. For 550 these two modes, the direction of this bias drift is different, so a 551 single dark model generated from all dark images in the time range 552 over corrects the positive-gradient mode, and under corrects the 553 negative-gradient mode. Upon identifying this two-mode behavior, and 554 determining the dates each mode was dominant, two separate dark 555 models were constructed from appropriate ``A'' and ``B'' mode dark 556 frames. Using the appropriate dark minimizes the effect of this bias 557 gradient in the dark corrected data. 558 559 The bias drift gradients of the mode switching can be visualized in 560 Figure \ref{fig:dark switching}. This figure shows the image profile 561 along the x-pixel axis binned along the full y-axis of the first row 562 of cells. The raw data is shown, illustrating the positional 563 dependence the dark signal has on the image values. In addition, 564 both the correct B-mode dark and incorrect A-mode dark have been 565 applied to this image, showing that although both correct the bulk of 566 the dark signal, using the incorrect mode creates larger intensity 567 gradients. 568 569 After 2011-05-01, the two-mode behavior of the dark disappears, and is 570 replaced with a slow observation date dependent drift in the magnitude 571 of the gradient. This drift is sufficiently slow that we have modeled 572 it using three observation date independent dark model for different 573 date ranges. These darks cover the range from 2011-05-01 to 574 2011-08-01, 2011-08-01 to 2011-11-01, and 2011-11-01 and on. The 575 reason for this time evolution is unknown, but as it is correctable 576 with a small number of dark models, this does not significantly impact 577 detrending. 578 579 \begin{figure} 580 \centering 581 % \begin{subfigure}[]{.45\hsize} 582 \begin{minipage}{0.45\hsize} 583 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_M_OS_NL_XY23_b1.jpg} 584 % \caption{(a)} 585 % \end{subfigure}% 586 % \begin{subfigure}[]{.45\hsize} 587 \end{minipage}% 588 \begin{minipage}{0.45\hsize} 589 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_to_DARK_XY23_b1.jpg} 590 % \caption{(b)} 591 % \end{subfigure} 592 \end{minipage} 593 \caption{An example of the dark model application to exposure o5677g0123o, OTA23 (2011-04-26, 43s \gps{} filter). The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, and the detector non-linearity corrected. The right panel, shows the same exposure with the dark applied in addition to the processing shown on the left.} 594 \end{figure} 595 596 \begin{figure} 597 \centering 598 \includegraphics[width=0.9\hsize,angle=0,clip]{images/B_profile_ex.png} 599 \caption{Example showing a profile cut across exposure o5676g0195, OTA67 (2011-04-25, 43s \gps{} filter). The entire first row of cells (xy00-xy07) have had a median calculated along each pixel column on the OTA mosaicked image. Arbitrary offsets have been applied to shift the curves to not overlap. The top curve (in purple) shows the initial raw profile, with no dark model applied. The next curve (in green) shows the smoother profile after applying the correct B-mode dark model. Applying the incorrect A-mode dark results in the blue curve, which shows a significant increase in gradients across the cells. The orange curve shows the result of the PATTERN.CONTINUITY correction. Although this creates a larger gradient across the mosaicked images, it decreases the cell-to-cell level changes. The final yellow curve shows the final image profile after all detrending and background subtraction, and has not had an offset applied. The bright source at the cell xy00 to xy01 transition is a result of a large optical ghost, which due to the area covered, increases the median level more than the field stars.} 600 \label{fig:dark switching} 601 \end{figure} 602 603 \subsubsection{Video Dark} 604 \label{sec:video_darks} 605 606 The dark signal is stronger in cell corners due to glow from the 607 read-out amplifiers. The standard dark model corrects this for most 608 observations. However, as mentioned above, when a cell is repeatedly 609 read in video mode, the dark model for the OTA containing it changes. 610 Surprisingly, added reads for the video cell do not amplify the 611 amplifier glow, but rather decrease the dark signal in these regions. 612 As a result, using the standard dark model on the data for these OTAs 613 results in oversubtraction of the corner glow. 614 615 Video darks have been constructed to eliminate the effect this 616 observational change has on the final image quality. This was done by 617 running the standard dark construction process on a series of dark 618 frames that have had the video signal enabled for some cells. GPC1 619 can only run video signals on a subset of the OTAs at a given time. 620 This requires two passes to enable the video signal across the full 621 set of OTAs that support video cells. This is convenient for the 622 process of creating darks, as those OTAs that do not have video 623 signals enabled create standard dark models, while the video dark is 624 created for those that do. 625 626 This simultaneous construction of video and standard dark models is 627 useful, as it provides the ability to isolate the response on the 628 standard dark from the video signals. Isolating this response is 629 essential for attempting to create archival video darks. We only have 630 raw video dark frame data after 2012-05-16, when this problem was 631 initially identified, so any data prior to that can not be directly 632 corrected for the video dark signal. Isolating the video signal 633 response allows linear corrections to the pre-existing standard dark 634 models for archival data. Testing this shows that constructing a 635 video dark for older data simply as $VD_{2009} = D_{2009} - D_{Modern} 636 + VD_{Modern}$ produces a satisfactory result that does not 637 over subtract the amplifier glow. This is shown in figure 638 \ref{fig:video_darks}, which shows video cells from before 2012-05-16, 639 corrected with both the standard and video darks, with the early video 640 dark constructed in such a manner. 641 642 \begin{figure} 643 \centering 644 % \begin{subfigure}[]{.45\hsize} 645 \begin{minipage}{0.45\hsize} 646 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_Rdark_XY22_b1.jpg} 647 % \caption{(a)} 648 % \end{subfigure}% 649 % \begin{subfigure}[]{.45\hsize} 650 \end{minipage}% 651 \begin{minipage}{0.45\hsize} 652 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_VDdark_XY22_b1.jpg} 653 % \caption{(b)} 654 % \end{subfigure} 655 \end{minipage} 656 \caption{An example of the video dark model application to exposure o5677g0123o, OTA22 (2011-04-26, 43s \gps{} filter), which has a video cell located in cell xy16. The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, the detector non-linearity corrected, and a regular dark applied. The right panel, shows the same exposure with a video dark applied instead of the standard dark. The main impact of this change is the improved correction of the corner glows, which are over subtracted with the standard dark.} 657 \label{fig:video_darks} 658 \end{figure} 659 660 \subsection{Noisemap} 661 \label{sec:noisemap} 662 663 Based on a study of the positional dependence of all detected sources, 664 we have discovered that the cells in GPC1 do not have uniform noise 665 characteristics. Instead, there is a gradient along the pixel rows, 666 with the noise generally higher away from the read out amplifier 667 (higher cell x pixel positions). This is likely an effect of the 668 row-by-row bias issue discussed below. This gradient causes the read 669 noise to increase as the row is read out. As a result of this 670 increased noise, more sources are detected in the higher noise regions 671 when the read noise is assumed constant across the readout. Read noise is the 672 673 To 674 mitigate this noise gradient, we constructed an initial set of 675 noisemap images by measuring the median variance on bias frames. The 676 variance is calculated in boxes of 20x20 pixels, and then linearly 677 interpolated to cover the full image. 678 679 Unfortunately, due to correlations within this noise, the variance 680 measured from the bias images does not fully remove the positional 681 dependence of objects that are detected. This simple noisemap 682 underestimates the noise observed when the image is filtered during 683 the object detection process. This filtering convolves the background 684 noise with a PSF, which has the effect of amplifying the correlated 685 peaks in the noise. This amplification can therefore boost background 686 fluctuations above the threshold used to select real objects, 687 contaminating the final object catalogs. 688 689 In the detection process, we expect false positives at a rate equal to 690 the one-tailed probability beyond the detection threshold. For these 691 tests, only detections measured at the $\sigma_{thresh} = 5\sigma$ 692 level are used, to match that used in the photometry on science data. 693 This probability can be converted into a number of false number by 694 considering a given area. As the detections must be isolated to not 695 be detected as an extended object, this area must be reduced by the 696 area a given PSF occupies. Combining this, we find that we expect a 697 probability $P = 1 - \Phi_{normal}(5) = \frac{1}{2} 698 \erfcinv\left(\frac{5}{\sqrt{2}}\right)$, and an area given $N$ 699 exposures of area $X\times Y$, $A = \frac{X \times Y \times 700 N}{A_{PSF}}$. For a typical $1"$ seeing, $A_{PSF}$ is approximately 701 16 pixels. Using this model for the false positives, we found that 702 the added read noise was insufficient to account for the observed 703 false positive rate. Inverting this relation, we can measure 704 $\sigma_{obs}$, the true threshold level based on the number of false 705 positives observed. This $\sigma_{obs}$ is the combined to form a 706 boost factor $B = \sigma_{thresh} / \sigma_{obs}$ that amplifies the 707 noisemap to match the observed false detection rate. 708 709 The row-to-row variations that contribute to the extra noise are 710 related to the dark model, and because of this, as the dark model 711 changes, the effective noise also changes. To ensure that the 712 noisemap accurately matches the true noise level, we have created 713 different noisemap models for the three major time ranges of the dark 714 model. We do not see any strong evidence that the noisemaps have the 715 A/B modes visible in the dark, and so we do not generate different 716 models for each individual dark model. The additional pixel-to-pixel 717 variance from this noisemap is added to the Poissonian variance to 718 form the science variance image generated by the \ippstage{chip} 719 processing. 720 721 \subsection{Flat} 722 723 Determining a flat field correction for GPC1 is a challenging 724 endeavor, as the wide field of view makes it difficult to construct a 725 uniformly illuminated image. Using a dome screen is not possible, as 726 the variations in illumination and screen rigidity create large 727 scatter between different images that are not caused by the detector 728 response function. Because of this, we use sky flat images taken at 729 twilight, which are more consistently illuminated than screen flats. 730 We calculate the mean of these images to determine the initial flat 731 model. 732 733 From this starting skyflat model, we construct a photometric 734 correction to remove the effect of the illumination differences over 735 the detector surface. This is done by dithering a series of science 736 exposures with a given pointing. By fully calibrating these exposures 737 with the initial flat model, and then comparing the measured fluxes 738 for the same star as a function of position on the detector, we can 739 determine position dependent scaling factors. From the set of scaling 740 factors for the full catalog of stars observed in the dithered 741 sequence, we can construct a model of the error in the initial flat 742 model as a function of detector position. Applying a correction that 743 reduces the amplitude of these errors produces a flat field model that 744 better represents the true detector response. 745 746 In addition to this flat field applied to the individual images, the 747 ubercal process used to calibrate the database of all detections 748 \citep{2012ApJ...756..158S} constructs internal ``flat field'' corrections. 749 Although a single set of image flat fields was used for the entire PV3 750 survey, five separate ``seasons'' of database flat fields were needed 751 to ensure proper calibration. This indicates that the flat field 752 response is not completely fixed in time. More details on this 753 process are contained in \citet{magnier2017c}. 754 755 \subsection{Pattern correction} 756 \label{sec:pattern} 757 758 Due to detector specific issues that are not cleanly removed by the 759 dark model, we have a set of ``pattern'' corrections that are applied 760 to some selection of the OTAs in the camera. This is done to reduce 761 the effect that detector differences have on the measured astronomical 762 signal that are not stable enough to be corrected with a static model. 763 Because of this, the pattern corrections attempt to identify and 764 correct the detector issues based on appropriate filtering the 765 individual science exposures. 766 767 The PATTERN.ROW correction is used to remove any remaining row-by-row 768 bias variation, and the PATTERN.CONTINUITY correction attempts to 769 ensure that the cells of a given OTA are consistent with the other 770 cells on that OTA. 771 772 \subsubsection{Pattern Row} 773 %% Statistics so I have them written down somewhere 774 %% chipProcessedImfile.bg/bg_stdev by filter for XY33 (a good chip) 775 %% filter bg_mean stdev median Qsig bg_stdev_mean stdev median Qsig 776 %% g 36.37422026669 64.64175104057 32.693 6.10284 14.696938349131 78.80460307171 8.8401 0.5417843 777 %% r 200.96143304525 471.87743546238 117.105 94.55608 33.854672792146 79.01642728089 13.4564 5.3771355 778 %% i 447.00504994458 938.38517801037 286.810 154.71397 57.298335510188 99.38392923935 20.0217 24.2254723 779 %% z 317.54933679054 390.38930252748 241.014 114.13316 48.359069000176 94.44452756094 17.9404 9.1535209 780 %% y 371.09019536218 293.57439970375 288.481 133.38769 43.724342221691 135.04286534327 19.9029 7.5396461 781 782 As discussed above in the dark and noisemap sections, certain 783 detectors have significant bias offsets between adjacent rows, caused 784 by noise in the camera control electronics. The magnitude of these 785 offsets increases as the distance from the readout amplifier 786 increases, resulting in horizontal streaks that are more pronounced 787 along the large x pixel edge of the cell. As the level of the offset 788 is apparently random between exposures, the dark correction cannot 789 fully remove this structure from the images, and the noisemap value 790 only indicates the level of the average variance added by these bias 791 offsets. Therefore, we apply the PATTERN.ROW correction in an attempt 792 to mitigate the offsets and correct the image values. To force the 793 rows to agree, a second order clipped polynomial is fit to each row in 794 the cell. Four fit iterations are run, and pixels $2.5\sigma$ deviant 795 are excluded from subsequent fits, to minimize the effect stars and 796 other astronomical signals have. This final trend is then subtracted 797 from that row. Simply doing this subtraction will also have the 798 effect of removing the background sky level. To prevent this, the 799 constant and linear terms for each row are stored, and linear fits are 800 made to these parameters as a function of row, perpendicular to the 801 initial fits. This produces a plane that is added back to the image 802 to restore the background offset and any linear ramp that exists in 803 the sky. 804 805 These row-by-row variations have the largest impact on data taken in 806 the \gps{} filter, as the read noise is the dominant noise source in 807 that filter. At longer wavelengths, the noise from the Poissonian 808 variation in the sky level increases. Although the PATTERN.ROW correction is still applied to data taken in the other filters, 809 810 This correction was required on all cells on all OTAs prior to 811 2009-12-01, at which point a modification of the camera electronics 812 reduced the scale of the row-by-row offsets for the majority of the 813 OTAs. As a result, we only apply this correction to the cells where 814 it is still necessary, as shown in Figure \ref{fig: pattern row 815 cells}. A list of these cells is listed in Table 816 \ref{tab:pattern_row_cells}. 817 818 Although this correction does largely resolve the row-by-row offset 819 issue in a satisfactory way, large and bright astronomical objects can 820 bias the fit significantly. This results in an oversubtraction of the 821 offset near these objects. As the offsets are calculated on the pixel 822 rows, this oversubtraction is not uniform around the object, but is 823 preferentially along the horizontal x axis of the object. Most 824 astronomical objects are not significantly distorted by this, with 825 this only becoming on issue for only bright objects comparable to the 826 size of the cell (598 pixels = 150"). 827 828 \begin{deluxetable}{lcccc} 829 \tablecolumns{3} 830 \tablewidth{0pc} 831 \tablecaption{Cells which have PATTERN.ROW correction applied} 832 \tablehead{\colhead{OTA} & \colhead{Cell columns} & \colhead{Additional cells}} 833 \startdata 834 OTA11 & & xy02, xy03, xy04, xy07 \\ 835 OTA14 & & xy23 \\ 836 OTA15 & 0 & \\ 837 OTA27 & 0, 1, 2, 3, 7 & \\ 838 OTA31 & 7 & \\ 839 OTA32 & 3, 7 & \\ 840 OTA45 & 3, 7 & \\ 841 OTA47 & 0, 3, 5, 7 & \\ 842 OTA57 & 0, 1, 2, 6, 7 & \\ 843 OTA60 & & xy55 \\ 844 OTA74 & 2, 7 & \\ 845 \enddata 846 \label{tab:pattern_row_cells} 847 \end{deluxetable} 848 849 \begin{figure} 850 \centering 851 \includegraphics[width=0.9\hsize,angle=0,clip]{images/pattern_row_edit.png} 852 \caption{Diagram illustrating in red which cells on GPC1 require the PATTERN.ROW correction to be applied. The footprint of each OTA is outlined, and cell xy00 is marked with either a filled box or an outline. The labeling of the non-existent corner OTAs is provided to orient the focal plane.} 853 \label{fig: pattern row cells} 854 \end{figure} 855 856 \begin{figure} 857 \centering 858 \begin{minipage}{0.45\hsize} 859 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_nopat.png} 860 % \caption{(a)} 861 % \end{subfigure}% 862 % \begin{subfigure}[]{.45\hsize} 863 \end{minipage}% 864 \begin{minipage}{0.45\hsize} 865 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_pat.png} 866 % \caption{(b)} 867 % \end{subfigure} 868 \end{minipage} 869 \caption{Example of the PATTERN.ROW correction on exposure o5379g0103o OTA57 cell xy00 (\ips{} filter 45s). The left panel shows the cell with all appropriate detrending except the PATTERN.ROW, and the right shows the same cell with PATTERN.ROW applied. The correction reduces the correlated noise on the right side, which is most distant from the read out amplifier. There is a slight over subtraction along the rows near the bright star.} 870 \end{figure} 871 872 \subsubsection{Pattern Continuity} 873 874 After previous attempts to ensure that adjacent cells on an OTA 875 matched background levels were insufficient in many situations, we 876 designed a replacement correction that would reduce the background 877 distortion for large objects. In addition, studies of the background 878 level illustrated that the row-by-row bias can introduce small 879 background gradient variations along the rows of the cells that is not 880 stable enough to be completely fit by the dark model. This common 881 feature across the columns of cells results in a ``saw tooth'' pattern 882 horizontally across an OTA, and as the background model fits a smooth 883 sky level, this induces over and under subtraction at the cell 884 boundaries. 885 886 The PATTERN.CONTINUITY correction, attempts to match the edges of a 887 cell to those of its neighbors. For each cell, a thin box 10 pixels 888 wide on each edge is extracted and the median value of unmasked values 889 calculated for that box. These median values are then used to 890 construct a vector of differences $\Delta_i = \sum_{j} \mathrm{Edge}_{i} - 891 \mathrm{Edge}_{j}$, along with a matrix of associations $A_{i,i'} = \sum_{j} 892 \delta(i,j) \delta(j,i')$ denoting which cell boundaries are adjacent. 893 By solving the system $A x = \Delta$, we find the set of offsets $x_i$ 894 to be applied to each cell to ensure the minimum differences between 895 all cell edges and their neighbors. 896 897 For OTAs that initially show the saw tooth pattern, the effect of this 898 correction is to align the cells into a single ramp, at the expense of 899 the absolute background level. However, as we subtract off a smooth 900 background model prior to doing photometry, these deviations from an 901 absolute sky level are unimportant. The fact that the final ramp is 902 smoother than it would be otherwise also allows for the background 903 subtracted image to more closely match the astronomical sky, without 904 significant errors at cell boundaries. An example of the effect of 905 this correction on an image profile is shown in Figure \ref{fig:dark switching}. 906 907 908 \subsection{Fringe correction} 909 \label{sec:fringe} 910 % det_id 296 is the fringe we use. 911 912 Due to variations in the thickness of the detectors, we observe 913 interference patterns at the infrared end of the filter set, as the 914 wavelength of the light becomes comparable to the thickness of the 915 detectors. Visually inspecting the images shows that the fringing is 916 most prevalent in the \yps{} filter images, with negligible fringing in the 917 other bands. As a result of this, we only apply a fringe correction 918 to the \yps{} filter data. 919 920 The fringe used for PV3 processing was constructed from a set of 20 921 120s science exposures. These exposures are overscan subtracted, and 922 corrected for non-linearity, and have the dark and flat models 923 applied. These images are smoothed with a Gaussian kernel with 924 $\sigma = 2$ pixels to minimize pixel to pixel noise. The fringe 925 image data is then constructed by calculating the clipped mean of the 926 input images with two iteration of clipping at the $3\sigma$ level. 927 928 A course background model for each cell is constructed by calculating 929 the median on a 3x3 grid (approximately 200x200 pixels each). A set 930 of 1000 randomly selected points are then selected on the fringe image 931 for each cell, and a median calculated for this position in a 10x10 932 pixel box, with the background level subtracted. These sample 933 locations provide scale points to allow the amplitude of the measured 934 fringe to be compared to that found on science images. 935 936 To apply the fringe, the same sample locations are measured on the 937 science image to determine the relative strength of the fringing in 938 that particular image. A least squares fit between the fringe 939 measurements and the corresponding measurements on the science image 940 provides the scale factor multiplied to the fringe before it is 941 subtracted from the science image. 942 943 \begin{figure} 944 \centering 945 \begin{minipage}{0.5\hsize} 946 \includegraphics[width=1.5\hsize,angle=0,clip]{images/o5220g0025o_XY53_nofringe.png} 947 \end{minipage}% 948 \begin{minipage}{0.5\hsize} 949 \includegraphics[width=1.5\hsize,angle=0,clip]{images/o5220g0025o_XY53_fringe.png} 950 \end{minipage} 951 \caption{Example of the \yps{} filter fringe pattern on exposure o5220g0025o OTA53 (\yps{} filter 30s). The left panel shows the OTA mosaic with all detrending except the fringe correction, while the right shows the same including the fringe correction. Both images have been smoothed with a Gaussian with $\sigma = 3$ pixels to highlight the faint and large scale fringe patterns. 952 } 953 \label{fig: fringe example} 954 \end{figure} 955 956 \subsection{Masking} 957 \label{sec:masking} 958 959 \subsubsection{Static Masks} 960 \label{sec:static_masks} 961 962 Due to the large size of the detector, it is expected that there 963 are a number of pixel defects that do not have the detection 964 sensitivity on par with their neighbors. To remove these pixels, we 965 have constructed a static mask that identifies the known defects. 966 This mask is constructed in three phases. 967 968 First, a CTEMASK is constructed to mask out regions in which the 969 charge transfer efficiency is low compared to the rest of the 970 detector. Twenty-five of the sixty OTAs in GPC1 show some evidence of 971 CTE issues, with this pattern appearing (to varying degrees) in 972 roughly triangular patches on the OTA due to defects in the 973 semiconductor manufacturing. To generate the mask for these regions, 974 a sample set of 26 evenly illuminated flat field images were measured 975 to produce a map of the image variance in 20x20 pixel bins. As the 976 flat image is expected to illuminate the image uniformly, the expected 977 variances in each bin should be Poissonian distributed with the flux 978 level. However, in regions with CTE issues, adjacent pixels are not 979 independent, as the charge in those pixels is more free to spread. 980 This reduces the pixel-to-pixel differences, resulting in a lower than 981 expected variance. All regions with variance less than half the 982 average image level are added to the static CTEMASK. 983 984 The next step of mask construction is to examine the flat and dark 985 models, and exclude pixels that appear to be poorly corrected by these 986 models. The DARKMASK process looks for pixels that are more than 987 $8\sigma$ discrepant in $10\%$ of the 100 input dark frame images 988 after those images have had the dark model applied to them. These 989 pixels are assumed to be unstable with respect to the dark model, and 990 have the DARK bit set in the static mask, indicating that they are 991 unreliable in scientific observing. Similarly, the FLATMASK process 992 looks for pixels that are $3\sigma$ discrepant in the same fraction of 993 16 input flat field images after both the dark and flat models have 994 been applied. Those pixels that do not follow the flat field model of 995 the rest of image are assigned the FLAT mask bit in the static mask, 996 removing the pixels that cannot be corrected to a linear response. 997 998 The final step of mask construction is to examine the detector for 999 bright columns and other static pixel issues. This is first done by 1000 processing a set of 100 \ips{} filter science images in the same fashion as 1001 for the DARKMASK. A median image is constructed from these inputs 1002 along with the per-pixel variance. These images are used to identify 1003 pixels that have unexpectedly low variation between all inputs, as 1004 well as those that significantly deviate from the global median value. 1005 Once this initial set of bad pixels is identified, a $3\times{}3$ 1006 pixel triangular kernel is convolved with the initial set, and any 1007 convolved pixel with value greater than 1 is assigned to the static 1008 mask. This does an excellent job of removing the majority of the 1009 problem pixels. A subsequent manual inspection allows human 1010 interaction to identify other inconsistent pixels including the 1011 vignetted regions around the edge of the detector. 1012 1013 Figure \ref{fig:static mask} shows an example of the static mask for 1014 the full GPC1 field of view. Table \ref{tab:mask_values} lists the 1015 bit mask values used for the different sources of masking. 1016 1017 \begin{figure} 1018 \centering 1019 \includegraphics[width=0.9\hsize,angle=0,clip]{images/gpc1_mask_indexed.png} 1020 \label{fig:static mask} 1021 1022 \caption{Image map of the GPC1 static mask. The CTE regions are clearly visible as roughly triangular patches covering the corners of some OTAs. Some entire cells are masked, including an entire column of cells on OTA14. Calcite cells remove large areas from OTA17 AND OTA76.} 1023 \end{figure} 1024 1025 \begin{deluxetable}{ccl} 1026 \tablecolumns{3} 1027 \tablewidth{0pc} 1028 \tablecaption{GPC1 Mask Values} 1029 \tablehead{\colhead{Mask Name} & \colhead{Mask Value} & \colhead{Description}} 1030 \startdata 1031 DETECTOR & 0x0001 & A detector defect is present. \\ 1032 FLAT & 0x0002 & The flat field model does not calibrate the pixel reliably. \\ 1033 DARK & 0x0004 & The dark model does not calibrate the pixel reliably. \\ 1034 BLANK & 0x0008 & The pixel does not contain valid data. \\ 1035 CTE & 0x0010 & The pixel has poor charge transfer efficiency. \\ 1036 SAT & 0x0020 & The pixel is saturated. \\ 1037 LOW & 0x0040 & The pixel has a lower value than expected. \\ 1038 SUSPECT & 0x0080 & The pixel is suspected of being bad. \\ 1039 BURNTOOL & 0x0080 & The pixel contain an burntool repaired streak. \\ 1040 CR & 0x0100 & A cosmic ray is present. \\ 1041 SPIKE & 0x0200 & A diffraction spike is present. \\ 1042 GHOST & 0x0400 & An optical ghost is present. \\ 1043 STREAK & 0x0800 & A streak is present. \\ 1044 STARCORE & 0x1000 & A bright star core is present. \\ 1045 CONV.BAD & 0x2000 & The pixel is bad after convolution with a bad pixel. \\ 1046 CONV.POOR& 0x4000 & The pixel is poor after convolution with a bad pixel. \\ 1047 MARK & 0x8000 & An internal flag for temporarily marking a pixel. \\ 1048 \enddata 1049 \label{tab:mask_values} 1050 \end{deluxetable} 1051 1052 \subsubsection{Dynamic masks} 1053 \label{sec:dynamic_masks} 1054 1055 In addition to the static mask that removes the constant detector 1056 defects, we also generate a set of dynamic masks that change with the 1057 astronomical features in the image. These masks are advisory in 1058 nature, and do not completely exclude the pixel from further 1059 processing consideration. The first of these dynamic masks is the 1060 burntool advisory mask mentioned above. These pixels are included for 1061 photometry, but are rejected more readily in the stacking and 1062 difference image construction, as they are more likely to have small 1063 deviations due to imperfections in the burntool correction. 1064 1065 The remaining dynamic masks are not generated until the IPP 1066 \ippstage{camera} stage, at which point all object photometry is 1067 complete, and an astrometric solution is known for the exposure. This 1068 added information provides the positions of bright sources based on 1069 the reference catalog, including those that fall slightly out of the 1070 detector field of view or within the inter chip gaps, where internal 1071 photometry may not identify them. These bright sources are the origin 1072 for many of the image artifacts that the dynamic mask identifies and 1073 excludes. 1074 1075 \subsubsubsection{Electronic crosstalk ghosts} 1076 \label{sec:crosstalk} 1077 1078 Due to electrical crosstalk between the flex cables connecting the 1079 individual detector OTA devices, ghost objects can be created by the 1080 presence of a bright source at a different position on the camera. 1081 Table \ref{tab:crosstalk_rules} summarizes the list of known crosstalk 1082 rules, with an estimate of the magnitude difference between the source 1083 and ghost. For all of the rules, any cell $v$ within the specified 1084 column of cells on any of the OTAs in the specified column of OTAs $Y$ 1085 creates the ghost in the same $v$ and $Y$ in the target column of 1086 cells and OTAs. In each of these cases, a source object with an 1087 instrumental magnitude brighter than -14.47 creates a ghost object 1088 many orders of magnitude fainter at the target location. The cell 1089 (x,y) pixel coordinate is identical between source and ghost, as a 1090 result of the transfer occurring as the devices are read. A circular 1091 mask is added to the ghost location with radius $R = 3.44 \left(-14.47 1092 - m_{source, instrumental}\right)$ pixels. Any objects in the 1093 photometric catalog found at the location of the ghost mask have the 1094 GHOST mask bit set, marking the object as a likely ghost. The 1095 majority of the crosstalk rules are bi-directional, with a source in 1096 either position creating a ghost at the corresponding crosstalk target 1097 position. The two faintest rules are uni-directional, due to 1098 differences in the electronic path for the crosstalk. 1099 1100 For the very brightest sources ($m_{instrumental} < -15$), there can 1101 be crosstalk ghosts between all columns of cells during the readout. 1102 These ``bleed'' ghosts were originally identified as ghosts of the 1103 saturation bleeds appearing in the neighboring cells, and as such, the 1104 masking for these objects puts a rectangular mask down from top to 1105 bottom of cells in all columns that are in the same row of cells as 1106 the bright source. The width of this box is a function of the source 1107 magnitude, with $W = 5 * \left(-15 - m_{source, instrumental}\right)$ 1108 pixels. 1109 1110 \begin{deluxetable}{lllc} 1111 \tablecolumns{4} 1112 \tablewidth{0pc} 1113 \tablecaption{GPC1 Crosstalk Rules} 1114 \tablehead{\colhead{Type}&\colhead{Source OTA/Cell}&\colhead{Ghost OTA/Cell}&\colhead{$\Delta m$}} 1115 \startdata 1116 Inter-OTA & OTA2Y XY3v & OTA3Y XY3v & 6.16 \\ 1117 & OTA3Y XY3v & OTA2Y XY3v & \\ 1118 & OTA4Y XY3v & OTA5Y XY3v & \\ 1119 & OTA5Y XY3v & OTA4Y XY3v & \\ 1120 Intra-OTA & OTA2Y XY5v & OTA2Y XY6v & 7.07 \\ 1121 & OTA2Y XY6v & OTA2Y XY5v & \\ 1122 & OTA5Y XY5v & OTA5Y XY6v & \\ 1123 & OTA5Y XY6v & OTA5Y XY5v & \\ 1124 One-way & OTA2Y XY7v & OTA3Y XY2v & 7.34 \\ 1125 & OTA5Y XY7v & OTA4Y XY2v & \\ 1126 \enddata 1127 \label{tab:crosstalk_rules} 1128 \end{deluxetable} 1129 1130 1131 \subsubsubsection{Optical ghosts} 1132 \label{sec:optical_ghosts} 1133 1134 Due to imperfections in the anti-reflective coating on the optical 1135 surfaces of GPC1, bright sources can also result in large out of focus 1136 objects, particularly in the \gps{} filter data. These objects are the 1137 result of light reflecting back off the surface of the detector, 1138 reflecting again off the lower surfaces of the optics (particularly 1139 the L1 corrector lens), and then back down onto the focal plane. Due 1140 to the extra travel distance, the resulting source is out of focus and 1141 elongated along the radial direction of the camera focal plane. These 1142 optical ghosts can be modeled in the focal plane coordinates (L,M) 1143 which has its origin at the center of the focal plane. In this 1144 system, a bright object at location (L,M) on the focal plane creates a 1145 reflection ghost on the opposite side of the optical axis at (-L,-M). 1146 The exact location is fit as a third order polynomial in the focal 1147 plane L and M directions (as listed in Table \ref{tab:ghost_centers}). 1148 An elliptical annulus mask is constructed at the expected ghost 1149 location, with the major and minor axes defined by linear functions of 1150 the ghost distance from the optical axis, and oriented with the 1151 ellipse major axis is along the radial direction (Table 1152 \ref{tab:ghost_radii}). All stars brighter than a filter-dependent 1153 threshold (listed in Table \ref{tab:ghost_magnitudes}) have such masks 1154 constructed. 1155 1156 \begin{deluxetable}{lcc} 1157 \tablecolumns{3} 1158 \tablewidth{0pc} 1159 \tablecaption{Optical Ghost Center Transformations} 1160 \tablehead{\colhead{Polynomial Term}&\colhead{L center}&\colhead{M center}} 1161 \startdata 1162 $x^0 y^0$ & -1.215661e+02 & 2.422174e+01 \\ 1163 $x^1 y^0$ & 1.321875e-02 & 4.170486e-04 \\ 1164 $x^2 y^0$ & -4.017026e-09 & -1.934260e-08 \\ 1165 $x^3 y^0$ & 1.148288e-10 & -1.173657e-12 \\ 1166 $x^0 y^1$ & -1.908074e-03 & 1.189352e-02 \\ 1167 $x^1 y^1$ & 8.479150e-08 & -9.256748e-08 \\ 1168 $x^2 y^1$ & 1.635732e-11 & 1.140772e-10 \\ 1169 $x^0 y^2$ & 2.625405e-08 & 8.123932e-08 \\ 1170 $x^1 y^2$ & 1.125586e-10 & 1.328378e-11 \\ 1171 $x^0 y^3$ & 2.912432e-12 & 1.170865e-10 \\ 1172 \enddata 1173 \label{tab:ghost_centers} 1174 \end{deluxetable} 1175 1176 \begin{deluxetable}{lcccc} 1177 \tablecolumns{5} 1178 \tablewidth{0pc} 1179 \tablecaption{Optical Ghost Annulus Axis Length} 1180 \tablehead{\colhead{Radial Order}&\colhead{Inner Major Axis}&\colhead{Inner Minor Axis}& \colhead{Outer Major Axis}&\colhead{Outer Minor Axis}} 1181 \startdata 1182 $r^0$ & 3.926693e+01 & 5.287548e+01 & 7.928722e+01 & 1.314265e+02 \\ 1183 $r^1$ & 5.325759e-03 &-2.191669e-03 & 1.722181e-02 & -2.627153e-03 \\ 1184 \enddata 1185 \label{tab:ghost_radii} 1186 \end{deluxetable} 1187 1188 \begin{deluxetable}{lc} 1189 \tablecolumns{2} 1190 \tablewidth{0pc} 1191 \tablecaption{Optical Ghost Magnitude Limits} 1192 \tablehead{\colhead{Filter}&\colhead{$m_{inst}$}} 1193 \startdata 1194 \gps{} & -16.5 \\ 1195 \rps{} & -20.0 \\ 1196 \ips{} & -25.0 \\ 1197 \zps{} & -25.0 \\ 1198 \yps{} & -25.0 \\ 1199 \wps{} & -20.0 \\ 1200 \enddata 1201 \label{tab:ghost_magnitudes} 1202 \end{deluxetable} 1203 1204 1205 \begin{figure} 1206 \centering 1207 \includegraphics[width=0.9\hsize,angle=0,clip]{images/full_fpa_ghosts.jpg} 1208 \caption{Example of the full GPC1 field of view illustrating the sources and destinations of optical ghosts on exposure o5677g0123o (2011-04-26, 43s \gps{} filter). The bright stars on OTA33 and OTA44 result in nearly circular ghosts on the opposite OTA. In contrast, the trio of stars on OTA11 result in very elongated ghosts on OTA66.} 1209 \end{figure} 1210 1211 \subsubsubsection{Optical glints} 1212 \label{sec:glints} 1213 1214 Prior to 2010-08-24, a reflective surface at the edge of the camera 1215 aperture was incompletely screened to light passing through the 1216 telescope. Sources brighter than $m_{inst} = -21$ that fell on this 1217 reflective surface resulted in light being scattered across the 1218 detector surface in a long narrow glint. This surface was physically 1219 masked on 2010-08-24, removing the possibility of glints in subsequent 1220 data, but that taken prior have an advisory dynamic mask constructed 1221 when a reference source falls on the focal plane within one degree of 1222 the detector edge. This mask is 150 pixels wide, with length $L = 1223 2500 \left(-20 - m_{inst}\right)$ pixels. These glint masks are 1224 constructed by selecting sufficiently bright sources in the reference 1225 catalog that fall within rectangular regions around each edge of the 1226 GPC1 camera. These regions are separated from the edge of the camera 1227 by 17 arcminutes, and extend outwards an additional degree. 1228 1229 \begin{figure} 1230 \centering 1231 \includegraphics[width=0.9\hsize,angle=0,clip]{images/glint_example_o5379g0103o.jpg} 1232 \caption{Example of a glint on exposure o5379g0103o (2010-07-02, 45s \ips{} filter). The source star out of the field of view creates a long reflection that extends through OTA73 and OTA63.} 1233 \end{figure} 1234 1235 \subsubsubsection{Diffraction Spikes and Saturated Stars} 1236 \label{sec:diffraction_spikes} 1237 1238 Bright sources also form diffraction spikes that are dynamically 1239 masked. These are filter independent, and are modeled as rectangles 1240 with length $L = 10^{0.096 * (7.35 - m_{instrumental})} - 200$ and 1241 width $W = 8 + (L - 200) * 0.01$, with negative values indicating no 1242 mask is constructed, as the source is likely too faint to produce the 1243 feature. These spikes are dependent on the camera rotation, and are 1244 oriented at $\theta = n * \frac{\pi}{2} - \mathrm{ROTANGLE} + 0.798$, 1245 based on the header keyword. 1246 1247 The cores of stars that are saturated are masked as well, with a 1248 circular mask radius $r = 10.15 * (-15 - m_{instrumental})$. An 1249 example of a saturated star, with the masked regions for the 1250 diffraction spikes and core saturation highlighted, is shown in Figure 1251 \ref{fig:saturated star}. 1252 1253 \begin{figure} 1254 \centering 1255 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o6802g0338o_XY51_b1.jpg} 1256 \caption{Example of saturated star, with diffraction spikes extending from the core on exposure o6802g0338o, OTA51 (2014-05-25, 45s \gps{} filter).} 1257 \label{fig:saturated star} 1258 \end{figure} 1259 1260 \subsubsection{Masking Fraction} 1261 \label{sec:masking_fraction} 1262 1263 For the full field of view that falls on the sixty OTAs, 14.7\% of all 1264 pixels are masked. The large fraction of this masking is due to 1265 regions that fall within the vignetted region. Defining the diameter 1266 of the unvignetted region to have be 3 degrees, and excluding pixels 1267 that fall beyond this point reduces the static masking fraction to 1268 9.7\%. 1269 1270 Unfortunately, due to the design of the OTAs and readout cells, a 1271 non-negligible fraction of the field of view falls onto an area that 1272 does not have a detector pixel. For a given OTA mosaicked to a 1273 $4846\times{}4868$ pixel image, the 64 $590\times{}598$ pixel readout 1274 cells cover 95.7\% of the OTA area, providing an additional 4.3\% 1275 masking in the unvignetted field of view due to the absence of a 1276 detector pixel. 1277 1278 For the inter-chip gap area loss, we use two field of view 1279 calculations to estimate the masking fraction. The reference field of 1280 view of GPC1 is 3 degrees, which at the nominal plate scale of 0.258 1281 arcseconds per pixel, translates to a 20930 FPA pixel radius. Summing 1282 mask fractions from these three contributions within the unvignetted 1283 field of view results in an average of $\sim 20\%$ masking fraction 1284 across the field of view. Dynamic masking adds an additional $2-3\%$ 1285 on average, with advisory burntool masking contributing the largest 1286 single component. Table \ref{tab:mask fraction} contains estimates of 1287 the mask fraction in the GPC1 detector footprint by the sources of the 1288 masking for the 3 degree field of view, as well as for a larger 3.25 1289 degree field of view that allows addition unvignetted regions in the 1290 corners to contribute. 1291 1292 \begin{deluxetable}{lcc} 1293 \tablecolumns{3} 1294 \tablewidth{0pc} 1295 \tablecaption{Mask Fraction by Mask Source} 1296 \tablehead{\colhead{Mask Source}&\colhead{3 Degree FOV}&\colhead{3.25 Degree FOV}} 1297 \startdata 1298 No pixel & 4.44\% & 9.47\% \\ 1299 Detector defect & 6.37\% & 7.91\% \\ 1300 CTE issue & 2.62\% & 3.13\% \\ 1301 \enddata 1302 \label{tab:mask fraction} 1303 \end{deluxetable} 1304 1305 \subsection{Background subtraction} 1306 \label{sec:background} 1307 1308 Once all other detrending is done, the pixels from each cell are 1309 mosaicked into the full $4846\times{}4868$ pixel OTA image. A 1310 background model for the full OTA is then determined prior to the 1311 photometric analysis. The mosaicked image is subdivided into 1312 $800\times{}800$ pixel segments that define each pixel of the 1313 background model, with the segments centered on the image center, and 1314 overlapping adjacent subdivisions by 400 pixels. These overlaps help 1315 smooth the background model, as adjacent model pixels share input 1316 pixels. 1317 1318 From each subdivision, 10000 random unmasked pixels are drawn. In the 1319 case where the mask fraction is large (such as on OTAs near the edge 1320 of the field of view), and there are insufficient unmasked pixels to 1321 meet this criterion, all possible unmasked pixels are used instead. 1322 If this number is still small (less than 100 good pixels), the 1323 subdivision does not have a background model calculated, and instead, 1324 the value assigned to that model pixel is set as the average of the 1325 adjacent model pixels. This allows up to eight neighboring background 1326 values to be used to patch these bad pixels. 1327 1328 For the remaining subdivisions that have sufficient unmasked pixels 1329 for the background to be measured, the pixel values are used to 1330 calculate a set of robust statistics for the initial background guess. 1331 The minimum and maximum of the values are found, and checked to ensure 1332 that these are not the same value, which would indicate some problem 1333 with the input values. The values are then inserted into a histogram 1334 with 1000 bins between the minimum and maximum values, and again 1335 checked for issues with the inputs by ensuring that the bin with the 1336 most input pixels does not contain more than half of the input values. 1337 In this case, the minimum and maximum do not constrain the true 1338 distribution of the input values well, and any values outside of the 1339 20 bins closest to the bin with the peak are masked for future 1340 consideration. A cumulative distribution is then constructed from the 1341 histogram, which saves the computational cost of sorting all the input 1342 values. The bins containing the 50-percentile point, as well as the 1343 15.8\%, 84.1\% ($\pm 1 \sigma$), 30.8\%, 69.1\% ($\pm 0.5 \sigma$), 1344 2.2\%, and 97.7\% ($\pm 2 \sigma$) points are identified in this 1345 cumulative histogram. These bins, and the two bins to either side are 1346 then linearly interpolated to identify the pixel value corresponding 1347 to these points in the distribution. The 50\% point is set as the 1348 median of the pixel distribution, with the standard deviation of the 1349 distribution set as the median of the $\sigma$ values calculated from 1350 the $0.5 * (\sigma_{+1} - \sigma_{-1})$, $\sigma_{+0.5} - 1351 \sigma_{-0.5}$, and $0.25 * (\sigma_{+2} - \sigma_{-2})$ differences. 1352 If this measured standard deviation is smaller than 3 times the bin 1353 size, then all points more than 25 bins away from the calculated 1354 median are masked, and the process is repeated until the bin size is 1355 sufficiently small to ensure that the distribution width is well 1356 sampled. Once this iterative process converges, or 20 iterations are 1357 run, the 25- and 75-percentile values are found by interpolating the 5 1358 bins around the expected bin as well, and the count of the number of 1359 input values within this inner 50-percentile region, $N_{50}$ is 1360 calculated. 1361 1362 These initial statistics are then used as the starting guesses for a 1363 second calculation of the background level that attempts to fit the 1364 distribution with a Gaussian. All pixels that were masked in the 1365 initial calculation are unmasked, and a histogram is again constructed 1366 of the values, with a bin size set to $\sigma_{guess} / \left( N_{50} / 1367 500 \right)$. With this bin size, we expect that a bin at $\pm 2 1368 \sigma$ will have approximately 50 input points, which gives a 1369 Poissonian signal to noise estimate around 7. In the case where 1370 $N_{50}$ is small (due to a poorly populated input image), this bin 1371 size is fixed to be no larger than the guess of the standard 1372 deviation. The endpoints of the histogram are clipped based on the 1373 input guesses, such that any input point with a value more than $5 1374 \sigma_{guess}$ away from the input mean are excluded from 1375 consideration. 1376 1377 Two second order polynomial fits are then performed to the logarithm 1378 of the histogram counts set at the midpoint of each bin. The first 1379 fit considers the ``lower half'' of the distribution, under the 1380 assumption that deviations from a normal distribution are caused by 1381 real astrophysical sources that will be brighter than the true 1382 background level. From the bin with most pixel values, the lower 1383 bound is set by searching for the first bin from the peak that has 1384 fewer inputs than 25\% of the peak. A similar search is performed for 1385 the upper bound, but with a criterion that the bin has fewer than 50\% 1386 of the peak. On both sides of the peak, the bounds are adjusted to 1387 ensure that at least seven bins, equally distributed around the peak, 1388 are used. The second fit is symmetric, fitting both sides of the 1389 distribution out to the point where the bin contains fewer than 15\% 1390 of the peak value. The same seven-bin constraint is used for this 1391 fit. The Gaussian mean and standard deviation are calculated from the 1392 polynomial coefficients, and the symmetric fit results are accepted 1393 unless the lower-half fit results in a smaller mean. This process is 1394 repeated again if the calculated standard deviation is not larger than 1395 75\% of the initial guess (suggesting an issue with the initial bin 1396 size). 1397 1398 With this two-stage calculation performed across all subdivisions of 1399 the mosaicked OTA image, and missing model pixels filled with the 1400 average of their neighbors, the final background model is stored on 1401 disk as a $13\times{}13$ image with header entries listing the binning 1402 used. The full scale background image is then constructed by 1403 bilinearly interpolating this binned model, and this is subtracted 1404 from the science image. Each object in the photometric catalog has a 1405 SKY and SKY\_SIGMA value that is the evaluation of this model at the 1406 location of that object. 1407 1408 Although this background modeling process works well for most of the 1409 sky, astronomical sources that are large compared to the 1410 $800\times{}800$ pixel subdivisions can bias the calculated background 1411 level high, resulting in an oversubtraction near that object. The 1412 most common source that can cause this issue are large galaxies, which 1413 can have their own features modeled as being part of the background. 1414 For the specialized processing of M31, which covers an entire pointing 1415 of GPC1, the measured background was added back to the \ippstage{chip} 1416 stage images, but this special processing was not used for the large 1417 scale $3\Pi$ PV3 reduction. 220 1418 221 1419 \section{GPC1 Detrend Construction} 222 1420 \label{sec:detrend construction} 223 1421 224 The detrends for GPC1 are all constructed in similar ways. A series 225 of appropriate exposures is selected from the database, and processed 226 with the \ippprog{ppImage} program. This program is used for the 227 \ippstage{chip} stage processing as well, and is designed to do image 228 processing. The extent of this processing is dependent on the order 229 in which the detrend is applied to science data. In general, the 230 input exposures to the detrend have all prior stages of detrend 231 processing applied. Table \ref{tab:detrend ppImage} summarizes stages 232 applied for the detrends we construct. 1422 The various detrends for GPC1 are constructed in similar ways. A 1423 series of appropriate exposures is selected from the database, and 1424 processed with the \ippprog{ppImage} program. This program is used 1425 for the \ippstage{chip} stage processing as well, and is designed to 1426 do multiple image processing operations. The extent of this 1427 processing is dependent on the order in which the detrend to be 1428 constructed is applied to science data. In general, the input 1429 exposures to the detrend have all prior stages of detrend processing 1430 applied. Table \ref{tab:detrend ppImage} summarizes stages applied 1431 for the detrends we construct. 233 1432 234 1433 Once the input data has been prepared, the \ippprog{ppMerge} program … … 241 1440 format of the detrend under construction, and after construction, are 242 1441 applied to the processed input data. This creates a set of residual 243 files that can be checked to determine if the newly created detrend244 works correctly.245 246 Th eprocess of detrend construction and testing can be iterated, with1442 files that are checked to determine if the newly created detrend 1443 correctly removes the detector dependent signal. 1444 1445 This process of detrend construction and testing can be iterated, with 247 1446 individual exposures excluded if they are found to be contaminating 248 the output. If the final detrend is considered sufficient, then the249 iterations are stopped and the detrend is finalized by selecting the 250 date range to which it applies. This allows subsequent science 251 processing to select the detrends needed based on the observation 252 date. Table \ref{tab:detrend list} lists the set of detrends used in 253 the PV3 processing.1447 the output. If the final detrend has sufficiently small residuals, 1448 then the iterations are stopped and the detrend is finalized by 1449 selecting the date range to which it applies. This allows subsequent 1450 science processing to select the detrends needed based on the 1451 observation date. Table \ref{tab:detrend list} lists the set of 1452 detrends used in the PV3 processing. 254 1453 255 1454 \begin{deluxetable}{lcccc} … … 321 1520 & 964 & 2010-09-01 00:00:00 & 2011-05-01 00:00:00 & \\ 322 1521 & 965 & 2011-05-01 00:00:00 & & \\ 323 FLAT & 300 & 2009-12-09 00:00:00 & & g filter \\ 324 & 301 & 2009-12-09 00:00:00 & & r filter \\ 325 & 302 & 2009-12-09 00:00:00 & & i filter \\ 326 & 303 & 2009-12-09 00:00:00 & & z filter \\ 327 & 304 & 2009-12-09 00:00:00 & & y filter \\ 1522 FLAT & 300 & 2009-12-09 00:00:00 & & \gps{} filter \\ 1523 & 301 & 2009-12-09 00:00:00 & & \rps{} filter \\ 1524 & 302 & 2009-12-09 00:00:00 & & \ips{} filter \\ 1525 & 303 & 2009-12-09 00:00:00 & & \zps{} filter \\ 1526 & 304 & 2009-12-09 00:00:00 & & \yps{} filter \\ 1527 & 305 & 2009-12-09 00:00:00 & & \wps{} filter \\ 328 1528 FRINGE & 296 & 2009-12-09 00:00:00 & & \\ 329 1529 ASTROM & 1064 & 2008-05-06 00:00:00 & & \\ … … 333 1533 \end{deluxetable} 334 1534 335 \section{GPC1 Detrend Details}336 \label{sec:detrending}337 338 Ensuring a consistent and uniform detector response across the339 three-degree diameter field of view of the GPC1 camera is essential to340 a well calibrated survey. Many standard image detrending steps are341 done for GPC1, with overscan subtraction removing the detector bias342 level, dark frame subtraction to remove temperature and exposure time343 dependent detector glows, and flat field correction to remove pixel to344 pixel response functions. We also construct fringe correction for the345 reddest data in the y filter, to remove the interference patterns that346 arise in that filter due to the variations in the thickness of the347 detector surface.348 349 These corrections, however, assume that the detector response is350 linear across the full range of values. This is not universally the351 case with GPC1, and this requires an additional set of detrending352 steps to remove these non-linear responses. The first of these is the353 \ippprog{burntool} correction, which removes the persistence trails354 caused by the incomplete transfer of charge along the readout columns.355 This bright-end nonlinearity is generally only evident for the356 brightest stars, as only pixels that are at or beyond the saturation357 point of the detector have this issue. More widespread is the358 non-linearity at the faint end of the pixel range. Some readout cells359 and some readout cell edge pixels experience a sag relative to linear360 at low illumination, such that faint pixels appear fainter than361 expected. The correction to this requires amplifying the pixel values362 in these regions to match the expected model.363 364 The final non-linear response issue has no good option for correction.365 Large regions of some OTA cells experience charge transfer issues,366 making them unusable to be used for science observations. These367 regions are therefore masked in processing, with these CTE regions368 making up the largest fraction of masked pixels on the detector.369 Other regions are masked for other regions, such as static bad pixel370 features or temporary readout masking caused by issues in the camera371 electronics that make these regions unreliable. These all contribute372 to the detector mask, which is augmented in each exposure for dynamic373 features that are masked based on the astronomical features within the374 field of view.375 376 For the PV3 processing, all detrending is done by the377 \ippprog{ppImage} program. This program applies the detrends to the378 individual cells, and then an OTA level mosaic is constructed for the379 science image, the mask image, and the variance map image. The single380 epoch photometry is done at this stage as well. The following381 subsections (\ref{sec:burntool} - \ref{sec:background}) detail these382 detrending steps, presented in the order in which they are applied to383 the individual OTA image data.384 385 \subsection{Burntool / Persistence effect}386 \label{sec:burntool}387 388 Pixels that approach the saturation point on GPC1, which varies by389 readout with common values around 60000 DN, cause persistence problems390 on that and subsequent images. During the read out process of an391 image with such a bright pixel, some of the charge associated with it392 is not fully shifted down the detector column toward the amplifier.393 As a result, this charge remains in the starting cell, and is394 partially collected in subsequent shifts, resulting in a ``burn395 trail'' that extends from the center of the bright source away from396 the amplifier (vertically along the pixel columns toward the top of397 the cell).398 399 This incomplete charge shifting in nearly full wells continues as each400 row is read out. This results in a remnant charge being deposited in401 the pixels that the full well was shifted through. In following402 exposures, this remnant charge leaks out, resulting in a trail that403 extends from the initial location of the bright source on the previous404 image towards the amplifier (vertically down along the pixel column).405 This remnant charge can remain on the detector for up to thirty406 minutes, requiring the locations of these ``burns'' be retained407 between exposures.408 409 Both of these types of persistence trails are detected and optionally410 repaired via the \ippprog{burntool} program. This program does an411 initial scan of the images, and identifies objects with pixel values412 brighter than a threshold of 30000 DN. The trail from that star is413 fit with a one-dimensional power law in each pixel column above that414 threshold, based on empirical evidence that this is the functional415 form of this persistence effect. This also matches the expectation416 that a constant fraction of charge is incompletely transferred at each417 shift beyond the persistence threshold. Once this fit is done, the418 model can subtracted from the image, and the location of the star is419 stored in a table along with the exposure PONTIME, which denotes the420 number of seconds since the detector was last powered on and provides421 an internally consistent time scale.422 423 For subsequent exposures, the table associated with the previous image424 is read in, and after correcting trails from the stars on the new425 image, the positions of the bright stars from the table are used to426 check for remnant trails on the image. These are fit and subtracted427 using a one-dimensional exponential model, again based on empirical428 studies. If a significant model with is determined, then this429 location is retained in the image output table. If not, the old burn430 is allowed to expire.431 432 An issue with this method of correcting the persistence trails is that433 it is based on fits to the raw image data, which may have other signal434 sources not determined by the persistence effect. The presence of435 other stars or artifacts along the path of the burn can result in a436 poor model to be determined, resulting in either an over- or437 under-subtraction of the persistence burn. For this reason, the image438 mask is marked with a value indicating that this correction has been439 applied. These pixels are not fully excluded, but they are marked as440 suspect, which allows them to be excluded from consideration in441 subsequent stages, such as image stacking.442 443 Another concern is that the cores of very bright stars are deformed by444 this process, as the burntool fitting subtracts flux445 from only one side of the star. As most stars that result in burns already446 have saturated cores, they are already ignored for the purpose of447 PSF determination and are flagged as saturated by the photometry448 reduction.449 450 \begin{figure}451 \centering452 \begin{minipage}{0.45\hsize}453 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt_trail.png}454 % \caption{(a)}455 % \end{subfigure}%456 % \begin{subfigure}[]{.45\hsize}457 \end{minipage}%458 \begin{minipage}{0.45\hsize}459 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt_trail.png}460 % \caption{(b)}461 % \end{subfigure}462 \end{minipage}463 464 \caption{Example of a profile cut along the y-axis through a bright star on exposure o5677g0123o OTA11 in cell xy60 (left panel) and on the subsequent exposure o5677g0124o (right panel). In both figures, the green points show the image corrected with all appropriate detrending steps, but without burntool applied, illustrating the amplitude of the persistence trails. The red points show the same data after the burntool correction, which reduce the impact of these features. Both exposures are in the g-filter with exposure times of 43s}465 \end{figure}466 467 \begin{figure}468 \centering469 \begin{minipage}{0.45\hsize}470 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_nobt.png}471 % \caption{(a)}472 % \end{subfigure}%473 % \begin{subfigure}[]{.45\hsize}474 \end{minipage}%475 \begin{minipage}{0.45\hsize}476 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_nobt.png}477 % \caption{(b)}478 % \end{subfigure}479 \end{minipage}480 \begin{minipage}{0.45\hsize}481 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt.png}482 % \caption{(a)}483 % \end{subfigure}%484 % \begin{subfigure}[]{.45\hsize}485 \end{minipage}%486 \begin{minipage}{0.45\hsize}487 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt.png}488 % \caption{(b)}489 % \end{subfigure}490 \end{minipage}491 \caption{Example of OTA11 cell xy60 on exposures o5677g0123o (left) and o5677g0124o (right). The top panels show the image with all appropriate detrending steps, but with burntool, and the bottom show the same with burntool applied. There is some slight over subtraction in fitting the initial trail, but the impact of the trail is greatly reduced in both exposures.}492 \end{figure}493 494 \subsection{Masking}495 \label{sec:masking}496 497 \subsubsection{Static Masks}498 \label{sec:static_masks}499 500 Due to the large size of the detector, it is expected that there501 are a number of pixel defects that do not have the detection502 sensitivity on par with their neighbors. To remove these pixels, we503 have constructed a static mask that identifies the known defects.504 This mask is constructed in three phases.505 506 First, a CTEMASK is constructed to mask out regions in which the507 charge transfer efficiency is low compared to the rest of the508 detector. Twenty-five of the sixty OTAs in GPC1 show some evidence of509 CTE issues, with this pattern showing up (to varying degrees) in510 roughly triangular patches on the OTA due to defects in the511 semiconductor manufacturing. To generate the mask for these regions,512 a sample set of 26 evenly illuminated flat field images were measured513 to produce a map of the image variance in 20x20 pixel bins. As the514 flat image is expected to illuminate the image uniformly, the expected515 variances in each bin should be Poissonian distributed with the flux516 level. However, in regions with CTE issues, adjacent pixels are not517 independent, as the charge in those pixels is more free to spread.518 This reduces the pixel-to-pixel differences, resulting in a lower than519 expected variance. All regions with variance less than half the520 average image level are added to the static CTEMASK.521 522 The next step of mask construction is to examine the flat and dark523 models, and exclude pixels that appear to be poorly corrected by these524 models. The DARKMASK process looks for pixels that are more than525 $8\sigma$ discrepant in $10\%$ of the 100 input dark frame images526 after those images have had the dark model applied to them. These527 pixels are assumed to be unstable with respect to the dark model, and528 have the DARK bit set in the static mask, indicating that they are529 unreliable in scientific observing. Similarly, the FLATMASK process530 looks for pixels that are $3\sigma$ discrepant in the same fraction of531 16 input flat field images after both the dark and flat models have532 been applied. Those pixels that do not follow the flat field model of533 the rest of image are assigned the FLAT mask bit in the static mask,534 removing the pixels that cannot be corrected to a linear response.535 536 The final step of mask construction is to examine the detector for537 bright columns and other static pixel issues. This is first done by538 processing a set of 100 i filter science images in the same fashion as539 for the DARKMASK. A median image is constructed from these inputs540 along with the per-pixel variance. These images are used to identify541 pixels that have unexpectedly low variation between all inputs, as542 well as those that significantly deviate from the global median value.543 Once this initial set of bad pixels is identified, a $3\times{}3$544 pixel triangular kernel is convolved with the initial set, and any545 convolved pixel with value greater than 1 is assigned to the static546 mask. This does an excellent job of removing the majority of the547 problem pixels. A subsequent manual inspection allows human548 interaction to identify other inconsistent pixels including the549 vignetted regions around the edge of the detector.550 551 Figure \ref{fig:static mask} shows an example of the static mask for552 the full GPC1 field of view. Table \ref{tab:mask_values} lists the553 bit mask values used for the different sources of masking.554 555 \begin{figure}556 \centering557 \includegraphics[width=0.9\hsize,angle=0,clip]{images/gpc1_mask_indexed.png}558 \label{fig:static mask}559 560 \caption{Image map of static mask. color coded based on mask reason? It won't be visible at true pixel scale.}561 \end{figure}562 563 \begin{deluxetable}{ccl}564 \tablecolumns{3}565 \tablewidth{0pc}566 \tablecaption{GPC1 Mask Values}567 \tablehead{\colhead{Mask Name} & \colhead{Mask Value} & \colhead{Description}}568 \startdata569 DETECTOR & 0x0001 & A detector defect is present. \\570 FLAT & 0x0002 & The flat field model does not calibrate the pixel reliably. \\571 DARK & 0x0004 & The dark model does not calibrate the pixel reliably. \\572 BLANK & 0x0008 & The pixel does not contain valid data. \\573 CTE & 0x0010 & The pixel has poor charge transfer efficiency. \\574 SAT & 0x0020 & The pixel is saturated. \\575 LOW & 0x0040 & The pixel has a lower value than expected. \\576 SUSPECT & 0x0080 & The pixel is suspected of being bad. \\577 BURNTOOL & 0x0080 & The pixel contain an burntool repaired streak. \\578 CR & 0x0100 & A cosmic ray is present. \\579 SPIKE & 0x0200 & A diffraction spike is present. \\580 GHOST & 0x0400 & An optical ghost is present. \\581 STREAK & 0x0800 & A streak is present. \\582 STARCORE & 0x1000 & A bright star core is present. \\583 CONV.BAD & 0x2000 & The pixel is bad after convolution with a bad pixel. \\584 CONV.POOR& 0x4000 & The pixel is poor after convolution with a bad pixel. \\585 MARK & 0x8000 & An internal flag for temporarily marking a pixel. \\586 \enddata587 \label{tab:mask_values}588 \end{deluxetable}589 590 \subsubsection{Dynamic masks}591 \label{sec:dynamic_masks}592 593 In addition to the static mask that removes the constant detector594 level defects, we also generate a set of dynamic masks that change595 with the astronomical features in the image. These masks are advisory596 in nature, and do not completely exclude the pixel from further597 processing consideration. The first of these dynamic masks is the598 burntool advisory mask mentioned above. These pixels are included for599 photometry, but are rejected more readily in the stacking and600 difference image construction, as they are more likely to have small601 deviations due to imperfections in the burntool correction.602 603 The remaining dynamic masks are not generated until the IPP \ippstage{camera}604 stage, at which point all object photometry is complete, and an605 astrometric solution is known for the exposure. This added606 information provides the positions of bright sources based on the607 reference catalog, including those that fall slightly out of the608 detector field of view or within the inter chip gaps, where internal609 photometry may not have identified them. These bright sources are the610 origin for many of the image artifacts that the dynamic mask611 identifies and excludes.612 613 \subsubsection{Electronic crosstalk ghosts}614 \label{sec:crosstalk}615 616 Due to electrical crosstalk between the flex cables connecting the617 individual detector OTA devices, ghost objects can be created due to618 the presence of a bright source at a different position on the camera.619 Table \ref{tab:crosstalk_rules} summarizes the list of known crosstalk620 rules, with an estimate of the magnitude difference between the source621 and ghost. For all of the rules, any cell $v$ within the specified622 column of cells on any of the OTAs in the specified column of OTAs $Y$623 creates the ghost in the same $v$ and $Y$ in the target column of624 cells and OTAs. In each of these cases, a source object brighter than625 -14.47 instrumental magnitude creates a ghost object many orders of626 magnitude fainter at the target location. The cell (x,y) pixel627 coordinate is identical between source and ghost, as a result of the628 transfer occurring as the devices are read. A circular mask is added629 to the ghost location with radius $R = 3.44 \left(-14.47 - m_{source,630 instrumental}\right)$ pixels. Any objects in the photometric631 catalog found at the location of the ghost mask have the GHOST mask632 bit set, marking the object as a likely ghost. The majority of the633 crosstalk rules are bi-directional, with a source in either position634 creating a ghost at the corresponding crosstalk target position. The635 two faintest rules are uni-directional, due to differences in the636 electronic path for the crosstalk.637 638 For the very brightest sources ($m_{instrumental} < -15$), there can639 be crosstalk ghosts between all columns of cells during the readout.640 These ``bleed'' ghosts were originally identified as ghosts of the641 saturation bleeds appearing in the neighboring cells, and as such, the642 masking for these objects puts a rectangular mask down from top to643 bottom of cells in all columns that are in the same row of cells as644 the bright source. The width of this box is a function of the source645 magnitude, with $W = 5 * \left(-15 - m_{source, instrumental}\right)$646 pixels.647 648 \begin{deluxetable}{lllc}649 \tablecolumns{4}650 \tablewidth{0pc}651 \tablecaption{GPC1 Crosstalk Rules}652 \tablehead{\colhead{Type}&\colhead{Source OTA/Cell}&\colhead{Ghost OTA/Cell}&\colhead{$\Delta m$}}653 \startdata654 Inter-OTA & OTA2Y XY3v & OTA3Y XY3v & 6.16 \\655 & OTA3Y XY3v & OTA2Y XY3v & \\656 & OTA4Y XY3v & OTA5Y XY3v & \\657 & OTA5Y XY3v & OTA4Y XY3v & \\658 Intra-OTA & OTA2Y XY5v & OTA2Y XY6v & 7.07 \\659 & OTA2Y XY6v & OTA2Y XY5v & \\660 & OTA5Y XY5v & OTA5Y XY6v & \\661 & OTA5Y XY6v & OTA5Y XY5v & \\662 One-way & OTA2Y XY7v & OTA3Y XY2v & 7.34 \\663 & OTA5Y XY7v & OTA4Y XY2v & \\664 \enddata665 \label{tab:crosstalk_rules}666 \end{deluxetable}667 668 %% \begin{figure}669 %% \centering670 %% \caption{Figure of crosstalk ghost and bright star source. Plot of cut across ghost to illustrate the flat-top shape.}671 %% \end{figure}672 673 \subsubsection{Optical ghosts}674 \label{sec:optical_ghosts}675 % http://arxiv.org/pdf/1207.2513v1.pdf676 677 Due to imperfections in the anti-reflective coating on the optical678 surfaces of GPC1, bright sources can also result in large out of focus679 objects, particularly in the g-filter data. These objects are the680 result of light reflecting back off the surface of the detector,681 reflecting again off the lower surfaces of the optics (particularly682 the L1 corrector lens), and then back down onto the focal plane. Due683 to the extra travel distance, the resulting source is out of focus and684 elongated along the radial direction of the camera focal plane. These685 optical ghosts can be modeled in the focal plane coordinates (L,M)686 which has its origin at the center of the focal plane. In this687 system, a bright object at location (L,M) on the focal plane creates a688 reflection ghost on the opposite side of the optical axis at (-L,-M).689 The exact location is fit as a third order polynomial in the focal690 plane L and M directions (as listed in Table \ref{tab:ghost_centers}).691 An elliptical annulus mask is constructed at the expected ghost692 location, with the major and minor axes defined by linear functions of693 the ghost distance from the optical axis, and oriented with the694 ellipse major axis is along the radial direction (Table695 \ref{tab:ghost_radii}). All stars brighter than a filter-dependent696 threshold (listed in Table \ref{tab:ghost_magnitudes}) have such masks697 constructed.698 699 \begin{deluxetable}{lcc}700 \tablecolumns{3}701 \tablewidth{0pc}702 \tablecaption{Optical Ghost Center Transformations}703 \tablehead{\colhead{Polynomial Term}&\colhead{L center}&\colhead{M center}}704 \startdata705 $x^0 y^0$ & -1.215661e+02 & 2.422174e+01 \\706 $x^1 y^0$ & 1.321875e-02 & 4.170486e-04 \\707 $x^2 y^0$ & -4.017026e-09 & -1.934260e-08 \\708 $x^3 y^0$ & 1.148288e-10 & -1.173657e-12 \\709 $x^0 y^1$ & -1.908074e-03 & 1.189352e-02 \\710 $x^1 y^1$ & 8.479150e-08 & -9.256748e-08 \\711 $x^2 y^1$ & 1.635732e-11 & 1.140772e-10 \\712 $x^0 y^2$ & 2.625405e-08 & 8.123932e-08 \\713 $x^1 y^2$ & 1.125586e-10 & 1.328378e-11 \\714 $x^0 y^3$ & 2.912432e-12 & 1.170865e-10 \\715 \enddata716 \label{tab:ghost_centers}717 \end{deluxetable}718 719 \begin{deluxetable}{lcccc}720 \tablecolumns{5}721 \tablewidth{0pc}722 \tablecaption{Optical Ghost Annulus Axis Length}723 \tablehead{\colhead{Radial Order}&\colhead{Inner Major Axis}&\colhead{Inner Minor Axis}& \colhead{Outer Major Axis}&\colhead{Outer Minor Axis}}724 \startdata725 $r^0$ & 3.926693e+01 & 5.287548e+01 & 7.928722e+01 & 1.314265e+02 \\726 $r^1$ & 5.325759e-03 &-2.191669e-03 & 1.722181e-02 & -2.627153e-03 \\727 \enddata728 \label{tab:ghost_radii}729 \end{deluxetable}730 731 \begin{deluxetable}{lc}732 \tablecolumns{2}733 \tablewidth{0pc}734 \tablecaption{Optical Ghost Magnitude Limits}735 \tablehead{\colhead{Filter}&\colhead{$m_{inst}$}}736 \startdata737 g & -16.5 \\738 r & -20.0 \\739 i & -25.0 \\740 z & -25.0 \\741 y & -25.0 \\742 w & -20.0 \\743 \enddata744 \label{tab:ghost_magnitudes}745 \end{deluxetable}746 747 748 \begin{figure}749 \centering750 \includegraphics[width=0.9\hsize,angle=0,clip]{images/full_fpa_ghosts.jpg}751 \caption{Example of the full GPC1 field of view illustrating the sources and destinations of optical ghosts on exposure o5677g0123o (2011-04-26, 43s g-filter). The bright stars on OTA33 and OTA44 result in nearly circular ghosts on the opposite OTA. In contrast, the trio of stars on OTA11 result in very elongated ghosts on OTA66.}752 \end{figure}753 754 \subsubsection{Optical glints}755 \label{sec:glints}756 Prior to \czwdraft{DATE}, a reflective surface at the edge of the757 camera aperture was incompletely screened to light passing through the758 telescope. Sources brighter than $m = -20$ that fell on this759 reflective surface resulted in light being scattered across the760 detector surface in a long narrow glint. This surface was physically761 masked on \czwdraft{DATE}, removing the possibility of glints in762 subsequent data, but that taken prior have a dynamic mask constructed763 when a reference source falls on the focal plane within one degree of764 the detector edge. This mask is 150 pixels wide, with length $L =765 2500 \left(-20 - m_{inst}\right)$ pixels. \czwdraft{Am I correct that766 this is basically a one-degree edge around the detector?}767 768 %%769 %% GLINT_MAX_MAG F32 -21.0770 %% GLINT.REGION MULTI771 772 %% GLINT.REGION METADATA773 %% REGION STR [-38000:-24000,-20000:+20000]774 %% GLINT.TYPE STR LEFT775 %% END776 777 %% GLINT.REGION METADATA778 %% REGION STR [+24000:+38000,-20000:+20000]779 %% GLINT.TYPE STR RIGHT780 %% END781 782 %% GLINT.REGION METADATA783 %% REGION STR [-20000:+20000,+24000:+38000:]784 %% GLINT.TYPE STR TOP785 %% END786 787 %% GLINT.REGION METADATA788 %% REGION STR [-20000:+20000,-38000:-24000]789 %% GLINT.TYPE STR BOTTOM790 %% END791 792 \begin{figure}793 \centering794 \includegraphics[width=0.9\hsize,angle=0,clip]{images/glint_example_o5379g0103o.jpg}795 \caption{Example of a glint on exposure o5379g0103o (2010-07-02, 45s i-filter). The source star out of the field of view creates a long reflection that extends through OTA73 and OTA63.}796 \end{figure}797 798 \subsubsection{Diffraction Spikes and Saturated Stars}799 \label{sec:diffraction_spikes}800 801 Bright sources also form diffraction spikes that are dynamically802 masked. These are filter independent, and are modeled as rectangles803 with length $L = 10^{0.096 * (7.35 - m_{instrumental})} - 200$ and804 width $W = 8 + (L - 200) * 0.01$, with negative values indicating no805 mask is constructed, as the source is likely too faint to produce the806 feature. These spikes are dependent on the camera rotation, and are807 oriented at $\theta = n * \frac{\pi}{2} - \mathrm{ROTANGLE} + 0.798$,808 based on the header keyword.809 810 %\subsubsection{Saturated stars}811 %\label{sec:saturated_stars}812 813 The cores of stars that are saturated are masked as well, with a814 circular mask radius $r = 10.15 * (-15 - m_{instrumental})$. An815 example of a saturated star, with the masked regions for the816 diffraction spikes and core saturation highlighted, is shown in Figure817 \ref{fig:saturated star}.818 819 \begin{figure}820 \centering821 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o6802g0338o_XY51_b1.jpg}822 \caption{Example of saturated star, with diffraction spikes extending from the core on exposure o6802g0338o, OTA51 (2014-05-25, 45s g-filter).}823 \label{fig:saturated star}824 \end{figure}825 826 \subsubsection{Video Mask}827 \label{sec:video_masks}828 829 One aspect of the OTAs on GPC1 is that an individual cell can be read830 repeatedly while the other cells integrate, resulting in a video831 signal from that cell. This data is used for telescope guiding832 purposes, and a single exposure is likely to have a number of these833 video cells active on different OTAs. For the 3PI survey, the median834 exposure has 14 video cells being read, although this number ranges835 from less than five to more than thirty, depending on the stellar836 density and field pointing. Reading these cells while integrating on837 the others changes the characteristic dark model (see Section838 \ref{sec:video_darks} below) experienced by the other cells on the839 OTA. The observed effect of this is that the glow associated with the840 amplifiers in the corners of the cells is suppressed during the video841 readout, relative to the nominal glow. The standard dark model842 oversubtracts this glow, resulting in dark regions in the corners of843 the cells on an OTA taking video data. Before the nature of this844 issue was fully understood, these poorly constrained corners were845 masked with 25-pixel radius quarter circles, centered on the (0,0)846 pixel nearest the cell amplifier. The other corners of the cell were847 masked with a 15-pixel radius quarter circle, as the amplifier848 creating the glow is associated with another cell, separated by the849 inter-cell spacing, diminishing the area affected. Due to the large850 area that this masking would cover, the PV3 processing used a more851 robust video dark model to correct this problem, as described in852 section \ref{sec:video_darks} below.853 854 855 \subsubsection{Masking Fraction}856 \label{sec:masking_fraction}857 858 For the full field of view that falls on the sixty OTAs, 14.7\% of all859 pixels are masked. The large fraction of this masking is due to860 regions that fall within the vignetted region. Defining the diameter861 of the unvignetted region to be 3 degrees, and excluding pixels that862 fall beyond this point reduces the static masking fraction to 9.7\%.863 864 Unfortunately, due to the design of the OTAs and readout cells, a865 non-negligible fraction of the field of view falls onto an area that866 does not have a detector pixel. For a given OTA mosaicked to a867 $4846\times{}4868$ pixel image, the 64 $590\times{}598$ pixel readout868 cells cover 95.7\% of the OTA area, providing an additional 4.3\%869 masking in the unvignetted field of view due to the absence of a870 detector pixel.871 872 For the inter-chip gap area loss, we use two field of view873 calculations to estimate the masking fraction. The reference field of874 view of GPC1 is 3 degrees, which at the nominal plate scale of 0.258875 arcseconds per pixel, translates to a 20930 FPA pixel radius.876 877 %% mysql> select filter,AVG(camProcessedExp.maskfrac_ref_static), AVG(camProcessedExp.maskfrac_ref_dynamic), AVG(camProcessedExp.maskfrac_ref_advisory), AVG(camProcessedExp.maskfrac_max_static),AVG(camProcessedExp.maskfrac_max_dynamic),AVG(camProcessedExp.maskfrac_max_advisory) from camRun join camProcessedExp USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE camRun.label = 'LAP.PV3.20140730.final' GROUP BY filter;878 %% +---------+------------------------------------------+-------------------------------------------+--------------------------------------------+------------------------------------------+-------------------------------------------+--------------------------------------------+879 %% | filter | AVG(camProcessedExp.maskfrac_ref_static) | AVG(camProcessedExp.maskfrac_ref_dynamic) | AVG(camProcessedExp.maskfrac_ref_advisory) | AVG(camProcessedExp.maskfrac_max_static) | AVG(camProcessedExp.maskfrac_max_dynamic) | AVG(camProcessedExp.maskfrac_max_advisory) |880 %% +---------+------------------------------------------+-------------------------------------------+--------------------------------------------+------------------------------------------+-------------------------------------------+--------------------------------------------+881 %% static dynamic advisory882 %% | g.00000 | 0.19642137972007 | 0.00010322263512709 | 0.026838445469766883 %% | 0.20949461794863 | 9.89200027293e-05 | 0.026431927734548 |884 %% | r.00000 | 0.19675996201399 | 0.00025214447869606 | 0.032641054600788885 %% | 0.20989768279138 | 0.00023994155711801 | 0.032178525485201 |886 %% | i.00000 | 0.19677587604327 | 0.00057470697316504 | 0.038096251937072887 %% | 0.21003570722292 | 0.00053987093278142 | 0.037471018638997 |888 %% | z.00000 | 0.1974290315691 | 0.00024758901226967 | 0.03064123748973889 %% | 0.21055007930696 | 0.00023452690039757 | 0.030144453360769 |890 %% | y.00000 | 0.19828990634315 | 0.00014523787521897 | 0.021984846417987891 %% | 0.21130344126869 | 0.00013634812877977 | 0.02163070300815 |892 893 Summing mask fractions from these three contributions within the894 unvignetted field of view results in an average of $\sim 20\%$ masking895 fraction across the field of view. Dynamic masking adds an additional896 $2-3\%$, with advisory burntool masking contributing the largest897 single component.898 899 \subsection{Overscan}900 \label{sec:overscan}901 902 Each cell on GPC1 has an overscan region that covers the first 34903 columns of each row, and the last 10 rows of each column. No light904 lands on these pixels, so the image region is trimmed to exclude them.905 Each row has an overscan value subtracted, calculated by finding the906 median value of that row's overscan pixels and then smoothing between907 rows with a three-row boxcar median.908 909 \subsection{Non-linearity Correction}910 \label{sec:nonlinearity}911 % check notebook, 2010-07/08912 913 The pixels of GPC1 are not uniformly linear at all flux levels. In914 particular, at low flux levels, some pixels have a tendency to sag915 relative to the expected linear value. This effect is most pronounced916 along the edges of the detector cells, although some entire cells show917 evidence of this effect.918 919 To correct this sag, we studied the flux behavior of a series of flat920 frames for a ramp of exposure times with approximate logarithmically921 equal spacing between 0.01s and 57.04s. As the exposure time922 increases, the flux on each pixel also increases in what is expected923 to be a linear manner. Each of these flat exposures in this ramp is924 overscan corrected, and then the median is calculated for each cell,925 as well as for the rows and columns within ten pixels of the edge of926 the science region. From these median values at each exposure time927 value, we can construct the expected trend by fitting a linear model,928 $f_{region} = G * t_{exp} + B$, to determine the gain, $G$, and the929 bias, $B$, for the region considered. This fitting was limited to only930 the range of fluxes between 12000 and 38000 counts, as these ranges931 were found to match the linear model well. This range avoids the932 non-linearity at low fluxes, as well as the possibility of high-flux933 non-linearity effects.934 935 We store the average flux measurement and deviation from the linear936 fit for each exposure time for all regions on all detector cells in937 the linearity detrend look up tables. When this is applied to science938 data, these lookup tables are loaded, and a linear interpolation is939 performed to determine the correction needed for the flux in that940 pixel. This look up is performed for both the row and column of each941 pixel, to allow the edge correction to be applied where applicable,942 and the full cell correction elsewhere. The average of these two943 values is then applied to the pixel value, reducing the effects of944 pixel nonlinearity.945 946 This non-linearity effect appears to be stable in time for the947 majority of the detector pixels, with little evident change over the948 survey duration. However, as the non-linearity is most pronounced at949 the edges of the detector cells, those are the regions where the950 correction is most likely to be incomplete. Because of this fact,951 most pixels in the static mask with either the DARKMASK or FLATMASK952 bit set are found along these edges. As the non-linearity correction953 is unable to reliably restore these pixels, they produce inconsistent954 values after the dark and flat have been applied, and are therefore955 rejected.956 957 %% exptime n_included/det_id = 372958 %% clearly this isn't the one used, as 3-12 spans three data points, poorly.x959 %% 0.01 2960 %% 0.14 2961 %% 0.27 2962 %% 0.49 2963 %% 0.72 2964 %% 1.06 2965 %% 1.41 2966 %% 2.02 2967 %% 2.63 2968 %% 3.94 2969 %% 5.25 2970 %% 8.74 2971 %% 13.09 2972 %% 17.4 2973 %% 20.86 2974 %% 24.3 2975 %% 27.78 2976 %% 31.24 2977 %% 34.65 2978 %% 38.12 2979 %% 42.41 2980 %% 46.69 2981 %% 51.89 2982 %% 57.04 2983 984 985 %http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/DetectorLinearity_AllEdges986 %http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/DetectorLinearityArchive987 988 \begin{figure}989 \centering990 \includegraphics[width=0.9\hsize,angle=0,clip]{images/linearity_XY27_xy16.png}991 \caption{Example plot of the linearity correction as a fraction of observed flux for OTA27, cell xy16.}992 \end{figure}993 994 \subsection{Dark/Bias Subtraction}995 \label{sec:dark}996 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Background_Dark_Model997 998 The dark model we make for GPC1 considers each pixel individually,999 independent of any neighbors. To create the dark model, we fit an1000 multi-dimensional model to the array of input pixels from a randomly1001 selected set of 100-150 overscan and non-linearity corrected dark1002 frames chosen from a given date range. The model fits each pixel as a1003 function of the exposure time $t_{exp}$ and the detector temperature1004 $T_{chip}$ of the input images such that $\mathrm{dark} = a_0 + a_11005 t_{exp} + a_2 T_{chip} t_{exp} + a_3 T_{chip}^2 t_{exp}$. This1006 fitting uses two iterations to produce a clipped fit, rejecting at the1007 $3\sigma$ level. The final coefficients $a_i$ for the dark model are1008 stored in the detrend image. The constant $a_0$ term includes the1009 residual bias signal after overscan subtraction, and as such, a1010 separate bias subtraction is not necessary.1011 1012 Applying the dark model is simply a matter of calculating the response1013 to the exposure time and detector temperature for the image to be1014 corrected, and subtracting the resulting dark signal from the image.1015 1016 \subsubsection{Time evolution}1017 1018 The dark model is not consistently stable over the full survey, with1019 significant drift over the course of multiple months. Some of the1020 changes in the dark can be attributed to changes in the voltage1021 settings of the GPC1 controller electronics, but the majority seem to1022 be the result of some unknown parameter. We can separate the dark1023 model history of GPC1 into three epochs. The first epoch covers all1024 data taken prior to 2010-01-23. This epoch used a different header1025 keyword for the detector temperature, making data from this epoch1026 incompatible with later dark models.1027 1028 The second epoch covers data between 2010-01-23 and 2011-05-01, and is1029 characterized by a largely stable but oscillatory dark solution.1030 There are two modes that the dark model switches between apparently at1031 random. No clear cause has been established for the switching, but1032 there are clear differences between the two modes that require the1033 observation dates to be split to use the model that is most1034 appropriate.1035 1036 The initial evidence of these two modes comes from the discovery of a1037 slight gradient along the rows of certain cells. This is a result of1038 a drift in the bias level of the detector as it is read out. An1039 appropriate dark model should remove this gradient entirely. For1040 these two modes, the direction of this bias drift is different, so a1041 single dark model generated from all dark images in the time range1042 over corrects the positive-gradient mode, and under corrects the1043 negative-gradient mode. Upon identifying this two-mode behavior, and1044 determining the dates each mode was dominant, two separate dark1045 models were constructed from appropriate ``A'' and ``B'' mode dark1046 frames. Using the appropriate dark minimizes the effect of this bias1047 gradient in the dark corrected data.1048 1049 The bias drift gradients of the mode switching can be visualized in1050 Figure \ref{fig:dark switching}. This figure shows image profile1051 along the x-pixel axis binned along the full y-axis of dark corrected1052 images for OTA67. These images are from sequential days, and have1053 been corrected with a dark model constructed from the full set of dark1054 data within the second epoch. The opposite sign of the slopes of1055 these profiles indicates that the average dark model does not correct1056 these dates sufficiently, due to the contradictory dark signals1057 between the two modes. \czwdraft{this paragraph dependent on that figure.}1058 1059 After 2011-05-01, the two-mode behavior of the dark disappears, and is1060 replaced with a slow observation date dependent drift in the magnitude1061 of the gradient. This drift is sufficiently slow that we have modeled1062 it using three observation date independent dark model for different1063 date ranges. These darks cover the range from 2011-05-01 to1064 2011-08-01, 2011-08-01 to 2011-11-01, and 2011-11-01 and on. The1065 reason for this time evolution is unknown, but as it is correctable1066 with a small number of dark models, this does not significantly impact1067 detrending.1068 1069 \begin{figure}1070 \centering1071 % \begin{subfigure}[]{.45\hsize}1072 \begin{minipage}{0.45\hsize}1073 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_M_OS_NL_XY23_b1.jpg}1074 % \caption{(a)}1075 % \end{subfigure}%1076 % \begin{subfigure}[]{.45\hsize}1077 \end{minipage}%1078 \begin{minipage}{0.45\hsize}1079 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_to_DARK_XY23_b1.jpg}1080 % \caption{(b)}1081 % \end{subfigure}1082 \end{minipage}1083 \caption{An example of the dark model application to exposure o5677g0123o, OTA23 (2011-04-26, 43s g-filter). The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, and the detector non-linearity corrected. The right panel, shows the same exposure with the dark applied in addition to the processing shown on the left.}1084 \end{figure}1085 1086 \begin{figure}1087 \centering1088 \includegraphics[width=0.9\hsize,angle=0,clip]{images/B_profile_ex.png}1089 \caption{Example showing a profile cut across exposure o5676g0195, OTA67 (2011-04-25, 43s g-filter). The entire first row of cells (xy00-xy07) have had a median calculated along each pixel column on the OTA mosaicked image. Arbitrary offsets have been applied to shift the curves to not overlap. The top curve (in purple) shows the initial raw profile, without no dark model applied. The next curve (in green) shows the smoother profile after applying the correct B-mode dark model. Applying the incorrect A-mode dark results in the blue curve, which shows a significant increase in gradients across the cells. The orange curve shows the result of the PATTERN.CONTINUITY correction. Although this creates a larger gradient across the mosaicked images, it decreases the cell-to-cell level changes. The final yellow curve shows the final image profile after all detrending and background subtraction, and has not had an offset applied. The bright source at the cell xy00 to xy01 transition is a result of a large optical ghost, which due to the area covered, increases the median level more than the field stars.}1090 \label{fig:dark switching}1091 \end{figure}1092 1093 \subsubsection{Video Dark}1094 \label{sec:video_darks}1095 1096 The dark signal is stronger in cell corners due to glow from the1097 read-out amplifiers. The standard dark model corrects this for most1098 observations. However, as mentioned above, when a cell is repeatedly1099 read in video mode, the dark model for the OTA containing it changes.1100 Surprisingly, added reads for the video cell do not amplify the1101 amplifier glow, but rather decrease the dark signal in these regions.1102 As a result, using the standard dark model on the data for these OTAs1103 results in oversubtraction of the corner glow.1104 1105 Video darks have been constructed to eliminate the effect this1106 observational change has on the final image quality. This was done by1107 running the standard dark construction process on a series of dark1108 frames that have had the video signal enabled for some cells. GPC11109 can only run video signals on a subset of the OTAs at a given time.1110 This requires two passes to enable the video signal across the full1111 set of OTAs that support video cells. This is beneficial to the1112 process of creating darks, as those OTAs that do not have video1113 signals enabled create standard dark models, while the video dark is1114 created for the other devices.1115 1116 This simultaneous construction of video and standard dark models is1117 useful, as it provides the ability to isolate the response on the1118 standard dark from the video signals. Isolating this response is1119 essential for attempting to create archival video darks. We only have1120 raw video dark frame data after 2012-05-16, when this problem was1121 initially identified, so any data prior to that can not be directly1122 corrected for the video dark signal. Isolating the video signal1123 response allows linear corrections to the pre-existing standard dark1124 models for archival data. Testing this shows that constructing a1125 video dark for older data simply as $VD_{2009} = D_{2009} - D_{Modern}1126 + VD_{Modern}$ produces a satisfactory result that does not1127 oversubtract the amplifier glow. This is shown in figure1128 \ref{fig:video_darks}, which shows video cells from before 2012-05-16,1129 corrected with both the standard and video darks, with the early video1130 dark constructed in such a manner.1131 1132 \begin{figure}1133 \centering1134 % \begin{subfigure}[]{.45\hsize}1135 \begin{minipage}{0.45\hsize}1136 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_Rdark_XY22_b1.jpg}1137 % \caption{(a)}1138 % \end{subfigure}%1139 % \begin{subfigure}[]{.45\hsize}1140 \end{minipage}%1141 \begin{minipage}{0.45\hsize}1142 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_VDdark_XY22_b1.jpg}1143 % \caption{(b)}1144 % \end{subfigure}1145 \end{minipage}1146 \caption{An example of the video dark model application to exposure o5677g0123o, OTA22 (2011-04-26, 43s g-filter), which has a video cell located in cell xy16. The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, the detector non-linearity corrected, and a regular dark applied. The right panel, shows the same exposure with a video dark applied instead of the standard dark. The main impact of this change is the improved correction of the corner glows, which are oversubtracted with the standard dark.}1147 \label{fig:video_darks}1148 \end{figure}1149 1150 \subsection{Noisemap}1151 \label{sec:noisemap}1152 1153 Based on a study of the positional dependence of all detected sources,1154 we have discovered that the cells in GPC1 do not have uniform noise1155 characteristics. Instead, there is a gradient along the pixel rows,1156 with the noise generally higher away from the read out amplifier1157 (higher cell x pixel positions). This is likely an effect of the1158 row-by-row bias issue discussed below. This gradient causes the read1159 noise to increase as the row is read out. As a result of this1160 increased noise, more sources are detected in the higher noise regions1161 when the read noise is assumed constant across the readout. To1162 mitigate this noise gradient, we constructed an initial set of1163 noisemap images by measuring the median variance on bias frames. The1164 variance is calculated in boxes of 20x20 pixels, and then linearly1165 interpolated to cover the full image.1166 1167 Unfortunately, due to correlations within this noise, the variance1168 measured from the bias images does not fully remove the positional1169 dependence of objects that are detected. The reason for this is that1170 this simple noisemap underestimates the noise observed when the image1171 is filtered during the object detection process. This filtering1172 convolves the background noise with a PSF, which has the effect of1173 amplifying the correlated peaks in the noise. This amplification can1174 therefore boost background fluctuations above the threshold used to1175 select real objects, contaminating the final object catalogs.1176 1177 In the detection process, we expect false positives at a rate equal to1178 the one-tailed probability beyond the detection threshold. For these1179 tests, only detections measured at the $\sigma_{thresh} = 5\sigma$1180 level are used, to match that used in the photometry on science data.1181 This probability can be converted into a number of false number by1182 considering a given area. As the detections must be isolated to not1183 be detected as an extended object, this area must be reduced by the1184 area a given PSF occupies. Combining this, we find that we expect a1185 probability $P = 1 - \Phi_{normal}(5) = \frac{1}{2}1186 \erfcinv\left(\frac{5}{\sqrt{2}}\right)$, and an area given $N$1187 exposures of area $X\times Y$, $A = \frac{X \times Y \times1188 N}{A_{PSF}}$. For a typical $1"$ seeing, $A_{PSF}$ is approximately1189 16 pixels. Using this model for the false positives, we found that1190 the added read noise was insufficient to account for the observed1191 false positive rate. Inverting this relation, we can measure1192 $\sigma_{obs}$, the true threshold level based on the number of false1193 positives observed. This $\sigma_{obs}$ is the combined to form a1194 boost factor $B = \sigma_{thresh} / \sigma_{obs}$ that amplifies the1195 noisemap to match the observed false detection rate.1196 1197 The row-to-row variations that contribute to the extra noise are1198 related to the dark model, and because of this, as the dark model1199 changes, the effective noise also changes. To ensure that the1200 noisemap accurately matches the true noise level, we have created1201 different noisemap models for the three major time ranges of the dark1202 model. We do not see any strong evidence that the noisemaps have the1203 A/B modes visible in the dark, and so we do not generate different1204 models for each individual dark model. The additional pixel-to-pixel1205 variance from this noisemap is added to the Poissonian variance to1206 form the science variance image generated by the \ippstage{chip}1207 processing.1208 1209 \subsection{Flat}1210 1211 Determining a flat field correction for GPC1 is a challenging1212 endeavor, as the wide field of view makes it difficult to construct a1213 uniformly illuminated image. Using a dome screen is not possible, as1214 the variations in illumination and screen rigidity create large1215 scatter between different images that are not caused by the detector1216 response function. Because of this, we use sky flat images taken at1217 twilight, which are more consistently illuminated than screen flats.1218 We calculate the mean of these images to determine the initial flat1219 model.1220 1221 From this starting model, we construct a correction to remove the1222 effect of the illumination differences over the detector surface.1223 This is done by dithering a series of science exposures with a given1224 pointing. By fully calibrating these exposures with the initial flat1225 model, and then comparing the measured fluxes for the same star as a1226 function of position on the detector, we can determine position1227 dependent scaling factors. From the set of scaling factors for the1228 full catalog of stars observed in the dithered sequence, we can1229 construct a model of the error in the initial flat model as a function1230 of detector position. Applying a correction that reduces the1231 amplitude of these errors produces a flat field model that better1232 represents the true detector response.1233 1234 The flat model appears stable with time, although directly measuring1235 this is as difficult as originally constructing the model. However,1236 due to the photometric consistency observed in the final catalog of1237 GPC1 measurements \citep{MagnierXXX}, we can be confident that the1238 flat model does not have a major time dependent component.1239 1240 \subsection{Pattern correction}1241 \label{sec:pattern}1242 1243 Due to detector specific issues that are not cleanly removed by the1244 dark model, we have a set of ``pattern'' corrections that are applied1245 to some selection of the OTAs in the camera. This is done to reduce1246 the effect that detector differences that are not stable enough to be1247 corrected with a global model have on the measured astronomical1248 signal. Because these are not stable features that can simply be1249 averaged over a large number of inputs, the pattern corrections1250 attempt to identify and correct the detector issues based on1251 appropriate filtering the individual science exposures.1252 1253 The PATTERN.ROW correction is used to remove any remaining row-by-row1254 bias variation, and the PATTERN.CELL and PATTERN.CONTINUITY1255 corrections attempt to ensure that the cells of a given OTA are1256 consistent with the other cells on that OTA.1257 1258 \subsubsection{Pattern Row}1259 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/GPC1_Bias_Pattern_Study1260 As discussed above in the dark and noisemap sections, certain1261 detectors have significant row-by-row bias offsets, caused by noise in1262 the camera control electronics. The magnitude of these offsets1263 increases as the distance from the readout amplifier increases,1264 resulting in horizontal streaks that are more pronounced along the1265 large x pixel edge of the cell. As the level of the offset is1266 apparently random between exposures, the dark correction cannot fully1267 remove this structure from the images, and the noisemap value only1268 indicates the level of the average variance added by these bias1269 offsets. Therefore, we apply the PATTERN.ROW correction in an attempt1270 to mitigate the offsets and correct the image values. To force the1271 rows to agree, a second order clipped polynomial is fit to each row in1272 the cell. Four fit iterations are run, and pixels $2.5\sigma$ deviant1273 are excluded from subsequent fits, to minimize the effect stars and1274 other astronomical signals have. The final trend is then subtracted1275 from the image. Simply doing this subtraction will also have the1276 effect of removing the background sky level. To prevent this, the1277 constant and linear terms for each row are stored, and linear fits are1278 made to these parameters as a function of row. This produces a plane1279 that is added back to the image to restore the background offset and1280 any linear ramp that exists in the sky.1281 1282 1283 This correction was required on all cells on all OTAs prior to1284 2009-12-01, at which point a modification of the camera electronics1285 reduced the scale of the row-by-row offsets for the majority of the1286 OTAs. As a result, we only apply this correction to the cells where1287 it is still necessary, as shown in Figure \ref{fig: pattern row1288 cells}. A list of these cells is listed in Table1289 \ref{tab:pattern_row_cells}.1290 1291 Although this correction does largely resolve the row-by-row offset1292 issue in a satisfactory way, large and bright astronomical objects can1293 bias the fit significantly. This results in an oversubtraction of the1294 offset near these objects. As the offsets are calculated on the pixel1295 rows, this oversubtraction is not uniform around the object, but is1296 preferentially along the horizontal x axis of the object. Most1297 astronomical objects are not significantly distorted by this, with1298 this only becoming on issue for only bright objects comparable to the1299 size of the cell (598 pixels = 150").1300 1301 %% \czwdraft{keep this?} This row-by-row offset is visible in similar1302 %% camera designs, and has been removed by identifying the noise signal1303 %% in the pixel data stream. By taking the FFT of the pixels and a1304 %% reference signal, the frequency of this noise can be isolated and1305 %% removed, resulting in a much cleaner image. However, GPC1 does not1306 %% record the value of the reference signal, instead automatically1307 %% subtracting it from the data values. Without this comparison signal,1308 %% we have been unable to reproduce this method, as there is no obvious1309 %% FFT component visible.1310 1311 \begin{deluxetable}{lcccc}1312 \tablecolumns{3}1313 \tablewidth{0pc}1314 \tablecaption{Cells which have PATTERN.ROW correction applied}1315 \tablehead{\colhead{OTA} & \colhead{Cell columns} & \colhead{Additional cells}}1316 \startdata1317 OTA11 & & xy02, xy03, xy04, xy07 \\1318 OTA14 & & xy23 \\1319 OTA15 & 0 & \\1320 OTA27 & 0, 1, 2, 3, 7 & \\1321 OTA31 & 7 & \\1322 OTA32 & 3, 7 & \\1323 OTA45 & 3, 7 & \\1324 OTA47 & 0, 3, 5, 7 & \\1325 OTA57 & 0, 1, 2, 6, 7 & \\1326 OTA60 & & xy55 \\1327 OTA74 & 2, 7 & \\1328 \enddata1329 \label{tab:pattern_row_cells}1330 \end{deluxetable}1331 1332 \begin{figure}1333 \centering1334 \includegraphics[width=0.9\hsize,angle=0,clip]{images/pattern_row_edit.png}1335 \caption{Diagram illustrating in red which cells on GPC1 require the PATTERN.ROW correction to be applied. The footprint of each OTA is outlined, and cell xy00 is marked with either a filled box or an outline. The labeling of the non-existent corner OTAs is provided to orient the focal plane.}1336 \label{fig: pattern row cells}1337 \end{figure}1338 1339 \begin{figure}1340 \centering1341 \begin{minipage}{0.45\hsize}1342 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_nopat.png}1343 % \caption{(a)}1344 % \end{subfigure}%1345 % \begin{subfigure}[]{.45\hsize}1346 \end{minipage}%1347 \begin{minipage}{0.45\hsize}1348 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_pat.png}1349 % \caption{(b)}1350 % \end{subfigure}1351 \end{minipage}1352 \caption{Example of the PATTERN.ROW correction on exposure o5379g0103o OTA57 cell xy00 (i-filter 45s). The left panel shows the cell with all appropriate detrending except the PATTERN.ROW, and the right shows the same cell with PATTERN.ROW applied. The correction reduces the correlated noise on the right side, which is most distant from the read out amplifier. There is a slight over subtraction along the rows near the bright star. \czwdraft{which I can't seem to find proper ranges to highlight.}}1353 \end{figure}1354 1355 \subsubsection{Pattern Cell}1356 1357 As the measured background level of a given cell may not exactly match1358 that of its neighbors, fitting a smooth background model over the full1359 OTA can result in over and under-subtraction of the sky level at the1360 cell boundary discontinuities. The PATTERN.CELL correction was an1361 initial attempt to remove this effect on the worst cells, by forcing1362 all the cells of an OTA to the same level. Each cell had the median1363 value measured, and then each cell had an offset added that shifts the1364 cell to match the median of those medians.1365 1366 This correction is reasonable when the astronomical signal is smooth,1367 with no objects that are large relative to the size of an individual1368 cell. However, the presence of large galaxies (or even bright stars)1369 can bias the offsets for some cells from their neighbors. Because of1370 this issue, we no longer apply this correction to any data.1371 1372 \subsubsection{Pattern Continuity}1373 1374 As the PATTERN.CELL correction was insufficient in many situations, we1375 designed a replacement correction that would reduce the background1376 distortion for large objects. In addition, studies of the background1377 level illustrated that the row-by-row bias can introduce small1378 background gradient variations along the rows of the cells that is not1379 stable enough to be completely fit by the dark model. This common1380 feature across the columns of cells results in a ``saw tooth'' pattern1381 horizontally across an OTA, and as the background model fits a smooth1382 sky level, this induces over and under subtraction at the cell1383 boundaries. As the PATTERN.CELL was designed to correct changes only1384 in the median value between cells, it could not adequately resolve1385 this higher order issue.1386 1387 The replacement for PATTERN.CELL is the PATTERN.CONTINUITY correction,1388 which attempts to match the edges of a cell to those of its neighbors.1389 For each cell, a thin box 10 pixels wide on each edge is extracted and1390 the median value of unmasked values calculated for that box. These1391 median values are then used to construct a vector of differences1392 $\Delta_i = \sum_{j} Edge_{i} - Edge_{j}$, along with a matrix of1393 associations $A_{i,i'} = \sum_{j} \delta(i,j) \delta(j,i')$ denoting1394 which cell boundaries touch another. By solving the system $A x =1395 diff$, we find the set of offsets $x_i$ to be applied to each cell to1396 ensure the minimum differences between all cell edges and their1397 neighbors.1398 1399 For OTAs that initially show the saw tooth pattern, the effect of this1400 correction is to align the cells into a single ramp, at the expense of1401 the absolute background level. However, as we subtract off a smooth1402 background model prior to doing photometry, these deviations from an1403 absolute sky level are unimportant. The fact that the final ramp is1404 smoother than it would be otherwise also allows for the background1405 subtracted image to more closely match the astronomical sky, without1406 significant errors at cell boundaries. An example of the effect of1407 this correction on an image profile is shown in Figure \ref{fig:dark switching}.1408 1409 %% \begin{figure}1410 %% \centering1411 %% \caption{Continuity example, with background issue.}1412 %% \label{fig: continuity example}1413 %% \end{figure}1414 1415 \subsection{Fringe correction}1416 \label{sec:fringe}1417 % det_id 296 is the fringe we use.1418 1419 \czwdraft{This is still a mess}1420 1421 Due to variations in the thickness of the detectors, we observe1422 interference patterns at the infrared end of the filter set, as the1423 wavelength of the light becomes comparable to the thickness of these1424 variations. Visually inspecting the images shows that the fringing is1425 most prevalent in the y-filter images, with negligible fringing in1426 other bands. As a result of this, we only apply a fringe correction1427 to the y filter data.1428 1429 The fringe used for PV3 processing was constructed from a set of 201430 120s science exposures. These exposures are overscan subtracted, and1431 corrected for non-linearity, and have the dark and flat models1432 applied. These images are smoothed with a Gaussian of $\sigma = 2$1433 pixels to minimize pixel to pixel noise. The fringe image data is1434 then constructed by calculating the clipped mean of the input images1435 with two iteration of clipping at the $3\sigma$ level.1436 1437 A course background model is constructed by calculating the median on1438 a 3x3 grid (200x200 pixels each). A set of 1000 randomly selected1439 points are selected on \czwdraft{the final image} in each cell, and1440 median calculated for this position in a 10x10 pixel box, and the1441 background level subtracted. These sample locations provide scale1442 points to allow the amplitude of the measured fringe to be compared to1443 that found on science images.1444 1445 To apply the fringe, the same sample locations are measured on science1446 image to determine the relative strength of the fringing in that1447 particular image. A least squares fit between the fringe measurements1448 and the corresponding measurements on the science provides the scale1449 factor multiplied by the fringe before it is subtracted from the1450 science image.1451 1452 \begin{figure}1453 \centering1454 \begin{minipage}{0.5\hsize}1455 \includegraphics[width=1.0\hsize,angle=0,clip]{images/o5220g0025o_XY53_nofringe.png}1456 % \caption{(a)}1457 % \end{subfigure}%1458 % \begin{subfigure}[]{.45\hsize}1459 \end{minipage}%1460 \begin{minipage}{0.5\hsize}1461 \includegraphics[width=1.0\hsize,angle=0,clip]{images/o5220g0025o_XY53_fringe.png}1462 % \caption{(b)}1463 % \end{subfigure}1464 \end{minipage}1465 \caption{Example of the y-filter fringe pattern on exposure o5220g0025o OTA53 (y-filter 30s). The left panel shows the OTA mosaic with all detrending except the fringe correction, while the right shows the same including the fringe correction. Both images have been smoothed with a Gaussian with $\sigma = 3$ pixels to highlight the faint and large scale fringe patterns. \czwdraft{See if there's a way to have mana produce images larger than the screen size.}}1466 \label{fig: fringe example}1467 \end{figure}1468 1469 \subsection{Background subtraction}1470 \label{sec:background}1471 1472 1473 Once all other detrending is done, the pixels from each cell are1474 mosaicked into the full $4846\times{}4868$ pixel OTA image. A1475 background model for the full OTA is then determined prior to the1476 photometric analysis. The mosaicked image is binned into1477 $800\times{}800$ pixel bins, centered on the image center, and1478 overlapping by a factor of 2 in both axes. These bins have 100001479 random samples drawn, and a binned cumulative distribution function is1480 generated. These bins are interpolated to find the best mean value at1481 the $50\%$ level, as well as the distribution $\sigma$ by estimating1482 from the $32\%$ and $68\%$ levels. Repeating this across all bins1483 results in a $13\times{}13$ grid of background bins, which are1484 bilinearly interpolated to generate the background model to subtract.1485 Each object in the photometric catalog has a SKY and SKY\_SIGMA value1486 based on this model as well.1487 1488 %% * Magic1489 %% * Warping1490 %% * warping kernel1491 %% * linear-by-pieces1492 %% * Covariance1493 %% * def of skycells?1494 %% * Stacking1495 %% * pixel combination rules1496 %% * pixel rejections1497 %% * convolution for matching (success and failure)1498 %% * Difference Image analysis1499 1500 1501 1535 \section{Warping} 1502 1536 \label{sec:warping} … … 1505 1539 projected onto a common set of tangent plane projected regions called 1506 1540 projection cells. These projection cells are $4\times{}4$ degree 1507 fields spaced onto set of centers that fully cover the sky. They are1541 fields spaced onto a set of centers that fully cover the sky. They are 1508 1542 arranged into rings of constant declination, and allowed to overlap as 1509 1543 $|\delta|$ increases. Each projection cell is further subdivided into 1510 $10\times{}10$ sky cells with fixed $0.25"$ resolution pixels, with1544 $10\times{}10$ sky cells with fixed $0.25"$ resolution pixels, and 1511 1545 constant overlap regions between adjacent skycells of $60"$. These 1512 1546 skycells are the main image unit used for processing image data beyond … … 1565 1599 name, and the SEC keyword lists the image section corresponding to the 1566 1600 locally linear grid box. The MPX and MPY contain the transformation 1567 parameters for the locally linear grid. \czwdraft{Is this accurate?} 1568 1569 % Read all images and astrometry 1570 % Check which input images overlap with output image. => 8007 when the inputs don't overlap. 1571 % Loop over each image. 1572 % Append detections from input into output detection list. 1573 % Determine transform back from warp pixels to source image. 1574 %% 2nd order polynomial in both x and y for this transformation. and save to header 1575 % Break warp image into 128x128pixel locally linear areas 1576 % Mask non finite pixels as saturated. 1577 % Define Lanczos-3 interpolation over the input image. 1578 % Iterate over warp pixel space (on each locally linear grid) and map interpolated input pixel positions onto warp. 1579 % Warp pixel space is defined as center based, so that's where the intpolation point comes from. 1580 % Covariance calculated based on the interpolation kernel at the center of the ll grid. 1581 % image = interp_image * jacobian 1582 % var = interp_var * jacobian**2 1583 % mask = interp_mask 1584 % jacobian = abs(mapXx * mapYy - mapYx * mapXy) 1585 % I don't understand that jacobian. 1586 % 1587 1601 parameters for the locally linear grid. These parameters are stored 1602 in a string listing the reference position in the chip coordinate 1603 frame, the slope of the relation in the warp x axis, and the slope of 1604 the relation in the warp y axis. From these keywords, any position in 1605 the warp can be mapped back to the location in any of the input OTA 1606 images. 1607 1608 \begin{figure} 1609 \centering 1610 \includegraphics[width=0.9\hsize,angle=0,clip]{images/warp_1046511_sci.jpg} 1611 \caption{Example of the warp image for skycell skycell.2047.005 1612 centered at ($\alpha,\delta$) = (179.763, 32.1899) for exposure 1613 o4985g0073o, (2009-06-03, 30s \zps{} filter). The data from six 1614 OTAs contribute to this image, although they are all truncated by 1615 the skycell boundaries. This skycell image is aligned such that 1616 north points to the top of the image, and east to the left. The 1617 contributing OTAs are from the right half of the detector, with 1618 OTA24 contributing the most pixels, and originally have the 1619 positive y axis pointing to the southwest in this warped image, 1620 with the positive x axis to the northwest.} 1621 \label{fig:warp image} 1622 \end{figure} 1623 1624 \begin{figure} 1625 \centering 1626 \includegraphics[width=0.9\hsize,angle=0,clip]{images/warp_1046511_wt.jpg} 1627 \caption{Example of the warp variance image for skycell 1628 skycell.2047.005 of exposure o4985g0073o, the same as in Figure 1629 \ref{fig:warp image}. This variance map retains information about 1630 the higher flux levels that were found in burntool corrected 1631 persistence trails, which appear here as streaks along the 1632 original OTA y axis. The amplifier glows that are corrected in 1633 the dark model are also more visible in the corners of the cells 1634 in OTA24. As both of these effects are corrected in the science 1635 image, there are no significant features visible there.} 1636 \label{fig:warp variance} 1637 \end{figure} 1638 1639 \begin{figure} 1640 \centering 1641 \includegraphics[width=0.9\hsize,angle=0,clip]{images/warp_1046511_mask.jpg} 1642 \caption{Example of the warp mask image for skycell skycell.2047.005 1643 of exposure o4985g0073o, the same as in Figure \ref{fig:warp 1644 image}. This mask image shows the many small defects removed 1645 from the image, along with larger advisory trails on corrected 1646 burntool trails. The saturated cores of the bright stars are also 1647 masked, along with the diffraction spikes found on these stars. 1648 In addition OTA24 shows the precautionary crosstalk bleed masks 1649 for the two brightest stars applied to all cells within the same 1650 row.} 1651 \end{figure} 1588 1652 1589 1653 \section{Stacking} … … 1592 1656 Once individual exposures have been warped onto a common projection 1593 1657 system, they can then be combined pixel-by-pixel regardless of their 1594 original orientation. Creating a stacked image by co adding the1595 individual warps increases the signal to noise which allows objects1596 fainter than can be found on the individual inputs to be detected.1597 Creating this stack also allows a complete image to be constructed1598 that does not have regions masked due to the gaps between cells and 1599 OTAs. This provides a fully populated static sky image that can 1600 be usedfor subtraction to find transient sources.1658 original orientation. Creating a stacked image by co-adding the 1659 individual warps increases the signal to noise, allowing for the 1660 detection of objects that would not be sufficiently significant to be measured from a single image. 1661 Creating this stack also allows a complete image to be 1662 constructed that does not have regions masked due to the gaps between 1663 cells and OTAs. This fully populated static sky image can also be 1664 used as a template for subtraction to find transient sources. 1601 1665 1602 1666 The stacked image is comprised of all warp frames for a given skycell … … 1607 1671 Once all files are ingested, the first step is to measure the size and 1608 1672 shapes of the input image PSFs. We exclude images that have a PSF 1609 FWHM greater than 10 pixels , as those images have the seeing far worse1610 than average, and would degrade the final output stack. For the PV3 1611 s urvey, this size represents a PSF larger than $97$th percentile in1612 all filters. A target PSF for the stack is constructed by finding the 1613 maximum envelope of all input PSFs, which sets the target PSF to the 1614 largest value among the input PSFs for a given position from the peak. 1615 This PSF is then circularized to ensure azimuthal symmetry, which 1616 prevents any of the input images from being deconvolved when matched 1617 to the target.1618 1619 The input images also need to have their flux normalized to prevent1673 FWHM greater than 10 pixels (2.5 arcseconds), as those images have the 1674 seeing far worse than average, and would degrade the final output 1675 stack. For the PV3 $3\Pi$ survey, this size represents a PSF larger 1676 than the $97$th percentile in all filters. A target PSF for the stack 1677 is constructed by finding the maximum envelope of all input PSFs, 1678 which sets the target PSF to the largest value among the input PSFs 1679 for a given position from the peak. This PSF is then circularized to 1680 ensure azimuthal symmetry, which prevents deconvolution of any of the 1681 input images when matched to the target. 1682 1683 The input images also need to have their fluxes normalized to prevent 1620 1684 differences in seeing and sky transparency from causing discrepancies 1621 during pixel rejection. From the calibrated input catalogs, we have 1622 the instrumental magnitudes of all sources, along with the airmass, 1623 image exposure time, and zeropoint. All output stacks are calibrated 1624 to a zeropoint of 25.0 in all filters, and to have an airmass of 1.0. 1625 The output exposure time is set to the sum of the input exposure 1626 times. We can determine the relative transparency for each input 1627 image by comparing the magnitudes of matched sources between the 1628 different images. Each image then has a normalization factor defined, 1629 equal to $norm_{i} = (ZP_{i} - ZP_{target}) - transparency_{i} - 2.5 * 1630 \log_{10} (t_{target} / t_{i}) - airmassTerm * (airmass_{i} - 1631 airmass_{target})$. \czwdraft{ZP.AIRMASS is zero for all filters. 1632 Does this simply mean that we assume any airmass differences are 1633 folded into the transparency differences? This would simplify this 1634 discussion quite a bit if that's the case, as we can just say that 1635 and skip all the extra airmass terms.} 1636 1637 % PREPARE 1638 % load sources 1639 % load psfs 1640 % determine target as envelope of input psfs 1641 % FWHM clipping at 10 1642 % measure seeing 1643 % - // M_app = m_inst + zp + c1 * airmass + 2.5log(t) - transparency 1644 % // EAM : the discussion here was not quite right (or at least sloppy). Here is a replacement explanation: 1645 % // For any star, the observed instrumental magnitude on an image and the apparent magnitude are related by: 1646 % // M_app = m_inst + zp + c1 * airmass + 2.5log(t) - transparency 1647 % // NOTE the sign of 'transparency' this must agree with the definition in pmSourceMatch.c. see, eg, line 457 where 1648 % // transparency = m_inst + zp + c1 * airmass + 2.5log(t) - M_app 1649 % // we want to adjust the input images to be in a consistent flux system so that the 1650 % // final stack can be generated with a specific target zero point. Any adjustment to 1651 % // the flux scale of the image must be made in coordination with the resulting 1652 % // zeropoint, exposure time, and airmass such that the above relationship yields the 1653 % // same apparent magnitude for a given star: 1654 % // m_inst_i : instrumental mags on input image (in) 1655 % // m_inst_o : instrumental mags on re-normalized image (out) 1656 % // m_inst_o + zp_o + c1 * airmass_o + 2.5log(t_o) - trans_o = m_inst_i + zp_i + c1 * airmass_i + 2.5log(t_i) - trans_i 1657 % // m_inst_o = m_inst_i + (zp_i - zp_o) + c1 * (airmass_i - airmass_o) + 2.5log(t_i) - 2.5log(t_o) - trans_i + trans_o 1658 % // zp_i, airmass_i, t_i, trans_i : reported or measured for input image 1659 % // zp_o = zpTarget (from recipe) 1660 % // airmass_o = airmassTarget (from recipe) 1661 % // t_o = sumExpTime [sum of input exposure times: once images are scale to this time, they can be avereaged] 1662 % // trans_o = 0.0 [obviously!] 1663 % // we have 2 cases: (a) all reported ZPs are good or (b) some are bad: 1664 % // (a) FPA.ZP = zp_i + c1 * airmass_i 1665 % // --> zp[i] = zp_i + c1 * airmass_i + 2.5log(exptime_i) 1666 % // (b) zp[i] = c1 * airmass_i + 2.5log(exptime_i) 1667 % // NOTE: in case (b), the current code is equating the TARGET zp with the NOMINAL zp, which is wrong. 1668 % // m_inst_o - m_inst_i = zp[i] - zpTarget - c1 * airmassTarget - 2.5log(sumExpTime) - trans_i 1685 during pixel rejection. From the reference catalog calibrated input 1686 catalogs, we have the instrumental magnitudes of all sources, along 1687 with the airmass, image exposure time, and zeropoint. All output 1688 stacks are calibrated to a zeropoint of 25.0 in all filters, and to 1689 have an airmass of 1.0. The output exposure time is set to the sum of 1690 the input exposure times, regardless of if those inputs are rejected 1691 later in the combination process. We can determine the relative 1692 transparency for each input image by comparing the magnitudes of 1693 matched sources between the different images. Each image then has a 1694 normalization factor defined, equal to $\mathrm{norm}_{input} = (ZP_\mathrm{input} 1695 - ZP_\mathrm{target}) - \mathrm{transparency}_\mathrm{input} - 2.5 * 1696 \log_{10} (t_\mathrm{target} / t_\mathrm{input}) - 1697 \mathrm{F}_\mathrm{airmass} * (\mathrm{airmass}_\mathrm{input} - 1698 \mathrm{airmass}_\mathrm{target})$. For the PV3 processing, the 1699 airmass factor $\mathrm{F}_\mathrm{airmass}$ was set to zero, such 1700 that all flux differences from differing exposure airmasses are 1701 assumed to be included in the zeropoint and transparency values. 1702 1703 The zeropoint calibration performed here uses the calibration of the 1704 individual input exposures against the reference catalog. Upon the 1705 conclusion of the survey, the entire set of detection catalogs is 1706 further re-calibrated in the ``ubercal'' process \citep{2012ApJ...756..158S}. 1707 This produces a more consistent calibration of each exposure across 1708 the entire region of the sky imaged. This further calibration is not 1709 available at the time of stacking, and so there may be small residuals 1710 in the transparency values as a result of this \citet{magnier2017c}. 1669 1711 1670 1712 With the flux normalization factors and target PSF chosen, the 1671 1713 convolution kernels can be calculated for each image. ISIS kernels 1672 are used with FWHM values of 1.5, 3.0, and 6.0 pixels and polynomial 1673 orders of 6, 4, and 2. \czwdraft{Skipping this bit because I'm not 1674 completely sure I understand it.} The image is then scaled by the 1675 normalization as $renorm = 10^{-0.4 * norm_{image}} / 1676 norm_{convolution}$, and the variance by the square of that value. 1677 1678 1679 % MATCH 1680 % match to target PSF. 1681 % use ISIS kernels to do matching/convolution 1682 % Input sources used for psf matching. 1683 % @ISIS.WIDTHS F32 1.5 3.0 6.0 # Gaussian kernel FWHM values 1684 % @ISIS.ORDERS S32 6 4 2 # Polynomial orders for ISIS kernels 1714 \citep{1998ApJ...503..325A} are used with FWHM values of 1.5, 3.0, and 6.0 1715 pixels and polynomial orders of 6, 4, and 2. Regions around the 1716 sources identified in the input images are extracted, convolved with 1717 the kernel, and the residual with the target PSF used to update the 1718 parameters of the kernel via least squares optimization. Stamps that 1719 significantly deviate are rejected, but as the squared residual 1720 difference will increase with increasing source flux. To mitigate 1721 this effect, a parabola is fit to the distribution of squared 1722 residuals as a function of source flux. Stamps that deviate from this 1723 fit by more than $2.5\sigma$ are rejected, and not used on further 1724 kernel fit iterations. This process is repeated twice, and the final 1725 convolution kernel is returned. 1726 1727 This convolution may change the image flux scaling, so a normalization 1728 factor is used to correct this. This normalization factor is equal to 1729 the ratio of $10^{-0.4 \mathrm{norm}_{input}}$ to the sum of the 1730 kernel. The image is multiplied by this factor, and the variance by 1731 the square of it, scaling all inputs to the common zeropoint. 1685 1732 1686 1733 Once the convolution kernels are defined for each image, they are used 1687 1734 to convolve the image to match the target PSF. Any input image that 1688 has a $\chi^2$ value greater than 4.0$\sigma$ larger than the median 1689 value is rejected from the stack. Each image also has a weight 1690 assigned, based on the image variance after convolution. For a given 1691 image, the weight is equal to $W^{-1} = \langle Variance(x,y) \rangle 1692 * f_{covariance}$, where the angle brackets denote a robust median of 1693 the variance image, and the covariance factor $f_{covariance}$ is the 1694 peak value of the covariance matrix of the convolution. 1695 1696 % CONVOLVE 1697 % Normalization to match target zeropoint/exptime 1698 % Reject images with bad match chi^2 values. MATCH.REJ * rms + median threshold. 1699 % Additional variance from the convolution chi^2 1700 % Calculate image weights based on variance: W_i = 1 / (ROBUST_MEDIAN(variance_image_i) * CovarianceFactor) 1701 % CovarianceFactor = covariance->kernel[0][0] 1735 has a kernel match $\chi^2$ value greater than 4.0$\sigma$ larger than 1736 the median value is rejected from the stack. Each image also has a 1737 weight assigned, based on the image variance after convolution. A 1738 full image weight is then calculated for each input, with the weight, 1739 $W_\mathrm{input}$ is equal to the inverse of the median of the image 1740 variance multiplied by the peak of the image covariance (due to the 1741 warping process). 1702 1742 1703 1743 Following the convolution, an initial stack is constructed. For a … … 1720 1760 1721 1761 \begin{eqnarray} 1722 S_{value} &=& \sum_i\left(value_{i} * W_i\right) / \sum_i\left(W_i\right) \\1723 S_{exp weight} &=& \sum_i \left(exptime_i * W_i\right) / \sum_i\left(W_i\right) \\1762 \mathrm{Stack}_\mathrm{value} &=& \sum_i\left(\mathrm{value}_\mathrm{input} * W_\mathrm{input}\right) / \sum_\mathrm{inputs}\left(W_\mathrm{input}\right) \\ 1763 \mathrm{Stack}_\mathrm{exp weight} &=& \sum_i \left(\mathrm{exptime}_\mathrm{input} * W_\mathrm{input}\right) / \sum_\mathrm{inputs}\left(W_\mathrm{input}\right) \\ 1724 1764 \end{eqnarray} 1725 1765 … … 1727 1767 1728 1768 \begin{eqnarray} 1729 S_{variance} &=& 1 / \sum_i \left( 1 / variance_i\right)1769 \mathrm{Stack}_\mathrm{variance} &=& 1 / \sum_i \left( 1 / \sigma^2_\mathrm{input} \right) 1730 1770 \end{eqnarray} 1731 1771 1732 1772 The output mask value is taken to be zero (no masked bits), unless 1733 1773 there were no valid inputs, in which case the BLANK mask bit is set. 1734 1735 % INITIAL COMBINE1736 % Calculate weighted mean of input images1737 % mu = sum_i(f_i * W_i) / sum_i(W_i)1738 % sigma = 1 / sum_i(1 / W_i)1739 % nu = sum_i(m_i)1740 % // We're not using the input pixel variances to generate a weighted average for the pixel flux (because1741 % // that introduces systematic biases), so the variance of the output pixel value should simply be:1742 % // simga^2 = sum(weight_i^2 * sigma_i^2) / (sum(weight_i))^21743 % // This reduces, when the weights are all identically unity, to:1744 % // variance_combination = sum(variance_i) / N^21745 % // and if the variances are all equal:1746 % // variance_combination = variance_individual / N1747 % // which makes sense --- the standard deviation of the combination is reduced by a factor of sqrt(N).1748 % sumValueWeight = sum_i(values * weights)1749 % sumWeight = sum_i(weights)1750 % sumVarianceWeight == sum( 1 / variances)1751 % sumExp = sum_i(exptimes)1752 % sumExpWeight = sum_i(exptims * weights)1753 % mean = sumValueWeight / sumWeight1754 % var = 1 / sumVarianceWeight1755 % exp = sumExp1756 % expWeight = sumExpWeight1757 1758 % EXCEPT: if N = 1, accept it. if N = 2, take average.1759 1760 % if (!pmStackCombine(outRO, NULL, stack, maskBad, maskSuspect, maskBlank, kernelSize, iter,1761 % combineRej, combineSys, combineDiscard, useVariance, safe, nminpix, false)) {1762 %bool pmStackCombine(1763 % pmReadout *combined, // output stacked readout1764 % pmReadout *expmaps, // output exposure map information1765 % psArray *input, // input exposures1766 % psImageMaskType badMaskBits, // treat these bits as 'bad'1767 % psImageMaskType suspectMaskBits, // treat these bits as 'suspect'1768 % psImageMaskType blankMaskBits, // use this mask value for pixels missing input data (distinguish between Ninput = 0 and Ngood = 0?)1769 % int kernelSize,1770 % float iter, 0.51771 % float rej, 4.01772 % float sys, 0.11773 % float olympic, 0.21774 % bool useVariance,1775 % bool safe,1776 % int nminpix,1777 % bool rejection)1778 %{1779 1780 % combineExtract1781 %% pixels with mask values as suspect are appended to suspect pixel list.1782 % combinePixels1783 %% As described above.1784 1774 1785 1775 Due to the various non-astronomical ghosts that can occur on GPC1, and … … 1794 1784 warp-warp difference images to be constructed to identify transient 1795 1785 detections, higher pixel values that come from sources like optical 1796 ghosts depend on the telescope pointing will come in pairs as well.1786 ghosts that depend on the telescope pointing will come in pairs as well. 1797 1787 The higher pixel value contaminants are also potentially problematic 1798 1788 as they may appear to be real sources, prompting photometry to be … … 1801 1791 to reject higher pixel values than lower pixel values. 1802 1792 1803 Following th isinitial combination, a ``testing'' loop iterates in an1793 Following the initial combination, a ``testing'' loop iterates in an 1804 1794 attempt to identify outlier points. Again, if only one input is 1805 1795 available, that input is accepted. If there are two inputs, $A$ and 1806 $B$, then a check is made to see if $(0.5 * (value_A - value_B))^2 > 1807 rej^2 * (variance_A + variance_B + (sys * value_A)^2 + (sys * 1808 value_B)^2)$, where $rej$ is the number of sigma deviant a point needs 1809 to be to be excluded, set to 4.0 for the PV3 processing, and $sys$ is 1810 an estimate of the systematic error, taken to be 0.1. 1796 $B$, then a check is made to see if $(0.5 * (\mathrm{value}_A - 1797 \mathrm{value}_B))^2 > 16 * (\sigma^2_A + \sigma^2_B 1798 + (0.1 * \mathrm{value}_A)^2 + (0.1 * \mathrm{value}_B)^2)$, such that 1799 the deviation of the inputs from their mean position is greater than 1800 four times the sum of their measured uncertainties and a 10\% 1801 systematic error term. If this is the case, neither input is trusted, 1802 and both are flagged for rejection 1811 1803 1812 1804 If the number of inputs is larger than 6, then a Gaussian mixture … … 1822 1814 input values are passed to an Olympic weighted mean calculation. We 1823 1815 reject $20\%$ of the number of inputs through this process. The 1824 number of bad inputs is set to $N_{bad} = 0.2 * N_{input} + 0.5$, with 1825 the 0.5 term ensuring at least one input is rejected. This number is 1826 further separated into the number of low values to exclude $N_{low} = 1827 N_{bad} / 2$, which will default to zero if there are few inputs, and 1828 $N_{high} = N_{input} + N_{low} - N_{bad}$. After sorting the input 1829 values to determine which values fall into the low and high groups, 1830 the remaining input values are used in a weighted mean using the image 1831 weights above. 1816 number of bad inputs is set to $N_\mathrm{bad} = 0.2 * 1817 N_\mathrm{input} + 0.5$, with the 0.5 term ensuring at least one input 1818 is rejected. This number is further separated into the number of low 1819 values to exclude $N_\mathrm{low} = N_\mathrm{bad} / 2$, which will 1820 default to zero if there are few inputs, and $N_\mathrm{high} = 1821 N_\mathrm{input} + N_\mathrm{low} - N_\mathrm{bad}$. After sorting 1822 the input values to determine which values fall into the low and high 1823 groups, the remaining input values are used in a weighted mean using 1824 the image weights above. 1832 1825 1833 1826 A systematic variance term is necessary to correctly scale how … … 1839 1832 1840 1833 \begin{eqnarray} 1841 limit_{mixture model} &=& 4^2 * (variance_i + \sigma_{MM}^2) \\1842 limit_{default} &=& 4^2 * (variance_i + (0.1 * value_i)^2)1834 \mathrm{limit}_\mathrm{mixture\ model} &=& 4^2 * (\sigma^2_\mathrm{input} + \sigma_\mathrm{mixture\ model}^2) \\ 1835 \mathrm{limit}_\mathrm{default} &=& 4^2 * (\sigma^2_\mathrm{input} + (0.1 * \mathrm{value}_\mathrm{input})^2) 1843 1836 \end{eqnarray} 1844 1837 1845 1838 Each input pixel is then compared against this limit, and the most 1846 discrepant pixel that has $(value_i - mean)^2$ exceeding this limit is 1847 identified. If there are suspect pixels in the set those pixels are 1848 marked for rejection, otherwise this worst pixel is marked for 1849 rejection. Following this, the combine and test loop is repeated for 1850 until no more pixels are rejected, up to a maximum number of 1851 iterations equal to $50\%$ of the number of inputs. 1852 1853 % combineTest 1854 %% if (Ninput > 6) { use KMM } 1855 %% KMM: 1856 %% Calculate KMMmu KMMsigma KMMpi KMMPunimodal 1857 %% SumWeights = sum(pixelWeights) 1858 %% SysVar = KMMSigma**2 OR (sys * pixelData[i])**2 1859 %% pixelLimts[i] = rej**2 * (pixelVariances[i] + sysVar) 1860 % Iterate 0.5 * Ninput times (at least once) 1861 %% Ninput = 1 => accept 1862 %% Ninput = 2 => if (0.5 * (A - B))**2 > rej**2 * (pixelVariance[A] + pixelVariance[B] + (sys * A)**2 + (sys * B)**2) 1863 %% then if (suspect) mark reject else mark inspect 1864 %% Else => if (useKMM and Punimodal < 0.05) median = KMMmean 1865 %% => else median = combinationWeightedOlympic{} 1866 %% => if (pixelData - median)**2 > pixelLimits[i] then find single worst deviant pixel value 1867 %% then => if suspect (mark reject) else (mark reject worst deviant pixel value) 1868 1869 1870 %% combinationWeightedOlympic => 1871 %% numBad = frac * Ninput + 0.5 1872 %% low = numBad / 2, high = low + numGood - numBad 1873 %% sort(values) => 1874 %% if (i > low && i <= high) { sumValues = sum_i(values * weights); sumWeight = sum_i(weights) 1875 %% return (sumValues / sumWeight) 1876 1877 % obtain lists of inspect and reject pixels. 1878 1879 % normalize:? 1880 % float normalise = powf(10.0, -0.4 * norm->data.F32[i]); // Normalisation 1881 % psBinaryOp(ro->image, ro->image, ``*'', psScalarAlloc(normalise, PS_TYPE_F32)); 1882 % psBinaryOp(ro->variance, ro->variance, ``*'', psScalarAlloc(PS_SQR(normalise), PS_TYPE_F32)); 1839 discrepant pixel that has $(\mathrm{value}_\mathrm{input} - 1840 \mathrm{mean})^2$ exceeding this limit is identified. If there are 1841 suspect pixels in the set, those pixels are marked for rejection, 1842 otherwise this worst pixel is marked for rejection. Following this, 1843 the combine and test loop is repeated for until no more pixels are 1844 rejected, up to a maximum number of iterations equal to $50\%$ of the 1845 number of inputs. 1883 1846 1884 1847 With the initial list of rejected pixels generated, a rejection mask 1885 is made by constructing an empty image that has the rejected pixels 1886 set to a value of 1.0. This image is then convolved with a 5 pixel 1887 FWHM zeroth-order ISIS kernel. Any pixels that are above the threshold of 1888 0.5 after this mask convolution are marked as bad and will be rejected in the final combination. 1889 If more than 10\% of all pixels from an input image are rejected, then 1890 that entire image is rejected as well. 1891 1892 % PIXEL REJECTION 1893 % Construct 15-pixel wide ISIS kernel with 5 pixel FWHM 0-order. 1894 % Construct image of pixels to inspect and convolve with kernel (normalize out kernel power) 1895 % Determine pixels are bad if they're larger than THRESHOLD.MASK = 0.5. 1896 % If more than IMAGE.REJ = 0.1 fraction of pixels are rejected, the entire image is rejected. 1897 1898 1899 \czwdraft{I'm not entirely sure why we do what appears to be a similar 1900 operation twice. It also seems odd that this is in the CombineFinal 1901 step, and not in the Reject step.} Finally, the rejected pixels are 1902 allowed to grow to include pixels that are neighbors to many rejected 1903 pixels. The ISIS kernel used in the previous step is used to 1848 is made for the input warp by constructing an empty image that has the 1849 rejected pixels from that input set to a value of 1.0. This image is 1850 then convolved with a 5 pixel FWHM zeroth-order ISIS kernel. Any 1851 pixels that are above the threshold of 0.5 after this mask convolution 1852 are marked as bad and will be rejected in the final combination. If 1853 more than 10\% of all pixels from an input image are rejected, then 1854 the entire image is rejected as it likely has some systematic issue. 1855 1856 Finally, a second pass at rejecting pixels is conducted, by growing the 1857 current list to include pixels that are neighbors to many rejected 1858 pixels. The ISIS kernel used in the previous step is again used to 1904 1859 determine the largest square box that contains under the limit of 1905 $0.25 * \sum_{x,y} kernel^2$. This box is then convolved with the 1906 rejected pixel mask to reject their neighbors. This final list of 1907 rejected pixels is passed to the final combination, which creates the 1908 final stack values from the weighted mean of the non-rejected pixels. 1909 Six total images are constructed for this final stack: the image, its 1910 variance, a mask, a map of the exposure time per pixel, that exposure 1911 time map weighted by the input image weight, and a map of the number 1912 of inputs per pixel. 1913 1914 % FINAL COMBINE 1915 % Grow rejected pixels 1916 %% set threshold of (POOR.FRACTION = 0.25) * sum(kernel)**2 1917 %% Choose the largest square box that contains just under that threshold. 1918 %% Convolve that box with the rejected pixels to grow them. 1919 % Run combination pass again, but without doing rejection, simply applying the rejection lists already calculated. 1920 % :: 1921 % if (!ppStackCombineFinal(stack, options->convCovars, options, config, false, true, true, true)) { 1922 % iter = 0 1923 % combineRej = NAN 1924 % combineSys = NAN 1925 % combineDiscard = NAN 1926 % if (!pmStackCombine(outRO, expRO, stack, maskBad, maskSuspect, maskBlank, 0, iter, combineRej, 1927 % combineSys, combineDiscard, useVariance, safe, nminpix, rejected)) { 1860 $0.25 * \sum_{x,y} kernel^2$. This square box is then convolved with 1861 the rejected pixel mask to reject the neighboring pixels. This final 1862 list of rejected pixels is passed to the final combination, which 1863 creates the final stack values from the weighted mean of the 1864 non-rejected pixels. Six total images are constructed for this final 1865 stack: the image, its variance, a mask, a map of the exposure time per 1866 pixel, that exposure time map weighted by the input image weight, and 1867 a map of the number of inputs per pixel. 1928 1868 1929 1869 These convolved stack products are not retained, as the convolution … … 1935 1875 across the image, as the different PSF widths of the input images 1936 1876 print through in the different regions to which they have contributed. 1937 1938 % UNCONVOLVED IMAGE1939 % if (!ppStackCombineFinal(stack, options->origCovars, options, config, false, true, false, true)) {1940 % no grow1941 1942 % only retain unconvolved products.1943 1877 1944 1878 %% Asinh compression … … 1958 1892 data values must first be made positive, which then sets the highest 1959 1893 quantization sampling near the lowest values in the image. Following 1960 techniques used by SDSS \citep{ sdss}, we have instead opted to use the1894 techniques used by SDSS \citep{2000AJ....120.1579Y}, we have instead opted to use the 1961 1895 inverse hyperbolic sine function to transform the data. The domain of 1962 1896 this function allows any input value to be converted. In addition, … … 1981 1915 / \alpha) - \exp(-C / \alpha)\right)$. 1982 1916 1917 \begin{figure} 1918 \centering 1919 \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3775944_sci.jpg} 1920 \caption{Example of the stack image for skycell skycell.2047.005 1921 centered at ($\alpha,\delta$) = (179.763, 32.1899) in the \zps{} 1922 filter, stack\_id 3775944. This stack includes 25 input images, 1923 including o4985g0073o the warp image in Figure \ref{fig:warp 1924 image}, and has a combined exposure time of 870s. Combining 1925 such a large number of input images removes the inter-cell and 1926 inter-chip gaps, providing a fully populated image. In addition, 1927 the combined signal allows many more faint objects to be found 1928 than were visible on the single frame warp image.} 1929 1930 \label{fig:stack image} 1931 \end{figure} 1932 1933 \begin{figure} 1934 \centering 1935 \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3775944_mask.jpg} 1936 \caption{Example of the stack mask image for skycell 1937 skycell.2047.005 centered at ($\alpha,\delta$) = (179.763, 1938 32.1899) in the \zps{} filter, stack\_id 3775944. The entire 1939 frame is largely unmasked after combining inputs, with the only 1940 remaining masks falling on the cores of bright stars, and in small 1941 regions around the brightest objects where the overlapping of 1942 diffraction spike masks have removed all inputs.} 1943 1944 \label{fig:stack mask image} 1945 \end{figure} 1946 1947 \begin{figure} 1948 \centering 1949 \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3775944_wt.jpg} 1950 \caption{Example of the stack variance image for skycell 1951 skycell.2047.005 centered at ($\alpha,\delta$) = (179.763, 1952 32.1899) in the \zps{} filter, stack\_id 3775944. The variance 1953 map for this stack is reasonably smooth, with the mottled pattern 1954 from the inter-chip and inter-cell gaps printing through. Some 1955 regions with higher variance are found where the number of inputs 1956 is lower.} 1957 1958 \label{fig:stack wt image} 1959 \end{figure} 1960 1961 \begin{figure} 1962 \centering 1963 \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3775944_num.jpg} 1964 \caption{Example of the stack number image for skycell 1965 skycell.2047.005 centered at ($\alpha,\delta$) = (179.763, 1966 32.1899) in the \zps{} filter, stack\_id 3775944. This map shows 1967 the number of inputs contributing to each pixel of the output 1968 stack. Again, the pattern of the inter-chip and inter-cell gaps 1969 is visible, along with the mask pattern of regions with CTE 1970 problems (visible in the upper right corner). } 1971 1972 \label{fig:stack num image} 1973 \end{figure} 1974 1975 \begin{figure} 1976 \centering 1977 \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3775944_exp.jpg} 1978 \caption{Example of the stack exposure time image for skycell 1979 skycell.2047.005 centered at ($\alpha,\delta$) = (179.763, 1980 32.1899) in the \zps{} filter, stack\_id 3775944. As all input 1981 warps had the same 30s exposure time, this map essentially 1982 recreates the number map, with units of seconds of exposure 1983 instead of number of inputs contributing to a given pixel.} 1984 1985 \label{fig:stack exp image} 1986 \end{figure} 1987 1988 \begin{figure} 1989 \centering 1990 \includegraphics[width=0.9\hsize,angle=0,clip]{images/stack_3775944_expwt.jpg} 1991 \caption{Example of the stack weighted exposure image for skycell 1992 skycell.2047.005 centered at ($\alpha,\delta$) = (179.763, 1993 32.1899) in the \zps{} filter, stack\_id 3775944. This map shows 1994 the weighted average exposure time, as described in the text. It 1995 is similar to the simple exposure time map, but shows how some 1996 input exposures have their contributions weighted down due to the 1997 observed larger image variances.} 1998 1999 2000 \label{fig:stack exp wtimage} 2001 \end{figure} 2002 2003 \section{Difference Images} 2004 \label{sec:diffs} 2005 2006 Constructing difference images is essentially the same as that used in 2007 the stacking process. An image is chosen as a template, another image 2008 as the input, and after matching sources to determine the scaling and 2009 transparency, convolution kernels are defined that are used to 2010 convolve one or both of the images to a target PSF. The images are 2011 then subtracted, and as they should now share a common PSF, static 2012 sources are largely subtracted (completely in an ideal case), whereas 2013 sources that are not static between the two images leave a significant 2014 remnant. More information on the difference image construction is 2015 contained in \citet{price2017}. The follow section contains a 2016 overview of the difference image construction used for the data in 2017 DR2. 2018 2019 The images used to construct difference images can be either 2020 individual warp skycell frames or stacked images, with support for 2021 either to be used as the template or input. In general, for 2022 differences using stacks, the deepest stack (or the only stack in the 2023 case of a warp-stack difference) is used as the template. The PV3 2024 processing used warp-stack differences of all input warps against the 2025 stack that was constructed from those inputs. The same ISIS kernels 2026 as were used in the stack image combination were again used to match 2027 the stack PSF to the input warp PSF. After convolution of the image 2028 products, the difference is constructed for both the positive (warp 2029 minus stack) and inverse (stack minus warp) to allow for the 2030 photometry of the difference image to detect sources that both rise 2031 and fall relative to the stack. Note that the convolution process 2032 grows the mask fraction of pixels relative to the warp (the largest 2033 source of masked pixels in these warp stack differences). Any pixel 2034 that after convolution has any contribution from a masked pixel is 2035 masked as well, ensuring only fully unmasked pixels are used. 2036 2037 For warp-warp differences, such as those used for the ongoing Solar 2038 System moving object search in nightly observations \citep{2013PASP..125..357D}, the 2039 warp that was taken first is used as the template. As there is less 2040 certainty in which of the two input images will have better seeing, a 2041 ``dual'' convolution method is used. Both inputs are convolved to a 2042 target PSF that is not identical to either input. This intermediate 2043 target is essential for the case in which the PSFs of the two inputs 2044 have been distorted in orthogonal directions. Simply convolving one 2045 to match the other would require some degree of deconvolution along 2046 one axis. As this convolution method by necessity uses more free 2047 parameters, the ISIS kernels used are chosen to be simpler than those 2048 used in the warp-stack differences. The ISIS widths are kept the same 2049 (1.5, 3.0, 6.0 pixel FWHMs), but each Gaussian kernel is constrained 2050 to only use a second-order polynomial. As with the warp-stack 2051 differences, the mask fraction grows between the input warp and the 2052 final difference image due to the convolution. For the warp-warp 2053 differences, each image mask grows based on the appropriate 2054 convolution kernel, so the final usable image area is highly dependent 2055 on ensuring that the telescope pointings are as close to identical as 2056 possible. The observing strategy to enable this is discussed in more 2057 detail in \citet{chambers2017}. 2058 2059 2060 1983 2061 \section{Discussion} 1984 2062 \label{sec:discussion} 1985 2063 1986 \czwdraft{Although the detrending and image combination algorithms 1987 work well to produce a consistent and calibrated images, having the 1988 full PV3 data set allows issues to be identified and solutions 1989 created for future improvements to the IPP pipeline. In addition, 1990 the existence of the final calibrated catalog can be used to look 1991 for issues that appear dependent on focal plane position.} 2064 Although the detrending and image combination algorithms work well to 2065 produce a consistent and calibrated images, having the full PV3 data 2066 set allows issues to be identified and solutions created for future 2067 improvements to the IPP pipeline. In addition, the existence of the 2068 final calibrated catalog can be used to look for issues that appear 2069 dependent on focal plane position. 1992 2070 1993 2071 An obvious way to make use of the PV3 catalog is to do a statistical … … 2003 2081 There is some evidence that we have not fully identified all of these 2004 2082 crosstalk rules, based on a study of PV3 images. For example, 2005 extremely bright stars \czwdraft{exp o5677g0123o has this rule, find a 2006 magnitude} may be able to create crosstalk ghosts between the second 2083 extremely bright stars may be able to create crosstalk ghosts between the second 2007 2084 cell column of OTA01 and OTA21, with possibly fainter ghosts appearing 2008 2085 on OTA11. Despite the symmetry observed in the main ghost rules, … … 2036 2113 2037 2114 The fringe model used currently is based on only a limited number of 2038 days of data \czwdraft{one, I believe}. This means that the model 2039 calculated may not be fully sensitive to the exact spectrum of the 2040 sky. This may make the model quality differ based on the date and 2041 local time of observation. There is some evidence that the fringe 2042 model does fit some dates better than others, and so improving this by 2043 expanding the number of input exposures may improve a wider range of 2044 dates. 2045 % o5818g0349o is a good example of bad fringe correction. 2115 days of data. This means that the model calculated may not be fully 2116 sensitive to the exact spectrum of the sky. This may make the model 2117 quality differ based on the date and local time of observation. There 2118 is some evidence that the fringe model does fit some dates better than 2119 others, and so improving this by expanding the number of input 2120 exposures may improve a wider range of dates. 2046 2121 2047 2122 Finally, a large number of issues arise due to the row-to-row bias … … 2056 2131 2057 2132 2058 \czwdraft{I need a good concluding thing to say, so it doesn't end with, ``we should do better next time.''} 2059 2060 The Pan-STARRS1 Surveys (PS1) have been 2061 made possible through contributions by the Institute for Astronomy, the 2062 University of Hawaii, the Pan-STARRS Project Office, the Max-Planck 2063 Society and its participating institutes, the Max Planck Institute for 2064 Astronomy, Heidelberg and the Max Planck Institute for Extraterrestrial 2065 Physics, Garching, The Johns Hopkins University, Durham University, 2066 the University of Edinburgh, the Queen's University Belfast, the 2067 Harvard-Smithsonian Center for Astrophysics, the Las 2068 Cumbres Observatory Global Telescope Network Incorporated, the 2069 National Central University of Taiwan, the Space Telescope Science Institute, and the National 2070 Aeronautics and Space Administration under Grant No. NNX08AR22G issued 2071 through the Planetary Science Division of the NASA Science Mission 2072 Directorate, the National Science Foundation Grant No. AST-1238877, 2073 the University of Maryland, Eotvos Lorand University (ELTE), 2074 and the Los Alamos National Laboratory. 2133 \section{Conclusion} 2134 2135 The Pan-STARRS1 PV3 processing has reduced an unprecedented volume of 2136 image data, and has produced a catalog for the $3\Pi$ Survey 2137 containing hundreds of billions of individual measurements of 2138 three billion astronomical objects. Accurately calibrating 2139 and detrending is essential to ensuring the quality of these results. 2140 The detrending process detailed here produces consistent data, despite 2141 the many individual detectors and their individual response functions. 2142 2143 From these individual exposures, we are able to construct images on 2144 common projections and orientations, further removing the particulars 2145 of any single exposure. Furthermore, by created stacked images, we 2146 can determine an estimate of the true static sky, providing a deep 2147 data set that is ideal for use as a template for image differences. 2148 2149 The Pan-STARRS1 Surveys (PS1) have been made possible through 2150 contributions by the Institute for Astronomy, the University of 2151 Hawaii, the Pan-STARRS Project Office, the Max-Planck Society and its 2152 participating institutes, the Max Planck Institute for Astronomy, 2153 Heidelberg and the Max Planck Institute for Extraterrestrial Physics, 2154 Garching, The Johns Hopkins University, Durham University, the 2155 University of Edinburgh, the Queen's University Belfast, the 2156 Harvard-Smithsonian Center for Astrophysics, the Las Cumbres 2157 Observatory Global Telescope Network Incorporated, the National 2158 Central University of Taiwan, the Space Telescope Science Institute, 2159 and the National Aeronautics and Space Administration under Grant 2160 No. NNX08AR22G issued through the Planetary Science Division of the 2161 NASA Science Mission Directorate, the National Science Foundation 2162 Grant No. AST-1238877, the University of Maryland, Eotvos Lorand 2163 University (ELTE), and the Los Alamos National Laboratory. 2164 2165 \bibliography{lib}{} 2166 \bibliographystyle{apj} 2075 2167 2076 2168 … … 2078 2170 2079 2171 2080 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/GPC1_Detrend_Documentation2081 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/GPC1_Detrend_Documentation#Currentdetrends2082 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/stacking_coverage.201303072083 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/staticsky.20120706_excess_detections2084 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Stack_Rejection_Discussion2085 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Stack_Algorithm
Note:
See TracChangeset
for help on using the changeset viewer.
