Changeset 39817 for trunk/doc/release.2015/ps1.detrend/detrend.tex
- Timestamp:
- Nov 17, 2016, 6:06:50 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/doc/release.2015/ps1.detrend/detrend.tex (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/release.2015/ps1.detrend/detrend.tex
r39799 r39817 181 181 \czwdraft{Should there be a discussion of any header keywords/OTA file formats?} 182 182 183 Section \ref{sec:detrend construction} provides an overview of the 184 detrend creation process for GPC1, with details of the application of 185 those detrends to correct particular issues in Section 186 \ref{sec:detrending}. An analysis of the algorithms used to complete 187 the \ippstage{warp} (section \ref{sec:warping}) and \ippstage{stack} 188 (section \ref{sec:stacking}) stage transformations of the image data 189 to from the detector frame to a common sky frame, and the co-adding of 190 those common sky frame images continues after the list of detrend 191 steps. Finally, a discussion of the remaining issues and possible 192 future improvements is presented in section \ref{sec:discussion}. 183 Section \ref{sec:detrending} provides an overview of the detrending 184 process that corrects the instrumental signatures of GPC1, with 185 details of the construction of those detrends in Section 186 \ref{sec:detrend construction}. An analysis of the algorithms used to 187 complete the \ippstage{warp} (section \ref{sec:warping}) and 188 \ippstage{stack} (section \ref{sec:stacking}) stage transformations of 189 the image data to from the detector frame to a common sky frame, and 190 the co-adding of those common sky frame images continues after the 191 list of detrend steps. Finally, a discussion of the remaining issues 192 and possible future improvements is presented in section 193 \ref{sec:discussion}. 193 194 194 195 … … 216 217 %\section{General Detrend Discussion} 217 218 %\label{sec:detrending} 219 220 221 \section{GPC1 Detrend Details} 222 \label{sec:detrending} 223 224 Ensuring a consistent and uniform detector response across the 225 three-degree diameter field of view of the GPC1 camera is essential to 226 a well calibrated survey. Many standard image detrending steps are 227 done for GPC1, with overscan subtraction removing the detector bias 228 level, dark frame subtraction to remove temperature and exposure time 229 dependent detector glows, and flat field correction to remove pixel to 230 pixel response functions. We also construct fringe correction for the 231 reddest data in the y filter, to remove the interference patterns that 232 arise in that filter due to the variations in the thickness of the 233 detector surface. 234 235 These corrections, however, assume that the detector response is 236 linear across the full range of values. This is not universally the 237 case with GPC1, and this requires an additional set of detrending 238 steps to remove these non-linear responses. The first of these is the 239 \ippprog{burntool} correction, which removes the persistence trails 240 caused by the incomplete transfer of charge along the readout columns. 241 This bright-end nonlinearity is generally only evident for the 242 brightest stars, as only pixels that are at or beyond the saturation 243 point of the detector have this issue. More widespread is the 244 non-linearity at the faint end of the pixel range. Some readout cells 245 and some readout cell edge pixels experience a sag relative to linear 246 at low illumination, such that faint pixels appear fainter than 247 expected. The correction to this requires amplifying the pixel values 248 in these regions to match the expected model. 249 250 The final non-linear response issue has no good option for correction. 251 Large regions of some OTA cells experience significant charge transfer 252 issues, making them unusable for science observations. These regions 253 are therefore masked in processing, with these CTE regions making up 254 the largest fraction of masked pixels on the detector. Other regions 255 are masked for other regions, such as static bad pixel features or 256 temporary readout masking caused by issues in the camera electronics 257 that make these regions unreliable. These all contribute to the 258 detector mask, which is augmented in each exposure for dynamic 259 features that are masked based on the astronomical features within the 260 field of view. 261 262 For the PV3 processing, all detrending is done by the 263 \ippprog{ppImage} program. This program applies the detrends to the 264 individual cells, and then an OTA level mosaic is constructed for the 265 science image, the mask image, and the variance map image. The single 266 epoch photometry is done at this stage as well. The following 267 subsections (\ref{sec:burntool} - \ref{sec:background}) detail these 268 detrending steps, presented in the order in which they are applied to 269 the individual OTA image data. 270 271 \subsection{Burntool / Persistence effect} 272 \label{sec:burntool} 273 274 Pixels that approach the saturation point on GPC1, which varies by 275 readout with common values around 60000 DN, cause persistence problems 276 on that and subsequent images. During the read out process of an 277 image with such a bright pixel, some of the charge associated with it 278 is not fully shifted down the detector column toward the amplifier. 279 As a result, this charge remains in the starting cell, and is 280 partially collected in subsequent shifts, resulting in a ``burn 281 trail'' that extends from the center of the bright source away from 282 the amplifier (vertically along the pixel columns toward the top of 283 the cell). 284 285 This incomplete charge shifting in nearly full wells continues as each 286 row is read out. This results in a remnant charge being deposited in 287 the pixels that the full well was shifted through. In following 288 exposures, this remnant charge leaks out, resulting in a trail that 289 extends from the initial location of the bright source on the previous 290 image towards the amplifier (vertically down along the pixel column). 291 This remnant charge can remain on the detector for up to thirty 292 minutes, requiring the locations of these ``burns'' be retained 293 between exposures. 294 295 Both of these types of persistance trails are measured and optionally 296 repaired via the \ippprog{burntool} program. This program does an 297 initial scan of the images, and identifies objects with pixel values 298 brighter than a conservative threshold of 30000 DN. The trail from 299 the peak of that object is fit with a one-dimensional power law in 300 each pixel column above the threshold, based on empirical evidence 301 that this is the functional form of this persistence effect. This 302 also matches the expectation that a constant fraction of charge is 303 incompletely transfered at each shift beyond the persistence 304 threshold. Once this fit is done, the model can be subtracted from 305 the image, and the location of the star is stored in a table along 306 with the exposure PONTIME, which denotes the number of seconds since 307 the detector was last powered on, and provides an internally consistent 308 time scale. 309 310 For subsequent exposures, the table associated with the previous image 311 is read in, and after correcting trails from the stars on the new 312 image, the positions of the bright stars from the table are used to 313 check for remnant trails on the image. These are fit and subtracted 314 using a one-dimensional exponential model, again based on empirical 315 studies. If a significant model is found, then this location is 316 retained in the image output table. If not, the old burn is allowed 317 to expire. 318 319 The main concern with this method of correcting the persistance trails 320 is that it is based on fits to the raw image data, which may have 321 other signal sources not determined by the persistence effect. The 322 presence of other stars or artifacts along the path of the burn can 323 result in a poor model to be fit, resulting in either an over- or 324 under-subtraction of the persistance burn. For this reason, the image 325 mask is marked with a value indicating that this correction has been 326 applied. These pixels are not fully excluded, but they are marked as 327 suspect, which allows them to be excluded from consideration in 328 subsequent stages, such as image stacking. 329 330 Another concern is that the cores of very bright stars are deformed by 331 this process, as the burntool fitting subtracts flux 332 from only one side of the star. As most stars that result in burns already 333 have saturated cores, they are already ignored for the purpose of 334 PSF determination and are flagged as saturated by the photometry 335 reduction. 336 337 \begin{figure} 338 \centering 339 \begin{minipage}{0.45\hsize} 340 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt_trail.png} 341 % \caption{(a)} 342 % \end{subfigure}% 343 % \begin{subfigure}[]{.45\hsize} 344 \end{minipage}% 345 \begin{minipage}{0.45\hsize} 346 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt_trail.png} 347 % \caption{(b)} 348 % \end{subfigure} 349 \end{minipage} 350 351 \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 g-filter with exposure times of 43s} 352 \end{figure} 353 354 \begin{figure} 355 \centering 356 \begin{minipage}{0.45\hsize} 357 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_nobt.png} 358 % \caption{(a)} 359 % \end{subfigure}% 360 % \begin{subfigure}[]{.45\hsize} 361 \end{minipage}% 362 \begin{minipage}{0.45\hsize} 363 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_nobt.png} 364 % \caption{(b)} 365 % \end{subfigure} 366 \end{minipage} 367 \begin{minipage}{0.45\hsize} 368 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt.png} 369 % \caption{(a)} 370 % \end{subfigure}% 371 % \begin{subfigure}[]{.45\hsize} 372 \end{minipage}% 373 \begin{minipage}{0.45\hsize} 374 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt.png} 375 % \caption{(b)} 376 % \end{subfigure} 377 \end{minipage} 378 \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.} 379 \end{figure} 380 381 382 \subsection{Overscan} 383 \label{sec:overscan} 384 385 Each cell on GPC1 has an overscan region that covers the first 34 386 columns of each row, and the last 10 rows of each column. No light 387 lands on these pixels, so the image region is trimmed to exclude them. 388 Each row has an overscan value subtracted, calculated by finding the 389 median value of that row's overscan pixels and then smoothing between 390 rows with a three-row boxcar median. 391 392 \subsection{Non-linearity Correction} 393 \label{sec:nonlinearity} 394 % check notebook, 2010-07/08 395 396 The pixels of GPC1 are not uniformly linear at all flux levels. In 397 particular, at low flux levels, some pixels have a tendency to sag 398 relative to the expected linear value. This effect is most pronounced 399 along the edges of the detector cells, although some entire cells show 400 evidence of this effect. 401 402 To correct this sag, we studied the flux behavior of a series of flat 403 frames for a ramp of exposure times with approximate logarithmically 404 equal spacing between 0.01s and 57.04s. As the exposure time 405 increases, the flux on each pixel also increases in what is expected 406 to be a linear manner. Each of these flat exposures in this ramp is 407 overscan corrected, and then the median is calculated for each cell, 408 as well as for the rows and columns within ten pixels of the edge of 409 the science region. From these median values at each exposure time 410 value, we can construct the expected trend by fitting a linear model, 411 $f_{region} = G * t_{exp} + B$, to determine the gain, $G$, and the 412 bias, $B$, for the region considered. This fitting was limited to only 413 the range of fluxes between 12000 and 38000 counts, as these ranges 414 were found to match the linear model well. This range avoids the 415 non-linearity at low fluxes, as well as the possibility of high-flux 416 non-linearity effects. 417 418 We store the average flux measurement and deviation from the linear 419 fit for each exposure time for all regions on all detector cells in 420 the linearity detrend look up tables. When this is applied to science 421 data, these lookup tables are loaded, and a linear interpolation is 422 performed to determine the correction needed for the flux in that 423 pixel. This look up is performed for both the row and column of each 424 pixel, to allow the edge correction to be applied where applicable, 425 and the full cell correction elsewhere. The average of these two 426 values is then applied to the pixel value, reducing the effects of 427 pixel nonlinearity. 428 429 This non-linearity effect appears to be stable in time for the 430 majority of the detector pixels, with little evident change over the 431 survey duration. However, as the non-linearity is most pronounced at 432 the edges of the detector cells, those are the regions where the 433 correction is most likely to be incomplete. Because of this fact, 434 most pixels in the static mask with either the DARKMASK or FLATMASK 435 bit set are found along these edges. As the non-linearity correction 436 is unable to reliably restore these pixels, they produce inconsistent 437 values after the dark and flat have been applied, and are therefore 438 rejected. 439 440 %% exptime n_included/det_id = 372 441 %% clearly this isn't the one used, as 3-12 spans three data points, poorly.x 442 %% 0.01 2 443 %% 0.14 2 444 %% 0.27 2 445 %% 0.49 2 446 %% 0.72 2 447 %% 1.06 2 448 %% 1.41 2 449 %% 2.02 2 450 %% 2.63 2 451 %% 3.94 2 452 %% 5.25 2 453 %% 8.74 2 454 %% 13.09 2 455 %% 17.4 2 456 %% 20.86 2 457 %% 24.3 2 458 %% 27.78 2 459 %% 31.24 2 460 %% 34.65 2 461 %% 38.12 2 462 %% 42.41 2 463 %% 46.69 2 464 %% 51.89 2 465 %% 57.04 2 466 467 468 %http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/DetectorLinearity_AllEdges 469 %http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/DetectorLinearityArchive 470 471 \begin{figure} 472 \centering 473 \includegraphics[width=0.9\hsize,angle=0,clip]{images/linearity_XY27_xy16.png} 474 \caption{Example plot of the linearity correction as a fraction of observed flux for OTA27, cell xy16.} 475 \end{figure} 476 477 \subsection{Dark/Bias Subtraction} 478 \label{sec:dark} 479 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Background_Dark_Model 480 481 The dark model we make for GPC1 considers each pixel individually, 482 independent of any neighbors. To construct this model, we fit a 483 multi-dimensional model to the array of input pixels from a randomly 484 selected set of 100-150 overscan and non-linearity corrected dark 485 frames chosen from a given date range. The model fits each pixel as a 486 function of the exposure time $t_{exp}$ and the detector temperature 487 $T_{chip}$ of the input images such that $\mathrm{dark} = a_0 + a_1 488 t_{exp} + a_2 T_{chip} t_{exp} + a_3 T_{chip}^2 t_{exp}$. This 489 fitting uses two iterations to produce a clipped fit, rejecting at the 490 $3\sigma$ level. The final coefficients $a_i$ for the dark model are 491 stored in the detrend image. The constant $a_0$ term includes the 492 residual bias signal after overscan subtraction, and as such, a 493 separate bias subtraction is not necessary. 494 495 Applying the dark model is simply a matter of calculating the response 496 to the exposure time and detector temperature for the image to be 497 corrected, and subtracting the resulting dark signal from the image. 498 499 \subsubsection{Time evolution} 500 501 The dark model is not consistently stable over the full survey, with 502 significant drift over the course of multiple months. Some of the 503 changes in the dark can be attributed to changes in the voltage 504 settings of the GPC1 controller electronics, but the majority seem to 505 be the result of some unknown parameter. We can separate the dark 506 model history of GPC1 into three epochs. The first epoch covers all 507 data taken prior to 2010-01-23. This epoch used a different header 508 keyword for the detector temperature, making data from this epoch 509 incompatible with later dark models. 510 511 The second epoch covers data between 2010-01-23 and 2011-05-01, and is 512 characterized by a largely stable but oscillatory dark solution. 513 There are two modes that the dark model switches between apparently at 514 random. No clear cause has been established for the switching, but 515 there are clear differences between the two modes that require the 516 observation dates to be split to use the model that is most 517 appropriate. 518 519 The initial evidence of these two modes comes from the discovery of a 520 slight gradient along the rows of certain cells. This is a result of 521 a drift in the bias level of the detector as it is read out. An 522 appropriate dark model should remove this gradient entirely. For 523 these two modes, the direction of this bias drift is different, so a 524 single dark model generated from all dark images in the time range 525 over corrects the positive-gradient mode, and under corrects the 526 negative-gradient mode. Upon identifying this two-mode behavior, and 527 determining the dates each mode was dominant, two separate dark 528 models were constructed from appropriate ``A'' and ``B'' mode dark 529 frames. Using the appropriate dark minimizes the effect of this bias 530 gradient in the dark corrected data. 531 532 The bias drift gradients of the mode switching can be visualized in 533 Figure \ref{fig:dark switching}. This figure shows the image profile 534 along the x-pixel axis binned along the full y-axis of the first row 535 of cells. The raw data is shown, illustrating the positional 536 depenendence the dark signal has on the image values. In addition, 537 both the correct B-mode dark and incorrect A-mode dark have been 538 applied to this image, showing that although both correct the bulk of 539 the dark signal, using the incorrect mode creates larger intensity 540 gradients. 541 542 After 2011-05-01, the two-mode behavior of the dark disappears, and is 543 replaced with a slow observation date dependent drift in the magnitude 544 of the gradient. This drift is sufficiently slow that we have modeled 545 it using three observation date independent dark model for different 546 date ranges. These darks cover the range from 2011-05-01 to 547 2011-08-01, 2011-08-01 to 2011-11-01, and 2011-11-01 and on. The 548 reason for this time evolution is unknown, but as it is correctable 549 with a small number of dark models, this does not significantly impact 550 detrending. 551 552 \begin{figure} 553 \centering 554 % \begin{subfigure}[]{.45\hsize} 555 \begin{minipage}{0.45\hsize} 556 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_M_OS_NL_XY23_b1.jpg} 557 % \caption{(a)} 558 % \end{subfigure}% 559 % \begin{subfigure}[]{.45\hsize} 560 \end{minipage}% 561 \begin{minipage}{0.45\hsize} 562 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_to_DARK_XY23_b1.jpg} 563 % \caption{(b)} 564 % \end{subfigure} 565 \end{minipage} 566 \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.} 567 \end{figure} 568 569 \begin{figure} 570 \centering 571 \includegraphics[width=0.9\hsize,angle=0,clip]{images/B_profile_ex.png} 572 \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, 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.} 573 \label{fig:dark switching} 574 \end{figure} 575 576 \subsubsection{Video Dark} 577 \label{sec:video_darks} 578 579 The dark signal is stronger in cell corners due to glow from the 580 read-out amplifiers. The standard dark model corrects this for most 581 observations. However, as mentioned above, when a cell is repeatedly 582 read in video mode, the dark model for the OTA containing it changes. 583 Surprisingly, added reads for the video cell do not amplify the 584 amplifier glow, but rather decrease the dark signal in these regions. 585 As a result, using the standard dark model on the data for these OTAs 586 results in oversubtraction of the corner glow. 587 588 Video darks have been constructed to eliminate the effect this 589 observational change has on the final image quality. This was done by 590 running the standard dark construction process on a series of dark 591 frames that have had the video signal enabled for some cells. GPC1 592 can only run video signals on a subset of the OTAs at a given time. 593 This requires two passes to enable the video signal across the full 594 set of OTAs that support video cells. This is convenient for the 595 process of creating darks, as those OTAs that do not have video 596 signals enabled create standard dark models, while the video dark is 597 created for those that do. 598 599 This simultaneous construction of video and standard dark models is 600 useful, as it provides the ability to isolate the response on the 601 standard dark from the video signals. Isolating this response is 602 essential for attempting to create archival video darks. We only have 603 raw video dark frame data after 2012-05-16, when this problem was 604 initially identified, so any data prior to that can not be directly 605 corrected for the video dark signal. Isolating the video signal 606 response allows linear corrections to the pre-existing standard dark 607 models for archival data. Testing this shows that constructing a 608 video dark for older data simply as $VD_{2009} = D_{2009} - D_{Modern} 609 + VD_{Modern}$ produces a satisfactory result that does not 610 oversubtract the amplifier glow. This is shown in figure 611 \ref{fig:video_darks}, which shows video cells from before 2012-05-16, 612 corrected with both the standard and video darks, with the early video 613 dark constructed in such a manner. 614 615 \begin{figure} 616 \centering 617 % \begin{subfigure}[]{.45\hsize} 618 \begin{minipage}{0.45\hsize} 619 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_Rdark_XY22_b1.jpg} 620 % \caption{(a)} 621 % \end{subfigure}% 622 % \begin{subfigure}[]{.45\hsize} 623 \end{minipage}% 624 \begin{minipage}{0.45\hsize} 625 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_VDdark_XY22_b1.jpg} 626 % \caption{(b)} 627 % \end{subfigure} 628 \end{minipage} 629 \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.} 630 \label{fig:video_darks} 631 \end{figure} 632 633 \subsection{Noisemap} 634 \label{sec:noisemap} 635 636 Based on a study of the positional dependence of all detected sources, 637 we have discovered that the cells in GPC1 do not have uniform noise 638 characteristics. Instead, there is a gradient along the pixel rows, 639 with the noise generally higher away from the read out amplifier 640 (higher cell x pixel positions). This is likely an effect of the 641 row-by-row bias issue discussed below. This gradient causes the read 642 noise to increase as the row is read out. As a result of this 643 increased noise, more sources are detected in the higher noise regions 644 when the read noise is assumed constant across the readout. To 645 mitigate this noise gradient, we constructed an initial set of 646 noisemap images by measuring the median variance on bias frames. The 647 variance is calculated in boxes of 20x20 pixels, and then linearly 648 interpolated to cover the full image. 649 650 Unfortunately, due to correlations within this noise, the variance 651 measured from the bias images does not fully remove the positional 652 dependence of objects that are detected. This simple noisemap 653 underestimates the noise observed when the image is filtered during 654 the object detection process. This filtering convolves the background 655 noise with a PSF, which has the effect of amplifying the correlated 656 peaks in the noise. This amplification can therefore boost background 657 fluctuations above the threshold used to select real objects, 658 contaminating the final object catalogs. 659 660 In the detection process, we expect false positives at a rate equal to 661 the one-tailed probability beyond the detection threshold. For these 662 tests, only detections measured at the $\sigma_{thresh} = 5\sigma$ 663 level are used, to match that used in the photometry on science data. 664 This probability can be converted into a number of false number by 665 considering a given area. As the detections must be isolated to not 666 be detected as an extended object, this area must be reduced by the 667 area a given PSF occupies. Combining this, we find that we expect a 668 probability $P = 1 - \Phi_{normal}(5) = \frac{1}{2} 669 \erfcinv\left(\frac{5}{\sqrt{2}}\right)$, and an area given $N$ 670 exposures of area $X\times Y$, $A = \frac{X \times Y \times 671 N}{A_{PSF}}$. For a typical $1"$ seeing, $A_{PSF}$ is approximately 672 16 pixels. Using this model for the false positives, we found that 673 the added read noise was insufficient to account for the observed 674 false positive rate. Inverting this relation, we can measure 675 $\sigma_{obs}$, the true threshold level based on the number of false 676 positives observed. This $\sigma_{obs}$ is the combined to form a 677 boost factor $B = \sigma_{thresh} / \sigma_{obs}$ that amplifies the 678 noisemap to match the observed false detection rate. 679 680 The row-to-row variations that contribute to the extra noise are 681 related to the dark model, and because of this, as the dark model 682 changes, the effective noise also changes. To ensure that the 683 noisemap accurately matches the true noise level, we have created 684 different noisemap models for the three major time ranges of the dark 685 model. We do not see any strong evidence that the noisemaps have the 686 A/B modes visible in the dark, and so we do not generate different 687 models for each individual dark model. The additional pixel-to-pixel 688 variance from this noisemap is added to the Poissonian variance to 689 form the science variance image generated by the \ippstage{chip} 690 processing. 691 692 \subsection{Flat} 693 694 Determining a flat field correction for GPC1 is a challenging 695 endeavor, as the wide field of view makes it difficult to construct a 696 uniformly illuminated image. Using a dome screen is not possible, as 697 the variations in illumination and screen rigidity create large 698 scatter between different images that are not caused by the detector 699 response function. Because of this, we use sky flat images taken at 700 twilight, which are more consistently illuminated than screen flats. 701 We calculate the mean of these images to determine the initial flat 702 model. 703 704 From this starting skyflat model, we construct a photometric 705 correction to remove the effect of the illumination differences over 706 the detector surface. This is done by dithering a series of science 707 exposures with a given pointing. By fully calibrating these exposures 708 with the initial flat model, and then comparing the measured fluxes 709 for the same star as a function of position on the detector, we can 710 determine position dependent scaling factors. From the set of scaling 711 factors for the full catalog of stars observed in the dithered 712 sequence, we can construct a model of the error in the initial flat 713 model as a function of detector position. Applying a correction that 714 reduces the amplitude of these errors produces a flat field model that 715 better represents the true detector response. 716 717 \czwdraft{EAM: the flat-field construction part needs to make a clearer discussion of 718 the skyflat vs the photometric correction (photflat) built initially for 719 the survey vs the flat-field corrections determined in the database as part 720 of ubercal (for the latter, you should just mention the concept -- it will 721 also be mentioned in the calibration paper). The statement that the 722 flat-field response was stable is not true since we did need 5 'seasons'.} 723 724 In addition to this flat field applied to the individual images, the 725 ubercal process used to calibrate the database of all detections 726 \citep{ubercal} constructs internal ``flat field'' corrections. 727 Although a single set of image flat fields was used for the entire PV3 728 survey, five separate ``seasons'' of database flat fields were needed 729 to ensure proper calibration. This indicates that the flat field 730 response is not completely fixed in time. 731 732 \subsection{Pattern correction} 733 \label{sec:pattern} 734 735 Due to detector specific issues that are not cleanly removed by the 736 dark model, we have a set of ``pattern'' corrections that are applied 737 to some selection of the OTAs in the camera. This is done to reduce 738 the effect that detector differences have on the measured astronomical 739 signal that are not stable enough to be corrected with a static model. 740 Because of this, the pattern corrections attempt to identify and 741 correct the detector issues based on appropriate filtering the 742 individual science exposures. 743 744 The PATTERN.ROW correction is used to remove any remaining row-by-row 745 bias variation, and the PATTERN.CELL and PATTERN.CONTINUITY 746 corrections attempt to ensure that the cells of a given OTA are 747 consistent with the other cells on that OTA. 748 749 \subsubsection{Pattern Row} 750 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/GPC1_Bias_Pattern_Study 751 As discussed above in the dark and noisemap sections, certain 752 detectors have significant bias offsets between adjacent rows, caused 753 by noise in the camera control electronics. The magnitude of these 754 offsets increases as the distance from the readout amplifier 755 increases, resulting in horizontal streaks that are more pronounced 756 along the large x pixel edge of the cell. As the level of the offset 757 is apparently random between exposures, the dark correction cannot 758 fully remove this structure from the images, and the noisemap value 759 only indicates the level of the average variance added by these bias 760 offsets. Therefore, we apply the PATTERN.ROW correction in an attempt 761 to mitigate the offsets and correct the image values. To force the 762 rows to agree, a second order clipped polynomial is fit to each row in 763 the cell. Four fit iterations are run, and pixels $2.5\sigma$ deviant 764 are excluded from subsequent fits, to minimize the effect stars and 765 other astronomical signals have. This final trend is then subtracted 766 from that row. Simply doing this subtraction will also have the 767 effect of removing the background sky level. To prevent this, the 768 constant and linear terms for each row are stored, and linear fits are 769 made to these parameters as a function of row, perpendicular to the 770 initial fits. This produces a plane that is added back to the image 771 to restore the background offset and any linear ramp that exists in 772 the sky. 773 774 This correction was required on all cells on all OTAs prior to 775 2009-12-01, at which point a modification of the camera electronics 776 reduced the scale of the row-by-row offsets for the majority of the 777 OTAs. As a result, we only apply this correction to the cells where 778 it is still necessary, as shown in Figure \ref{fig: pattern row 779 cells}. A list of these cells is listed in Table 780 \ref{tab:pattern_row_cells}. 781 782 Although this correction does largely resolve the row-by-row offset 783 issue in a satisfactory way, large and bright astronomical objects can 784 bias the fit significantly. This results in an oversubtraction of the 785 offset near these objects. As the offsets are calculated on the pixel 786 rows, this oversubtraction is not uniform around the object, but is 787 preferentially along the horizontal x axis of the object. Most 788 astronomical objects are not significantly distorted by this, with 789 this only becoming on issue for only bright objects comparable to the 790 size of the cell (598 pixels = 150"). 791 792 %% \czwdraft{keep this?} This row-by-row offset is visible in similar 793 %% camera designs, and has been removed by identifying the noise signal 794 %% in the pixel data stream. By taking the FFT of the pixels and a 795 %% reference signal, the frequency of this noise can be isolated and 796 %% removed, resulting in a much cleaner image. However, GPC1 does not 797 %% record the value of the reference signal, instead automatically 798 %% subtracting it from the data values. Without this comparison signal, 799 %% we have been unable to reproduce this method, as there is no obvious 800 %% FFT component visible. 801 802 \begin{deluxetable}{lcccc} 803 \tablecolumns{3} 804 \tablewidth{0pc} 805 \tablecaption{Cells which have PATTERN.ROW correction applied} 806 \tablehead{\colhead{OTA} & \colhead{Cell columns} & \colhead{Additional cells}} 807 \startdata 808 OTA11 & & xy02, xy03, xy04, xy07 \\ 809 OTA14 & & xy23 \\ 810 OTA15 & 0 & \\ 811 OTA27 & 0, 1, 2, 3, 7 & \\ 812 OTA31 & 7 & \\ 813 OTA32 & 3, 7 & \\ 814 OTA45 & 3, 7 & \\ 815 OTA47 & 0, 3, 5, 7 & \\ 816 OTA57 & 0, 1, 2, 6, 7 & \\ 817 OTA60 & & xy55 \\ 818 OTA74 & 2, 7 & \\ 819 \enddata 820 \label{tab:pattern_row_cells} 821 \end{deluxetable} 822 823 \begin{figure} 824 \centering 825 \includegraphics[width=0.9\hsize,angle=0,clip]{images/pattern_row_edit.png} 826 \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.} 827 \label{fig: pattern row cells} 828 \end{figure} 829 830 \begin{figure} 831 \centering 832 \begin{minipage}{0.45\hsize} 833 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_nopat.png} 834 % \caption{(a)} 835 % \end{subfigure}% 836 % \begin{subfigure}[]{.45\hsize} 837 \end{minipage}% 838 \begin{minipage}{0.45\hsize} 839 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_pat.png} 840 % \caption{(b)} 841 % \end{subfigure} 842 \end{minipage} 843 \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.} 844 \end{figure} 845 846 \subsubsection{Pattern Continuity} 847 848 As the PATTERN.CELL correction was insufficient in many situations, we 849 designed a replacement correction that would reduce the background 850 distortion for large objects. In addition, studies of the background 851 level illustrated that the row-by-row bias can introduce small 852 background gradient variations along the rows of the cells that is not 853 stable enough to be completely fit by the dark model. This common 854 feature across the columns of cells results in a ``saw tooth'' pattern 855 horizontally across an OTA, and as the background model fits a smooth 856 sky level, this induces over and under subtraction at the cell 857 boundaries. As the PATTERN.CELL was designed to correct changes only 858 in the median value between cells, it could not adequately resolve 859 this higher order issue. 860 861 The replacement for PATTERN.CELL is the PATTERN.CONTINUITY correction, 862 which attempts to match the edges of a cell to those of its neighbors. 863 For each cell, a thin box 10 pixels wide on each edge is extracted and 864 the median value of unmasked values calculated for that box. These 865 median values are then used to construct a vector of differences 866 $\Delta_i = \sum_{j} Edge_{i} - Edge_{j}$, along with a matrix of 867 associations $A_{i,i'} = \sum_{j} \delta(i,j) \delta(j,i')$ denoting 868 which cell boundaries are adjacent. By solving the system $A x = 869 diff$, we find the set of offsets $x_i$ to be applied to each cell to 870 ensure the minimum differences between all cell edges and their 871 neighbors. 872 873 For OTAs that initially show the saw tooth pattern, the effect of this 874 correction is to align the cells into a single ramp, at the expense of 875 the absolute background level. However, as we subtract off a smooth 876 background model prior to doing photometry, these deviations from an 877 absolute sky level are unimportant. The fact that the final ramp is 878 smoother than it would be otherwise also allows for the background 879 subtracted image to more closely match the astronomical sky, without 880 significant errors at cell boundaries. An example of the effect of 881 this correction on an image profile is shown in Figure \ref{fig:dark switching}. 882 883 %% \begin{figure} 884 %% \centering 885 %% \caption{Continuity example, with background issue.} 886 %% \label{fig: continuity example} 887 %% \end{figure} 888 889 \subsection{Fringe correction} 890 \label{sec:fringe} 891 % det_id 296 is the fringe we use. 892 893 Due to variations in the thickness of the detectors, we observe 894 interference patterns at the infrared end of the filter set, as the 895 wavelength of the light becomes comparable to the thickness of the 896 detectors. Visually inspecting the images shows that the fringing is 897 most prevalent in the y filter images, with negligible fringing in the 898 other bands. As a result of this, we only apply a fringe correction 899 to the y filter data. 900 901 The fringe used for PV3 processing was constructed from a set of 20 902 120s science exposures. These exposures are overscan subtracted, and 903 corrected for non-linearity, and have the dark and flat models 904 applied. These images are smoothed with a Gaussian kernel with 905 $\sigma = 2$ pixels to minimize pixel to pixel noise. The fringe 906 image data is then constructed by calculating the clipped mean of the 907 input images with two iteration of clipping at the $3\sigma$ level. 908 909 A course background model for each cell is constructed by calculating 910 the median on a 3x3 grid (approximately 200x200 pixels each). A set 911 of 1000 randomly selected points are then selected on the fringe image 912 for each cell, and a median calculated for this position in a 10x10 913 pixel box, with the background level subtracted. These sample 914 locations provide scale points to allow the amplitude of the measured 915 fringe to be compared to that found on science images. 916 917 To apply the fringe, the same sample locations are measured on the 918 science image to determine the relative strength of the fringing in 919 that particular image. A least squares fit between the fringe 920 measurements and the corresponding measurements on the science image 921 provides the scale factor multiplied to the fringe before it is 922 subtracted from the science image. 923 924 \begin{figure} 925 \centering 926 \begin{minipage}{0.5\hsize} 927 \includegraphics[width=1.0\hsize,angle=0,clip]{images/o5220g0025o_XY53_nofringe.png} 928 % \caption{(a)} 929 % \end{subfigure}% 930 % \begin{subfigure}[]{.45\hsize} 931 \end{minipage}% 932 \begin{minipage}{0.5\hsize} 933 \includegraphics[width=1.0\hsize,angle=0,clip]{images/o5220g0025o_XY53_fringe.png} 934 % \caption{(b)} 935 % \end{subfigure} 936 \end{minipage} 937 \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.}} 938 \label{fig: fringe example} 939 \end{figure} 940 941 \subsection{Masking} 942 \label{sec:masking} 943 944 \subsubsection{Static Masks} 945 \label{sec:static_masks} 946 947 Due to the large size of the detector, it is expected that there 948 are a number of pixel defects that do not have the detection 949 sensitivity on par with their neighbors. To remove these pixels, we 950 have constructed a static mask that identifies the known defects. 951 This mask is constructed in three phases. 952 953 First, a CTEMASK is constructed to mask out regions in which the 954 charge transfer efficiency is low compared to the rest of the 955 detector. Twenty-five of the sixty OTAs in GPC1 show some evidence of 956 CTE issues, with this pattern appearing (to varying degrees) in 957 roughly triangular patches on the OTA due to defects in the 958 semiconductor manufacturing. To generate the mask for these regions, 959 a sample set of 26 evenly illuminated flat field images were measured 960 to produce a map of the image variance in 20x20 pixel bins. As the 961 flat image is expected to illuminate the image uniformly, the expected 962 variances in each bin should be Poissonian distributed with the flux 963 level. However, in regions with CTE issues, adjacent pixels are not 964 independent, as the charge in those pixels is more free to spread. 965 This reduces the pixel-to-pixel differences, resulting in a lower than 966 expected variance. All regions with variance less than half the 967 average image level are added to the static CTEMASK. 968 969 The next step of mask construction is to examine the flat and dark 970 models, and exclude pixels that appear to be poorly corrected by these 971 models. The DARKMASK process looks for pixels that are more than 972 $8\sigma$ discrepant in $10\%$ of the 100 input dark frame images 973 after those images have had the dark model applied to them. These 974 pixels are assumed to be unstable with respect to the dark model, and 975 have the DARK bit set in the static mask, indicating that they are 976 unreliable in scientific observing. Similarly, the FLATMASK process 977 looks for pixels that are $3\sigma$ discrepant in the same fraction of 978 16 input flat field images after both the dark and flat models have 979 been applied. Those pixels that do not follow the flat field model of 980 the rest of image are assigned the FLAT mask bit in the static mask, 981 removing the pixels that cannot be corrected to a linear response. 982 983 The final step of mask construction is to examine the detector for 984 bright columns and other static pixel issues. This is first done by 985 processing a set of 100 i filter science images in the same fashion as 986 for the DARKMASK. A median image is constructed from these inputs 987 along with the per-pixel variance. These images are used to identify 988 pixels that have unexpectedly low variation between all inputs, as 989 well as those that significantly deviate from the global median value. 990 Once this initial set of bad pixels is identified, a $3\times{}3$ 991 pixel triangular kernel is convolved with the initial set, and any 992 convolved pixel with value greater than 1 is assigned to the static 993 mask. This does an excellent job of removing the majority of the 994 problem pixels. A subsequent manual inspection allows human 995 interaction to identify other inconsistent pixels including the 996 vignetted regions around the edge of the detector. 997 998 Figure \ref{fig:static mask} shows an example of the static mask for 999 the full GPC1 field of view. Table \ref{tab:mask_values} lists the 1000 bit mask values used for the different sources of masking. 1001 1002 \begin{figure} 1003 \centering 1004 \includegraphics[width=0.9\hsize,angle=0,clip]{images/gpc1_mask_indexed.png} 1005 \label{fig:static mask} 1006 1007 \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.} 1008 \end{figure} 1009 1010 \begin{deluxetable}{ccl} 1011 \tablecolumns{3} 1012 \tablewidth{0pc} 1013 \tablecaption{GPC1 Mask Values} 1014 \tablehead{\colhead{Mask Name} & \colhead{Mask Value} & \colhead{Description}} 1015 \startdata 1016 DETECTOR & 0x0001 & A detector defect is present. \\ 1017 FLAT & 0x0002 & The flat field model does not calibrate the pixel reliably. \\ 1018 DARK & 0x0004 & The dark model does not calibrate the pixel reliably. \\ 1019 BLANK & 0x0008 & The pixel does not contain valid data. \\ 1020 CTE & 0x0010 & The pixel has poor charge transfer efficiency. \\ 1021 SAT & 0x0020 & The pixel is saturated. \\ 1022 LOW & 0x0040 & The pixel has a lower value than expected. \\ 1023 SUSPECT & 0x0080 & The pixel is suspected of being bad. \\ 1024 BURNTOOL & 0x0080 & The pixel contain an burntool repaired streak. \\ 1025 CR & 0x0100 & A cosmic ray is present. \\ 1026 SPIKE & 0x0200 & A diffraction spike is present. \\ 1027 GHOST & 0x0400 & An optical ghost is present. \\ 1028 STREAK & 0x0800 & A streak is present. \\ 1029 STARCORE & 0x1000 & A bright star core is present. \\ 1030 CONV.BAD & 0x2000 & The pixel is bad after convolution with a bad pixel. \\ 1031 CONV.POOR& 0x4000 & The pixel is poor after convolution with a bad pixel. \\ 1032 MARK & 0x8000 & An internal flag for temporarily marking a pixel. \\ 1033 \enddata 1034 \label{tab:mask_values} 1035 \end{deluxetable} 1036 1037 \subsubsection{Dynamic masks} 1038 \label{sec:dynamic_masks} 1039 1040 In addition to the static mask that removes the constant detector 1041 defects, we also generate a set of dynamic masks that change with the 1042 astronomical features in the image. These masks are advisory in 1043 nature, and do not completely exclude the pixel from further 1044 processing consideration. The first of these dynamic masks is the 1045 burntool advisory mask mentioned above. These pixels are included for 1046 photometry, but are rejected more readily in the stacking and 1047 difference image construction, as they are more likely to have small 1048 deviations due to imperfections in the burntool correction. 1049 1050 The remaining dynamic masks are not generated until the IPP 1051 \ippstage{camera} stage, at which point all object photometry is 1052 complete, and an astrometric solution is known for the exposure. This 1053 added information provides the positions of bright sources based on 1054 the reference catalog, including those that fall slightly out of the 1055 detector field of view or within the inter chip gaps, where internal 1056 photometry may not identify them. These bright sources are the origin 1057 for many of the image artifacts that the dynamic mask identifies and 1058 excludes. 1059 1060 \subsubsubsection{Electronic crosstalk ghosts} 1061 \label{sec:crosstalk} 1062 1063 Due to electrical crosstalk between the flex cables connecting the 1064 individual detector OTA devices, ghost objects can be created by the 1065 presence of a bright source at a different position on the camera. 1066 Table \ref{tab:crosstalk_rules} summarizes the list of known crosstalk 1067 rules, with an estimate of the magnitude difference between the source 1068 and ghost. For all of the rules, any cell $v$ within the specified 1069 column of cells on any of the OTAs in the specified column of OTAs $Y$ 1070 creates the ghost in the same $v$ and $Y$ in the target column of 1071 cells and OTAs. In each of these cases, a source object with an 1072 instrumental magnitude brighter than -14.47 creates a ghost object 1073 many orders of magnitude fainter at the target location. The cell 1074 (x,y) pixel coordinate is identical between source and ghost, as a 1075 result of the transfer occurring as the devices are read. A circular 1076 mask is added to the ghost location with radius $R = 3.44 \left(-14.47 1077 - m_{source, instrumental}\right)$ pixels. Any objects in the 1078 photometric catalog found at the location of the ghost mask have the 1079 GHOST mask bit set, marking the object as a likely ghost. The 1080 majority of the crosstalk rules are bi-directional, with a source in 1081 either position creating a ghost at the corresponding crosstalk target 1082 position. The two faintest rules are uni-directional, due to 1083 differences in the electronic path for the crosstalk. 1084 1085 For the very brightest sources ($m_{instrumental} < -15$), there can 1086 be crosstalk ghosts between all columns of cells during the readout. 1087 These ``bleed'' ghosts were originally identified as ghosts of the 1088 saturation bleeds appearing in the neighboring cells, and as such, the 1089 masking for these objects puts a rectangular mask down from top to 1090 bottom of cells in all columns that are in the same row of cells as 1091 the bright source. The width of this box is a function of the source 1092 magnitude, with $W = 5 * \left(-15 - m_{source, instrumental}\right)$ 1093 pixels. 1094 1095 \begin{deluxetable}{lllc} 1096 \tablecolumns{4} 1097 \tablewidth{0pc} 1098 \tablecaption{GPC1 Crosstalk Rules} 1099 \tablehead{\colhead{Type}&\colhead{Source OTA/Cell}&\colhead{Ghost OTA/Cell}&\colhead{$\Delta m$}} 1100 \startdata 1101 Inter-OTA & OTA2Y XY3v & OTA3Y XY3v & 6.16 \\ 1102 & OTA3Y XY3v & OTA2Y XY3v & \\ 1103 & OTA4Y XY3v & OTA5Y XY3v & \\ 1104 & OTA5Y XY3v & OTA4Y XY3v & \\ 1105 Intra-OTA & OTA2Y XY5v & OTA2Y XY6v & 7.07 \\ 1106 & OTA2Y XY6v & OTA2Y XY5v & \\ 1107 & OTA5Y XY5v & OTA5Y XY6v & \\ 1108 & OTA5Y XY6v & OTA5Y XY5v & \\ 1109 One-way & OTA2Y XY7v & OTA3Y XY2v & 7.34 \\ 1110 & OTA5Y XY7v & OTA4Y XY2v & \\ 1111 \enddata 1112 \label{tab:crosstalk_rules} 1113 \end{deluxetable} 1114 1115 %% \begin{figure} 1116 %% \centering 1117 %% \caption{Figure of crosstalk ghost and bright star source. Plot of cut across ghost to illustrate the flat-top shape.} 1118 %% \end{figure} 1119 1120 \subsubsubsection{Optical ghosts} 1121 \label{sec:optical_ghosts} 1122 % http://arxiv.org/pdf/1207.2513v1.pdf 1123 1124 Due to imperfections in the anti-reflective coating on the optical 1125 surfaces of GPC1, bright sources can also result in large out of focus 1126 objects, particularly in the g-filter data. These objects are the 1127 result of light reflecting back off the surface of the detector, 1128 reflecting again off the lower surfaces of the optics (particularly 1129 the L1 corrector lens), and then back down onto the focal plane. Due 1130 to the extra travel distance, the resulting source is out of focus and 1131 elongated along the radial direction of the camera focal plane. These 1132 optical ghosts can be modeled in the focal plane coordinates (L,M) 1133 which has its origin at the center of the focal plane. In this 1134 system, a bright object at location (L,M) on the focal plane creates a 1135 reflection ghost on the opposite side of the optical axis at (-L,-M). 1136 The exact location is fit as a third order polynomial in the focal 1137 plane L and M directions (as listed in Table \ref{tab:ghost_centers}). 1138 An elliptical annulus mask is constructed at the expected ghost 1139 location, with the major and minor axes defined by linear functions of 1140 the ghost distance from the optical axis, and oriented with the 1141 ellipse major axis is along the radial direction (Table 1142 \ref{tab:ghost_radii}). All stars brighter than a filter-dependent 1143 threshold (listed in Table \ref{tab:ghost_magnitudes}) have such masks 1144 constructed. 1145 1146 \begin{deluxetable}{lcc} 1147 \tablecolumns{3} 1148 \tablewidth{0pc} 1149 \tablecaption{Optical Ghost Center Transformations} 1150 \tablehead{\colhead{Polynomial Term}&\colhead{L center}&\colhead{M center}} 1151 \startdata 1152 $x^0 y^0$ & -1.215661e+02 & 2.422174e+01 \\ 1153 $x^1 y^0$ & 1.321875e-02 & 4.170486e-04 \\ 1154 $x^2 y^0$ & -4.017026e-09 & -1.934260e-08 \\ 1155 $x^3 y^0$ & 1.148288e-10 & -1.173657e-12 \\ 1156 $x^0 y^1$ & -1.908074e-03 & 1.189352e-02 \\ 1157 $x^1 y^1$ & 8.479150e-08 & -9.256748e-08 \\ 1158 $x^2 y^1$ & 1.635732e-11 & 1.140772e-10 \\ 1159 $x^0 y^2$ & 2.625405e-08 & 8.123932e-08 \\ 1160 $x^1 y^2$ & 1.125586e-10 & 1.328378e-11 \\ 1161 $x^0 y^3$ & 2.912432e-12 & 1.170865e-10 \\ 1162 \enddata 1163 \label{tab:ghost_centers} 1164 \end{deluxetable} 1165 1166 \begin{deluxetable}{lcccc} 1167 \tablecolumns{5} 1168 \tablewidth{0pc} 1169 \tablecaption{Optical Ghost Annulus Axis Length} 1170 \tablehead{\colhead{Radial Order}&\colhead{Inner Major Axis}&\colhead{Inner Minor Axis}& \colhead{Outer Major Axis}&\colhead{Outer Minor Axis}} 1171 \startdata 1172 $r^0$ & 3.926693e+01 & 5.287548e+01 & 7.928722e+01 & 1.314265e+02 \\ 1173 $r^1$ & 5.325759e-03 &-2.191669e-03 & 1.722181e-02 & -2.627153e-03 \\ 1174 \enddata 1175 \label{tab:ghost_radii} 1176 \end{deluxetable} 1177 1178 \begin{deluxetable}{lc} 1179 \tablecolumns{2} 1180 \tablewidth{0pc} 1181 \tablecaption{Optical Ghost Magnitude Limits} 1182 \tablehead{\colhead{Filter}&\colhead{$m_{inst}$}} 1183 \startdata 1184 g & -16.5 \\ 1185 r & -20.0 \\ 1186 i & -25.0 \\ 1187 z & -25.0 \\ 1188 y & -25.0 \\ 1189 w & -20.0 \\ 1190 \enddata 1191 \label{tab:ghost_magnitudes} 1192 \end{deluxetable} 1193 1194 1195 \begin{figure} 1196 \centering 1197 \includegraphics[width=0.9\hsize,angle=0,clip]{images/full_fpa_ghosts.jpg} 1198 \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.} 1199 \end{figure} 1200 1201 \subsubsubsection{Optical glints} 1202 \label{sec:glints} 1203 1204 Prior to \czwdraft{DATE}, a reflective surface at the edge of the 1205 camera aperture was incompletely screened to light passing through the 1206 telescope. Sources brighter than $m_{inst} = -21$ that fell on this 1207 reflective surface resulted in light being scattered across the 1208 detector surface in a long narrow glint. This surface was physically 1209 masked on \czwdraft{DATE}, removing the possibility of glints in 1210 subsequent data, but that taken prior have a dynamic mask constructed 1211 when a reference source falls on the focal plane within one degree of 1212 the detector edge. This mask is 150 pixels wide, with length $L = 1213 2500 \left(-20 - m_{inst}\right)$ pixels. These glint masks are 1214 constructed by selecting sufficiently bright sources in the reference 1215 catalog that fall within rectangular regions around each edge of the 1216 GPC1 camera. These regions are separated from the edge of the camera 1217 by 17 arcminutes, and extend outwards an additional degree. 1218 1219 %% 1220 %% GLINT_MAX_MAG F32 -21.0 1221 %% GLINT.REGION MULTI 1222 1223 %% GLINT.REGION METADATA 1224 %% REGION STR [-38000:-24000,-20000:+20000] 1225 %% GLINT.TYPE STR LEFT 1226 %% END 1227 1228 %% GLINT.REGION METADATA 1229 %% REGION STR [+24000:+38000,-20000:+20000] 1230 %% GLINT.TYPE STR RIGHT 1231 %% END 1232 1233 %% GLINT.REGION METADATA 1234 %% REGION STR [-20000:+20000,+24000:+38000:] 1235 %% GLINT.TYPE STR TOP 1236 %% END 1237 1238 %% GLINT.REGION METADATA 1239 %% REGION STR [-20000:+20000,-38000:-24000] 1240 %% GLINT.TYPE STR BOTTOM 1241 %% END 1242 1243 \begin{figure} 1244 \centering 1245 \includegraphics[width=0.9\hsize,angle=0,clip]{images/glint_example_o5379g0103o.jpg} 1246 \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.} 1247 \end{figure} 1248 1249 \subsubsubsection{Diffraction Spikes and Saturated Stars} 1250 \label{sec:diffraction_spikes} 1251 1252 Bright sources also form diffraction spikes that are dynamically 1253 masked. These are filter independent, and are modeled as rectangles 1254 with length $L = 10^{0.096 * (7.35 - m_{instrumental})} - 200$ and 1255 width $W = 8 + (L - 200) * 0.01$, with negative values indicating no 1256 mask is constructed, as the source is likely too faint to produce the 1257 feature. These spikes are dependent on the camera rotation, and are 1258 oriented at $\theta = n * \frac{\pi}{2} - \mathrm{ROTANGLE} + 0.798$, 1259 based on the header keyword. 1260 1261 %\subsubsection{Saturated stars} 1262 %\label{sec:saturated_stars} 1263 1264 The cores of stars that are saturated are masked as well, with a 1265 circular mask radius $r = 10.15 * (-15 - m_{instrumental})$. An 1266 example of a saturated star, with the masked regions for the 1267 diffraction spikes and core saturation highlighted, is shown in Figure 1268 \ref{fig:saturated star}. 1269 1270 \begin{figure} 1271 \centering 1272 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o6802g0338o_XY51_b1.jpg} 1273 \caption{Example of saturated star, with diffraction spikes extending from the core on exposure o6802g0338o, OTA51 (2014-05-25, 45s g-filter).} 1274 \label{fig:saturated star} 1275 \end{figure} 1276 1277 \subsubsection{Masking Fraction} 1278 \label{sec:masking_fraction} 1279 1280 For the full field of view that falls on the sixty OTAs, 14.7\% of all 1281 pixels are masked. The large fraction of this masking is due to 1282 regions that fall within the vignetted region. Defining the diameter 1283 of the unvignetted region to be 3 degrees, and excluding pixels that 1284 fall beyond this point reduces the static masking fraction to 9.7\%. 1285 1286 Unfortunately, due to the design of the OTAs and readout cells, a 1287 non-negligible fraction of the field of view falls onto an area that 1288 does not have a detector pixel. For a given OTA mosaicked to a 1289 $4846\times{}4868$ pixel image, the 64 $590\times{}598$ pixel readout 1290 cells cover 95.7\% of the OTA area, providing an additional 4.3\% 1291 masking in the unvignetted field of view due to the absence of a 1292 detector pixel. 1293 1294 For the inter-chip gap area loss, we use two field of view 1295 calculations to estimate the masking fraction. The reference field of 1296 view of GPC1 is 3 degrees, which at the nominal plate scale of 0.258 1297 arcseconds per pixel, translates to a 20930 FPA pixel radius. \czwdraft{I need a percentage here.} 1298 1299 %% 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; 1300 %% +---------+------------------------------------------+-------------------------------------------+--------------------------------------------+------------------------------------------+-------------------------------------------+--------------------------------------------+ 1301 %% | 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) | 1302 %% +---------+------------------------------------------+-------------------------------------------+--------------------------------------------+------------------------------------------+-------------------------------------------+--------------------------------------------+ 1303 %% static dynamic advisory 1304 %% | g.00000 | 0.19642137972007 | 0.00010322263512709 | 0.026838445469766 1305 %% | 0.20949461794863 | 9.89200027293e-05 | 0.026431927734548 | 1306 %% | r.00000 | 0.19675996201399 | 0.00025214447869606 | 0.032641054600788 1307 %% | 0.20989768279138 | 0.00023994155711801 | 0.032178525485201 | 1308 %% | i.00000 | 0.19677587604327 | 0.00057470697316504 | 0.038096251937072 1309 %% | 0.21003570722292 | 0.00053987093278142 | 0.037471018638997 | 1310 %% | z.00000 | 0.1974290315691 | 0.00024758901226967 | 0.03064123748973 1311 %% | 0.21055007930696 | 0.00023452690039757 | 0.030144453360769 | 1312 %% | y.00000 | 0.19828990634315 | 0.00014523787521897 | 0.021984846417987 1313 %% | 0.21130344126869 | 0.00013634812877977 | 0.02163070300815 | 1314 1315 Summing mask fractions from these three contributions within the 1316 unvignetted field of view results in an average of $\sim 20\%$ masking 1317 fraction across the field of view. Dynamic masking adds an additional 1318 $2-3\%$ on average, with advisory burntool masking contributing the 1319 largest single component. 1320 1321 \subsection{Background subtraction} 1322 \label{sec:background} 1323 1324 Once all other detrending is done, the pixels from each cell are 1325 mosaicked into the full $4846\times{}4868$ pixel OTA image. A 1326 background model for the full OTA is then determined prior to the 1327 photometric analysis. The mosaicked image is binned into 1328 $800\times{}800$ pixel bins, centered on the image center, and 1329 overlapping by a factor of 2 in both axes. These bins have 10000 1330 random samples drawn, and a binned cumulative distribution function is 1331 generated. These bins are interpolated to find the best mean value at 1332 the $50\%$ level, as well as the distribution $\sigma$ by estimating 1333 from the $32\%$ and $68\%$ levels. Repeating this across all bins 1334 results in a $13\times{}13$ grid of background bins, which are 1335 bilinearly interpolated to generate the background model to subtract. 1336 Each object in the photometric catalog has a SKY and SKY\_SIGMA value 1337 based on this model as well. 1338 1339 %% * Magic 1340 %% * Warping 1341 %% * warping kernel 1342 %% * linear-by-pieces 1343 %% * Covariance 1344 %% * def of skycells? 1345 %% * Stacking 1346 %% * pixel combination rules 1347 %% * pixel rejections 1348 %% * convolution for matching (success and failure) 1349 %% * Difference Image analysis 218 1350 219 1351 \section{GPC1 Detrend Construction} … … 332 1464 \end{deluxetable} 333 1465 334 \section{GPC1 Detrend Details}335 \label{sec:detrending}336 337 Ensuring a consistent and uniform detector response across the338 three-degree diameter field of view of the GPC1 camera is essential to339 a well calibrated survey. Many standard image detrending steps are340 done for GPC1, with overscan subtraction removing the detector bias341 level, dark frame subtraction to remove temperature and exposure time342 dependent detector glows, and flat field correction to remove pixel to343 pixel response functions. We also construct fringe correction for the344 reddest data in the y filter, to remove the interference patterns that345 arise in that filter due to the variations in the thickness of the346 detector surface.347 348 These corrections, however, assume that the detector response is349 linear across the full range of values. This is not universally the350 case with GPC1, and this requires an additional set of detrending351 steps to remove these non-linear responses. The first of these is the352 \ippprog{burntool} correction, which removes the persistence trails353 caused by the incomplete transfer of charge along the readout columns.354 This bright-end nonlinearity is generally only evident for the355 brightest stars, as only pixels that are at or beyond the saturation356 point of the detector have this issue. More widespread is the357 non-linearity at the faint end of the pixel range. Some readout cells358 and some readout cell edge pixels experience a sag relative to linear359 at low illumination, such that faint pixels appear fainter than360 expected. The correction to this requires amplifying the pixel values361 in these regions to match the expected model.362 363 The final non-linear response issue has no good option for correction.364 Large regions of some OTA cells experience significant charge transfer365 issues, making them unusable for science observations. These regions366 are therefore masked in processing, with these CTE regions making up367 the largest fraction of masked pixels on the detector. Other regions368 are masked for other regions, such as static bad pixel features or369 temporary readout masking caused by issues in the camera electronics370 that make these regions unreliable. These all contribute to the371 detector mask, which is augmented in each exposure for dynamic372 features that are masked based on the astronomical features within the373 field of view.374 375 For the PV3 processing, all detrending is done by the376 \ippprog{ppImage} program. This program applies the detrends to the377 individual cells, and then an OTA level mosaic is constructed for the378 science image, the mask image, and the variance map image. The single379 epoch photometry is done at this stage as well. The following380 subsections (\ref{sec:burntool} - \ref{sec:background}) detail these381 detrending steps, presented in the order in which they are applied to382 the individual OTA image data.383 384 \subsection{Burntool / Persistence effect}385 \label{sec:burntool}386 387 Pixels that approach the saturation point on GPC1, which varies by388 readout with common values around 60000 DN, cause persistence problems389 on that and subsequent images. During the read out process of an390 image with such a bright pixel, some of the charge associated with it391 is not fully shifted down the detector column toward the amplifier.392 As a result, this charge remains in the starting cell, and is393 partially collected in subsequent shifts, resulting in a ``burn394 trail'' that extends from the center of the bright source away from395 the amplifier (vertically along the pixel columns toward the top of396 the cell).397 398 This incomplete charge shifting in nearly full wells continues as each399 row is read out. This results in a remnant charge being deposited in400 the pixels that the full well was shifted through. In following401 exposures, this remnant charge leaks out, resulting in a trail that402 extends from the initial location of the bright source on the previous403 image towards the amplifier (vertically down along the pixel column).404 This remnant charge can remain on the detector for up to thirty405 minutes, requiring the locations of these ``burns'' be retained406 between exposures.407 408 Both of these types of persistance trails are measured and optionally409 repaired via the \ippprog{burntool} program. This program does an410 initial scan of the images, and identifies objects with pixel values411 brighter than a conservative threshold of 30000 DN. The trail from412 the peak of that object is fit with a one-dimensional power law in413 each pixel column above the threshold, based on empirical evidence414 that this is the functional form of this persistence effect. This415 also matches the expectation that a constant fraction of charge is416 incompletely transfered at each shift beyond the persistence417 threshold. Once this fit is done, the model can be subtracted from418 the image, and the location of the star is stored in a table along419 with the exposure PONTIME, which denotes the number of seconds since420 the detector was last powered on, and provides an internally consistent421 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 is found, then this location is429 retained in the image output table. If not, the old burn is allowed430 to expire.431 432 The main concern with this method of correcting the persistance trails433 is that it is based on fits to the raw image data, which may have434 other signal sources not determined by the persistence effect. The435 presence of other stars or artifacts along the path of the burn can436 result in a poor model to be fit, resulting in either an over- or437 under-subtraction of the persistance 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 reduces 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 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.}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 appearing (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 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.}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 defects, we also generate a set of dynamic masks that change with the595 astronomical features in the image. These masks are advisory in596 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 IPP604 \ippstage{camera} stage, at which point all object photometry is605 complete, and an astrometric solution is known for the exposure. This606 added information provides the positions of bright sources based on607 the 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 identify them. These bright sources are the origin610 for many of the image artifacts that the dynamic mask identifies and611 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 by the618 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 with an625 instrumental magnitude brighter than -14.47 creates a ghost object626 many orders of magnitude fainter at the target location. The cell627 (x,y) pixel coordinate is identical between source and ghost, as a628 result of the transfer occurring as the devices are read. A circular629 mask is added to the ghost location with radius $R = 3.44 \left(-14.47630 - m_{source, instrumental}\right)$ pixels. Any objects in the631 photometric catalog found at the location of the ghost mask have the632 GHOST mask bit set, marking the object as a likely ghost. The633 majority of the crosstalk rules are bi-directional, with a source in634 either position creating a ghost at the corresponding crosstalk target635 position. The two faintest rules are uni-directional, due to636 differences in the 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 (1,1)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 and separated by the849 inter-cell spacing, diminishing the area effected. 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 \subsubsection{Masking Fraction}855 \label{sec:masking_fraction}856 857 For the full field of view that falls on the sixty OTAs, 14.7\% of all858 pixels are masked. The large fraction of this masking is due to859 regions that fall within the vignetted region. Defining the diameter860 of the unvignetted region to be 3 degrees, and excluding pixels that861 fall beyond this point reduces the static masking fraction to 9.7\%.862 863 Unfortunately, due to the design of the OTAs and readout cells, a864 non-negligible fraction of the field of view falls onto an area that865 does not have a detector pixel. For a given OTA mosaicked to a866 $4846\times{}4868$ pixel image, the 64 $590\times{}598$ pixel readout867 cells cover 95.7\% of the OTA area, providing an additional 4.3\%868 masking in the unvignetted field of view due to the absence of a869 detector pixel.870 871 For the inter-chip gap area loss, we use two field of view872 calculations to estimate the masking fraction. The reference field of873 view of GPC1 is 3 degrees, which at the nominal plate scale of 0.258874 arcseconds per pixel, translates to a 20930 FPA pixel radius. \czwdraft{I need a percentage here.}875 876 %% 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;877 %% +---------+------------------------------------------+-------------------------------------------+--------------------------------------------+------------------------------------------+-------------------------------------------+--------------------------------------------+878 %% | 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) |879 %% +---------+------------------------------------------+-------------------------------------------+--------------------------------------------+------------------------------------------+-------------------------------------------+--------------------------------------------+880 %% static dynamic advisory881 %% | g.00000 | 0.19642137972007 | 0.00010322263512709 | 0.026838445469766882 %% | 0.20949461794863 | 9.89200027293e-05 | 0.026431927734548 |883 %% | r.00000 | 0.19675996201399 | 0.00025214447869606 | 0.032641054600788884 %% | 0.20989768279138 | 0.00023994155711801 | 0.032178525485201 |885 %% | i.00000 | 0.19677587604327 | 0.00057470697316504 | 0.038096251937072886 %% | 0.21003570722292 | 0.00053987093278142 | 0.037471018638997 |887 %% | z.00000 | 0.1974290315691 | 0.00024758901226967 | 0.03064123748973888 %% | 0.21055007930696 | 0.00023452690039757 | 0.030144453360769 |889 %% | y.00000 | 0.19828990634315 | 0.00014523787521897 | 0.021984846417987890 %% | 0.21130344126869 | 0.00013634812877977 | 0.02163070300815 |891 892 Summing mask fractions from these three contributions within the893 unvignetted field of view results in an average of $\sim 20\%$ masking894 fraction across the field of view. Dynamic masking adds an additional895 $2-3\%$ on average, with advisory burntool masking contributing the896 largest single component.897 898 \subsection{Overscan}899 \label{sec:overscan}900 901 Each cell on GPC1 has an overscan region that covers the first 34902 columns of each row, and the last 10 rows of each column. No light903 lands on these pixels, so the image region is trimmed to exclude them.904 Each row has an overscan value subtracted, calculated by finding the905 median value of that row's overscan pixels and then smoothing between906 rows with a three-row boxcar median.907 908 \subsection{Non-linearity Correction}909 \label{sec:nonlinearity}910 % check notebook, 2010-07/08911 912 The pixels of GPC1 are not uniformly linear at all flux levels. In913 particular, at low flux levels, some pixels have a tendency to sag914 relative to the expected linear value. This effect is most pronounced915 along the edges of the detector cells, although some entire cells show916 evidence of this effect.917 918 To correct this sag, we studied the flux behavior of a series of flat919 frames for a ramp of exposure times with approximate logarithmically920 equal spacing between 0.01s and 57.04s. As the exposure time921 increases, the flux on each pixel also increases in what is expected922 to be a linear manner. Each of these flat exposures in this ramp is923 overscan corrected, and then the median is calculated for each cell,924 as well as for the rows and columns within ten pixels of the edge of925 the science region. From these median values at each exposure time926 value, we can construct the expected trend by fitting a linear model,927 $f_{region} = G * t_{exp} + B$, to determine the gain, $G$, and the928 bias, $B$, for the region considered. This fitting was limited to only929 the range of fluxes between 12000 and 38000 counts, as these ranges930 were found to match the linear model well. This range avoids the931 non-linearity at low fluxes, as well as the possibility of high-flux932 non-linearity effects.933 934 We store the average flux measurement and deviation from the linear935 fit for each exposure time for all regions on all detector cells in936 the linearity detrend look up tables. When this is applied to science937 data, these lookup tables are loaded, and a linear interpolation is938 performed to determine the correction needed for the flux in that939 pixel. This look up is performed for both the row and column of each940 pixel, to allow the edge correction to be applied where applicable,941 and the full cell correction elsewhere. The average of these two942 values is then applied to the pixel value, reducing the effects of943 pixel nonlinearity.944 945 This non-linearity effect appears to be stable in time for the946 majority of the detector pixels, with little evident change over the947 survey duration. However, as the non-linearity is most pronounced at948 the edges of the detector cells, those are the regions where the949 correction is most likely to be incomplete. Because of this fact,950 most pixels in the static mask with either the DARKMASK or FLATMASK951 bit set are found along these edges. As the non-linearity correction952 is unable to reliably restore these pixels, they produce inconsistent953 values after the dark and flat have been applied, and are therefore954 rejected.955 956 %% exptime n_included/det_id = 372957 %% clearly this isn't the one used, as 3-12 spans three data points, poorly.x958 %% 0.01 2959 %% 0.14 2960 %% 0.27 2961 %% 0.49 2962 %% 0.72 2963 %% 1.06 2964 %% 1.41 2965 %% 2.02 2966 %% 2.63 2967 %% 3.94 2968 %% 5.25 2969 %% 8.74 2970 %% 13.09 2971 %% 17.4 2972 %% 20.86 2973 %% 24.3 2974 %% 27.78 2975 %% 31.24 2976 %% 34.65 2977 %% 38.12 2978 %% 42.41 2979 %% 46.69 2980 %% 51.89 2981 %% 57.04 2982 983 984 %http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/DetectorLinearity_AllEdges985 %http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/DetectorLinearityArchive986 987 \begin{figure}988 \centering989 \includegraphics[width=0.9\hsize,angle=0,clip]{images/linearity_XY27_xy16.png}990 \caption{Example plot of the linearity correction as a fraction of observed flux for OTA27, cell xy16.}991 \end{figure}992 993 \subsection{Dark/Bias Subtraction}994 \label{sec:dark}995 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Background_Dark_Model996 997 The dark model we make for GPC1 considers each pixel individually,998 independent of any neighbors. To construct this model, we fit a999 multi-dimensional model to the array of input pixels from a randomly1000 selected set of 100-150 overscan and non-linearity corrected dark1001 frames chosen from a given date range. The model fits each pixel as a1002 function of the exposure time $t_{exp}$ and the detector temperature1003 $T_{chip}$ of the input images such that $\mathrm{dark} = a_0 + a_11004 t_{exp} + a_2 T_{chip} t_{exp} + a_3 T_{chip}^2 t_{exp}$. This1005 fitting uses two iterations to produce a clipped fit, rejecting at the1006 $3\sigma$ level. The final coefficients $a_i$ for the dark model are1007 stored in the detrend image. The constant $a_0$ term includes the1008 residual bias signal after overscan subtraction, and as such, a1009 separate bias subtraction is not necessary.1010 1011 Applying the dark model is simply a matter of calculating the response1012 to the exposure time and detector temperature for the image to be1013 corrected, and subtracting the resulting dark signal from the image.1014 1015 \subsubsection{Time evolution}1016 1017 The dark model is not consistently stable over the full survey, with1018 significant drift over the course of multiple months. Some of the1019 changes in the dark can be attributed to changes in the voltage1020 settings of the GPC1 controller electronics, but the majority seem to1021 be the result of some unknown parameter. We can separate the dark1022 model history of GPC1 into three epochs. The first epoch covers all1023 data taken prior to 2010-01-23. This epoch used a different header1024 keyword for the detector temperature, making data from this epoch1025 incompatible with later dark models.1026 1027 The second epoch covers data between 2010-01-23 and 2011-05-01, and is1028 characterized by a largely stable but oscillatory dark solution.1029 There are two modes that the dark model switches between apparently at1030 random. No clear cause has been established for the switching, but1031 there are clear differences between the two modes that require the1032 observation dates to be split to use the model that is most1033 appropriate.1034 1035 The initial evidence of these two modes comes from the discovery of a1036 slight gradient along the rows of certain cells. This is a result of1037 a drift in the bias level of the detector as it is read out. An1038 appropriate dark model should remove this gradient entirely. For1039 these two modes, the direction of this bias drift is different, so a1040 single dark model generated from all dark images in the time range1041 over corrects the positive-gradient mode, and under corrects the1042 negative-gradient mode. Upon identifying this two-mode behavior, and1043 determining the dates each mode was dominant, two separate dark1044 models were constructed from appropriate ``A'' and ``B'' mode dark1045 frames. Using the appropriate dark minimizes the effect of this bias1046 gradient in the dark corrected data.1047 1048 The bias drift gradients of the mode switching can be visualized in1049 Figure \ref{fig:dark switching}. This figure shows image profile1050 along the x-pixel axis binned along the full y-axis of dark corrected1051 images for OTA67. These images are from sequential days, and have1052 been corrected with a dark model constructed from the full set of dark1053 data within the second epoch. The opposite sign of the slopes of1054 these profiles indicates that the average dark model does not correct1055 these dates sufficiently, due to the contradictory dark signals1056 between the two modes. \czwdraft{this paragraph dependent on that figure. This doesn't quite match.}1057 1058 After 2011-05-01, the two-mode behavior of the dark disappears, and is1059 replaced with a slow observation date dependent drift in the magnitude1060 of the gradient. This drift is sufficiently slow that we have modeled1061 it using three observation date independent dark model for different1062 date ranges. These darks cover the range from 2011-05-01 to1063 2011-08-01, 2011-08-01 to 2011-11-01, and 2011-11-01 and on. The1064 reason for this time evolution is unknown, but as it is correctable1065 with a small number of dark models, this does not significantly impact1066 detrending.1067 1068 \begin{figure}1069 \centering1070 % \begin{subfigure}[]{.45\hsize}1071 \begin{minipage}{0.45\hsize}1072 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_M_OS_NL_XY23_b1.jpg}1073 % \caption{(a)}1074 % \end{subfigure}%1075 % \begin{subfigure}[]{.45\hsize}1076 \end{minipage}%1077 \begin{minipage}{0.45\hsize}1078 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_to_DARK_XY23_b1.jpg}1079 % \caption{(b)}1080 % \end{subfigure}1081 \end{minipage}1082 \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.}1083 \end{figure}1084 1085 \begin{figure}1086 \centering1087 \includegraphics[width=0.9\hsize,angle=0,clip]{images/B_profile_ex.png}1088 \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.}1089 \label{fig:dark switching}1090 \end{figure}1091 1092 \subsubsection{Video Dark}1093 \label{sec:video_darks}1094 1095 The dark signal is stronger in cell corners due to glow from the1096 read-out amplifiers. The standard dark model corrects this for most1097 observations. However, as mentioned above, when a cell is repeatedly1098 read in video mode, the dark model for the OTA containing it changes.1099 Surprisingly, added reads for the video cell do not amplify the1100 amplifier glow, but rather decrease the dark signal in these regions.1101 As a result, using the standard dark model on the data for these OTAs1102 results in oversubtraction of the corner glow.1103 1104 Video darks have been constructed to eliminate the effect this1105 observational change has on the final image quality. This was done by1106 running the standard dark construction process on a series of dark1107 frames that have had the video signal enabled for some cells. GPC11108 can only run video signals on a subset of the OTAs at a given time.1109 This requires two passes to enable the video signal across the full1110 set of OTAs that support video cells. This is convenient for the1111 process of creating darks, as those OTAs that do not have video1112 signals enabled create standard dark models, while the video dark is1113 created for those that do.1114 1115 This simultaneous construction of video and standard dark models is1116 useful, as it provides the ability to isolate the response on the1117 standard dark from the video signals. Isolating this response is1118 essential for attempting to create archival video darks. We only have1119 raw video dark frame data after 2012-05-16, when this problem was1120 initially identified, so any data prior to that can not be directly1121 corrected for the video dark signal. Isolating the video signal1122 response allows linear corrections to the pre-existing standard dark1123 models for archival data. Testing this shows that constructing a1124 video dark for older data simply as $VD_{2009} = D_{2009} - D_{Modern}1125 + VD_{Modern}$ produces a satisfactory result that does not1126 oversubtract the amplifier glow. This is shown in figure1127 \ref{fig:video_darks}, which shows video cells from before 2012-05-16,1128 corrected with both the standard and video darks, with the early video1129 dark constructed in such a manner.1130 1131 \begin{figure}1132 \centering1133 % \begin{subfigure}[]{.45\hsize}1134 \begin{minipage}{0.45\hsize}1135 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_Rdark_XY22_b1.jpg}1136 % \caption{(a)}1137 % \end{subfigure}%1138 % \begin{subfigure}[]{.45\hsize}1139 \end{minipage}%1140 \begin{minipage}{0.45\hsize}1141 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_VDdark_XY22_b1.jpg}1142 % \caption{(b)}1143 % \end{subfigure}1144 \end{minipage}1145 \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.}1146 \label{fig:video_darks}1147 \end{figure}1148 1149 \subsection{Noisemap}1150 \label{sec:noisemap}1151 1152 Based on a study of the positional dependence of all detected sources,1153 we have discovered that the cells in GPC1 do not have uniform noise1154 characteristics. Instead, there is a gradient along the pixel rows,1155 with the noise generally higher away from the read out amplifier1156 (higher cell x pixel positions). This is likely an effect of the1157 row-by-row bias issue discussed below. This gradient causes the read1158 noise to increase as the row is read out. As a result of this1159 increased noise, more sources are detected in the higher noise regions1160 when the read noise is assumed constant across the readout. To1161 mitigate this noise gradient, we constructed an initial set of1162 noisemap images by measuring the median variance on bias frames. The1163 variance is calculated in boxes of 20x20 pixels, and then linearly1164 interpolated to cover the full image.1165 1166 Unfortunately, due to correlations within this noise, the variance1167 measured from the bias images does not fully remove the positional1168 dependence of objects that are detected. This simple noisemap1169 underestimates the noise observed when the image is filtered during1170 the object detection process. This filtering convolves the background1171 noise with a PSF, which has the effect of amplifying the correlated1172 peaks in the noise. This amplification can therefore boost background1173 fluctuations above the threshold used to select real objects,1174 contaminating the final object catalogs.1175 1176 In the detection process, we expect false positives at a rate equal to1177 the one-tailed probability beyond the detection threshold. For these1178 tests, only detections measured at the $\sigma_{thresh} = 5\sigma$1179 level are used, to match that used in the photometry on science data.1180 This probability can be converted into a number of false number by1181 considering a given area. As the detections must be isolated to not1182 be detected as an extended object, this area must be reduced by the1183 area a given PSF occupies. Combining this, we find that we expect a1184 probability $P = 1 - \Phi_{normal}(5) = \frac{1}{2}1185 \erfcinv\left(\frac{5}{\sqrt{2}}\right)$, and an area given $N$1186 exposures of area $X\times Y$, $A = \frac{X \times Y \times1187 N}{A_{PSF}}$. For a typical $1"$ seeing, $A_{PSF}$ is approximately1188 16 pixels. Using this model for the false positives, we found that1189 the added read noise was insufficient to account for the observed1190 false positive rate. Inverting this relation, we can measure1191 $\sigma_{obs}$, the true threshold level based on the number of false1192 positives observed. This $\sigma_{obs}$ is the combined to form a1193 boost factor $B = \sigma_{thresh} / \sigma_{obs}$ that amplifies the1194 noisemap to match the observed false detection rate.1195 1196 The row-to-row variations that contribute to the extra noise are1197 related to the dark model, and because of this, as the dark model1198 changes, the effective noise also changes. To ensure that the1199 noisemap accurately matches the true noise level, we have created1200 different noisemap models for the three major time ranges of the dark1201 model. We do not see any strong evidence that the noisemaps have the1202 A/B modes visible in the dark, and so we do not generate different1203 models for each individual dark model. The additional pixel-to-pixel1204 variance from this noisemap is added to the Poissonian variance to1205 form the science variance image generated by the \ippstage{chip}1206 processing.1207 1208 \subsection{Flat}1209 1210 Determining a flat field correction for GPC1 is a challenging1211 endeavor, as the wide field of view makes it difficult to construct a1212 uniformly illuminated image. Using a dome screen is not possible, as1213 the variations in illumination and screen rigidity create large1214 scatter between different images that are not caused by the detector1215 response function. Because of this, we use sky flat images taken at1216 twilight, which are more consistently illuminated than screen flats.1217 We calculate the mean of these images to determine the initial flat1218 model.1219 1220 From this starting model, we construct a correction to remove the1221 effect of the illumination differences over the detector surface.1222 This is done by dithering a series of science exposures with a given1223 pointing. By fully calibrating these exposures with the initial flat1224 model, and then comparing the measured fluxes for the same star as a1225 function of position on the detector, we can determine position1226 dependent scaling factors. From the set of scaling factors for the1227 full catalog of stars observed in the dithered sequence, we can1228 construct a model of the error in the initial flat model as a function1229 of detector position. Applying a correction that reduces the1230 amplitude of these errors produces a flat field model that better1231 represents the true detector response.1232 1233 The flat model appears stable with time, although directly measuring1234 this is as difficult as originally constructing the model. However,1235 due to the photometric consistency observed in the final catalog of1236 GPC1 measurements \citep{MagnierXXX}, we can be confident that the1237 flat model does not have a significant time dependent component.1238 1239 \subsection{Pattern correction}1240 \label{sec:pattern}1241 1242 Due to detector specific issues that are not cleanly removed by the1243 dark model, we have a set of ``pattern'' corrections that are applied1244 to some selection of the OTAs in the camera. This is done to reduce1245 the effect that detector differences have on the measured astronomical1246 signal that are not stable enough to be corrected with a static model.1247 Because of this, the pattern corrections attempt to identify and1248 correct the detector issues based on appropriate filtering the1249 individual science exposures.1250 1251 The PATTERN.ROW correction is used to remove any remaining row-by-row1252 bias variation, and the PATTERN.CELL and PATTERN.CONTINUITY1253 corrections attempt to ensure that the cells of a given OTA are1254 consistent with the other cells on that OTA.1255 1256 \subsubsection{Pattern Row}1257 % http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/GPC1_Bias_Pattern_Study1258 As discussed above in the dark and noisemap sections, certain1259 detectors have significant bias offsets between adjacent rows, caused1260 by noise in the camera control electronics. The magnitude of these1261 offsets increases as the distance from the readout amplifier1262 increases, resulting in horizontal streaks that are more pronounced1263 along the large x pixel edge of the cell. As the level of the offset1264 is apparently random between exposures, the dark correction cannot1265 fully remove this structure from the images, and the noisemap value1266 only indicates the level of the average variance added by these bias1267 offsets. Therefore, we apply the PATTERN.ROW correction in an attempt1268 to mitigate the offsets and correct the image values. To force the1269 rows to agree, a second order clipped polynomial is fit to each row in1270 the cell. Four fit iterations are run, and pixels $2.5\sigma$ deviant1271 are excluded from subsequent fits, to minimize the effect stars and1272 other astronomical signals have. This final trend is then subtracted1273 from that row. Simply doing this subtraction will also have the1274 effect of removing the background sky level. To prevent this, the1275 constant and linear terms for each row are stored, and linear fits are1276 made to these parameters as a function of row, perpendicular to the1277 initial fits. This produces a plane that is added back to the image1278 to restore the background offset and any linear ramp that exists in1279 the sky.1280 1281 This correction was required on all cells on all OTAs prior to1282 2009-12-01, at which point a modification of the camera electronics1283 reduced the scale of the row-by-row offsets for the majority of the1284 OTAs. As a result, we only apply this correction to the cells where1285 it is still necessary, as shown in Figure \ref{fig: pattern row1286 cells}. A list of these cells is listed in Table1287 \ref{tab:pattern_row_cells}.1288 1289 Although this correction does largely resolve the row-by-row offset1290 issue in a satisfactory way, large and bright astronomical objects can1291 bias the fit significantly. This results in an oversubtraction of the1292 offset near these objects. As the offsets are calculated on the pixel1293 rows, this oversubtraction is not uniform around the object, but is1294 preferentially along the horizontal x axis of the object. Most1295 astronomical objects are not significantly distorted by this, with1296 this only becoming on issue for only bright objects comparable to the1297 size of the cell (598 pixels = 150").1298 1299 %% \czwdraft{keep this?} This row-by-row offset is visible in similar1300 %% camera designs, and has been removed by identifying the noise signal1301 %% in the pixel data stream. By taking the FFT of the pixels and a1302 %% reference signal, the frequency of this noise can be isolated and1303 %% removed, resulting in a much cleaner image. However, GPC1 does not1304 %% record the value of the reference signal, instead automatically1305 %% subtracting it from the data values. Without this comparison signal,1306 %% we have been unable to reproduce this method, as there is no obvious1307 %% FFT component visible.1308 1309 \begin{deluxetable}{lcccc}1310 \tablecolumns{3}1311 \tablewidth{0pc}1312 \tablecaption{Cells which have PATTERN.ROW correction applied}1313 \tablehead{\colhead{OTA} & \colhead{Cell columns} & \colhead{Additional cells}}1314 \startdata1315 OTA11 & & xy02, xy03, xy04, xy07 \\1316 OTA14 & & xy23 \\1317 OTA15 & 0 & \\1318 OTA27 & 0, 1, 2, 3, 7 & \\1319 OTA31 & 7 & \\1320 OTA32 & 3, 7 & \\1321 OTA45 & 3, 7 & \\1322 OTA47 & 0, 3, 5, 7 & \\1323 OTA57 & 0, 1, 2, 6, 7 & \\1324 OTA60 & & xy55 \\1325 OTA74 & 2, 7 & \\1326 \enddata1327 \label{tab:pattern_row_cells}1328 \end{deluxetable}1329 1330 \begin{figure}1331 \centering1332 \includegraphics[width=0.9\hsize,angle=0,clip]{images/pattern_row_edit.png}1333 \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.}1334 \label{fig: pattern row cells}1335 \end{figure}1336 1337 \begin{figure}1338 \centering1339 \begin{minipage}{0.45\hsize}1340 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_nopat.png}1341 % \caption{(a)}1342 % \end{subfigure}%1343 % \begin{subfigure}[]{.45\hsize}1344 \end{minipage}%1345 \begin{minipage}{0.45\hsize}1346 \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_pat.png}1347 % \caption{(b)}1348 % \end{subfigure}1349 \end{minipage}1350 \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.}1351 \end{figure}1352 1353 \subsubsection{Pattern Cell}1354 1355 As the measured background level of a given cell may not exactly match1356 that of its neighbors, fitting a smooth background model over the full1357 OTA can result in over and under-subtraction of the sky level at the1358 cell boundary discontinuities. The PATTERN.CELL correction was an1359 initial attempt to remove this effect on the worst cells, by forcing1360 all the cells of an OTA to the same level. Each cell had the median1361 value measured, and then each cell had an offset added that shifts the1362 cell to match the median of those medians.1363 1364 This correction is reasonable when the astronomical signal is smooth,1365 with no objects that are large relative to the size of an individual1366 cell. However, the presence of large galaxies (or even bright stars)1367 can bias the offsets for some cells from their neighbors. Because of1368 this issue, we no longer apply this correction to any data.1369 1370 \subsubsection{Pattern Continuity}1371 1372 As the PATTERN.CELL correction was insufficient in many situations, we1373 designed a replacement correction that would reduce the background1374 distortion for large objects. In addition, studies of the background1375 level illustrated that the row-by-row bias can introduce small1376 background gradient variations along the rows of the cells that is not1377 stable enough to be completely fit by the dark model. This common1378 feature across the columns of cells results in a ``saw tooth'' pattern1379 horizontally across an OTA, and as the background model fits a smooth1380 sky level, this induces over and under subtraction at the cell1381 boundaries. As the PATTERN.CELL was designed to correct changes only1382 in the median value between cells, it could not adequately resolve1383 this higher order issue.1384 1385 The replacement for PATTERN.CELL is the PATTERN.CONTINUITY correction,1386 which attempts to match the edges of a cell to those of its neighbors.1387 For each cell, a thin box 10 pixels wide on each edge is extracted and1388 the median value of unmasked values calculated for that box. These1389 median values are then used to construct a vector of differences1390 $\Delta_i = \sum_{j} Edge_{i} - Edge_{j}$, along with a matrix of1391 associations $A_{i,i'} = \sum_{j} \delta(i,j) \delta(j,i')$ denoting1392 which cell boundaries are adjacent. By solving the system $A x =1393 diff$, we find the set of offsets $x_i$ to be applied to each cell to1394 ensure the minimum differences between all cell edges and their1395 neighbors.1396 1397 For OTAs that initially show the saw tooth pattern, the effect of this1398 correction is to align the cells into a single ramp, at the expense of1399 the absolute background level. However, as we subtract off a smooth1400 background model prior to doing photometry, these deviations from an1401 absolute sky level are unimportant. The fact that the final ramp is1402 smoother than it would be otherwise also allows for the background1403 subtracted image to more closely match the astronomical sky, without1404 significant errors at cell boundaries. An example of the effect of1405 this correction on an image profile is shown in Figure \ref{fig:dark switching}.1406 1407 %% \begin{figure}1408 %% \centering1409 %% \caption{Continuity example, with background issue.}1410 %% \label{fig: continuity example}1411 %% \end{figure}1412 1413 \subsection{Fringe correction}1414 \label{sec:fringe}1415 % det_id 296 is the fringe we use.1416 1417 \czwdraft{This is still a mess}1418 1419 Due to variations in the thickness of the detectors, we observe1420 interference patterns at the infrared end of the filter set, as the1421 wavelength of the light becomes comparable to the thickness of the1422 detectors. Visually inspecting the images shows that the fringing is1423 most prevalent in the y-filter images, with negligible fringing in1424 other bands. As a result of this, we only apply a fringe correction1425 to the y filter data.1426 1427 The fringe used for PV3 processing was constructed from a set of 201428 120s science exposures. These exposures are overscan subtracted, and1429 corrected for non-linearity, and have the dark and flat models1430 applied. These images are smoothed with a Gaussian of $\sigma = 2$1431 pixels to minimize pixel to pixel noise. The fringe image data is1432 then constructed by calculating the clipped mean of the input images1433 with two iteration of clipping at the $3\sigma$ level.1434 1435 A course background model is constructed by calculating the median on1436 a 3x3 grid (approximately 200x200 pixels each). A set of 10001437 randomly selected points are selected on the fringe image in each1438 cell, and a median calculated for this position in a 10x10 pixel box,1439 with the background level subtracted. These sample locations provide1440 scale points to allow the amplitude of the measured fringe to be1441 compared to that found on science images.1442 1443 To apply the fringe, the same sample locations are measured on science1444 image to determine the relative strength of the fringing in that1445 particular image. A least squares fit between the fringe measurements1446 and the corresponding measurements on the science image provides the1447 scale factor multiplied to the fringe before it is subtracted from the1448 science image.1449 1450 \begin{figure}1451 \centering1452 \begin{minipage}{0.5\hsize}1453 \includegraphics[width=1.0\hsize,angle=0,clip]{images/o5220g0025o_XY53_nofringe.png}1454 % \caption{(a)}1455 % \end{subfigure}%1456 % \begin{subfigure}[]{.45\hsize}1457 \end{minipage}%1458 \begin{minipage}{0.5\hsize}1459 \includegraphics[width=1.0\hsize,angle=0,clip]{images/o5220g0025o_XY53_fringe.png}1460 % \caption{(b)}1461 % \end{subfigure}1462 \end{minipage}1463 \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.}}1464 \label{fig: fringe example}1465 \end{figure}1466 1467 \subsection{Background subtraction}1468 \label{sec:background}1469 1470 Once all other detrending is done, the pixels from each cell are1471 mosaicked into the full $4846\times{}4868$ pixel OTA image. A1472 background model for the full OTA is then determined prior to the1473 photometric analysis. The mosaicked image is binned into1474 $800\times{}800$ pixel bins, centered on the image center, and1475 overlapping by a factor of 2 in both axes. These bins have 100001476 random samples drawn, and a binned cumulative distribution function is1477 generated. These bins are interpolated to find the best mean value at1478 the $50\%$ level, as well as the distribution $\sigma$ by estimating1479 from the $32\%$ and $68\%$ levels. Repeating this across all bins1480 results in a $13\times{}13$ grid of background bins, which are1481 bilinearly interpolated to generate the background model to subtract.1482 Each object in the photometric catalog has a SKY and SKY\_SIGMA value1483 based on this model as well.1484 1485 %% * Magic1486 %% * Warping1487 %% * warping kernel1488 %% * linear-by-pieces1489 %% * Covariance1490 %% * def of skycells?1491 %% * Stacking1492 %% * pixel combination rules1493 %% * pixel rejections1494 %% * convolution for matching (success and failure)1495 %% * Difference Image analysis1496 1497 1498 1466 \section{Warping} 1499 1467 \label{sec:warping}
Note:
See TracChangeset
for help on using the changeset viewer.
