IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40439 for trunk


Ignore:
Timestamp:
May 18, 2018, 6:49:55 PM (8 years ago)
Author:
watersc1
Message:

Updated detrend paper, with additional reference in lib.bib.

Location:
trunk/doc/release.2015
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/release.2015/inputs/lib.bib

    r40103 r40439  
    1629116291  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
    1629216292}
     16293
     16294@book{lanczos1956applied,
     16295  title={Applied analysis},
     16296  author={Lanczos, C.},
     16297  lccn={lc56012218},
     16298  series={Prentice-Hall mathematics series},
     16299  url={https://books.google.com/books?id=JmNKAAAAMAAJ},
     16300  year={1956},
     16301  publisher={Prentice-Hall}
     16302}
     16303             
  • trunk/doc/release.2015/ps1.detrend/detrend.bbl

    r40082 r40439  
    1 \begin{thebibliography}{10}
     1\begin{thebibliography}{15}
    22\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
    33
     
    4747{Huber}, M., {TBD}, A., {TBD}, B., \& et~al. 2017, ArXiv e-prints
    4848
     49\bibitem[{Lanczos(1956)}]{lanczos1956applied}
     50Lanczos, C. 1956, Applied analysis, Prentice-Hall mathematics series
     51  (Prentice-Hall)
     52
     53\bibitem[{{Lupton} {et~al.}(1999){Lupton}, {Gunn}, \&
     54  {Szalay}}]{1999AJ....118.1406L}
     55{Lupton}, R.~H., {Gunn}, J.~E., \& {Szalay}, A.~S. 1999, \aj, 118, 1406
     56
     57\bibitem[{{Magnier} \& {Cuillandre}(2004)}]{2004PASP..116..449M}
     58{Magnier}, E.~A. \& {Cuillandre}, J.-C. 2004, \pasp, 116, 449
     59
     60\bibitem[{{Magnier} {et~al.}(2017){Magnier}, {Schlafly}, {Finkbeiner}, \&
     61  et~al.}]{magnier2017.datasystem}
     62{Magnier}, E.~A., {Schlafly}, E.~F., {Finkbeiner}, D.~P., \& et~al. 2017, ArXiv
     63  e-prints
     64
     65\bibitem[{{Magnier} {et~al.}(2016{\natexlab{a}}){Magnier}, {Schlafly},
     66  {Finkbeiner}, {Tonry}, {Goldman}, {R{\"o}ser}, {Schilbach}, {Chambers},
     67  {Flewelling}, {Huber}, {Price}, {Sweeney}, {Waters}, {Denneau}, {Draper},
     68  {Hodapp}, {Jedicke}, {Kudritzki}, {Metcalfe}, {Stubbs}, \&
     69  {Wainscoast}}]{magnier2017.calibration}
     70{Magnier}, E.~A., {Schlafly}, E.~F., {Finkbeiner}, D.~P., {Tonry}, J.~L.,
     71  {Goldman}, B., {R{\"o}ser}, S., {Schilbach}, E., {Chambers}, K.~C.,
     72  {Flewelling}, H.~A., {Huber}, M.~E., {Price}, P.~A., {Sweeney}, W.~E.,
     73  {Waters}, C.~Z., {Denneau}, L., {Draper}, P., {Hodapp}, K.~W., {Jedicke}, R.,
     74  {Kudritzki}, R.-P., {Metcalfe}, N., {Stubbs}, C.~W., \& {Wainscoast}, R.~J.
     75  2016{\natexlab{a}}, ArXiv e-prints
     76
     77\bibitem[{{Magnier} {et~al.}(2016{\natexlab{b}}){Magnier}, {Sweeney},
     78  {Chambers}, {Flewelling}, {Huber}, {Price}, {Waters}, {Denneau}, {Draper},
     79  {Jedicke}, {Hodapp}, {Kudritzki}, {Metcalfe}, {Stubbs}, \&
     80  {Wainscoast}}]{magnier2017.analysis}
     81{Magnier}, E.~A., {Sweeney}, W.~E., {Chambers}, K.~C., {Flewelling}, H.~A.,
     82  {Huber}, M.~E., {Price}, P.~A., {Waters}, C.~Z., {Denneau}, L., {Draper}, P.,
     83  {Jedicke}, R., {Hodapp}, K.~W., {Kudritzki}, R.-P., {Metcalfe}, N., {Stubbs},
     84  C.~W., \& {Wainscoast}, R.~J. 2016{\natexlab{b}}, ArXiv e-prints
     85
    4986\bibitem[{{Price} {et~al.}(2017){Price}, {TBD}, {TBD}, \& et~al.}]{price2017}
    5087{Price}, P.~A., {TBD}, A., {TBD}, B., \& et~al. 2017, ArXiv e-prints
     
    73110  IAU General Assembly, 22, 2251124
    74111
    75 \bibitem[{{York} {et~al.}(2000){York}, {Adelman}, {Anderson}, {Anderson},
    76   {Annis}, {Bahcall}, {Bakken}, {Barkhouser}, {Bastian}, {Berman}, {Boroski},
    77   {Bracker}, {Briegel}, {Briggs}, {Brinkmann}, {Brunner}, {Burles}, {Carey},
    78   {Carr}, {Castander}, {Chen}, {Colestock}, {Connolly}, {Crocker}, {Csabai},
    79   {Czarapata}, {Davis}, {Doi}, {Dombeck}, {Eisenstein}, {Ellman}, {Elms},
    80   {Evans}, {Fan}, {Federwitz}, {Fiscelli}, {Friedman}, {Frieman}, {Fukugita},
    81   {Gillespie}, {Gunn}, {Gurbani}, {de Haas}, {Haldeman}, {Harris}, {Hayes},
    82   {Heckman}, {Hennessy}, {Hindsley}, {Holm}, {Holmgren}, {Huang}, {Hull},
    83   {Husby}, {Ichikawa}, {Ichikawa}, {Ivezi{\'c}}, {Kent}, {Kim}, {Kinney},
    84   {Klaene}, {Kleinman}, {Kleinman}, {Knapp}, {Korienek}, {Kron}, {Kunszt},
    85   {Lamb}, {Lee}, {Leger}, {Limmongkol}, {Lindenmeyer}, {Long}, {Loomis},
    86   {Loveday}, {Lucinio}, {Lupton}, {MacKinnon}, {Mannery}, {Mantsch}, {Margon},
    87   {McGehee}, {McKay}, {Meiksin}, {Merelli}, {Monet}, {Munn}, {Narayanan},
    88   {Nash}, {Neilsen}, {Neswold}, {Newberg}, {Nichol}, {Nicinski}, {Nonino},
    89   {Okada}, {Okamura}, {Ostriker}, {Owen}, {Pauls}, {Peoples}, {Peterson},
    90   {Petravick}, {Pier}, {Pope}, {Pordes}, {Prosapio}, {Rechenmacher}, {Quinn},
    91   {Richards}, {Richmond}, {Rivetta}, {Rockosi}, {Ruthmansdorfer}, {Sandford},
    92   {Schlegel}, {Schneider}, {Sekiguchi}, {Sergey}, {Shimasaku}, {Siegmund},
    93   {Smee}, {Smith}, {Snedden}, {Stone}, {Stoughton}, {Strauss}, {Stubbs},
    94   {SubbaRao}, {Szalay}, {Szapudi}, {Szokoly}, {Thakar}, {Tremonti}, {Tucker},
    95   {Uomoto}, {Vanden Berk}, {Vogeley}, {Waddell}, {Wang}, {Watanabe},
    96   {Weinberg}, {Yanny}, {Yasuda}, \& {SDSS Collaboration}}]{2000AJ....120.1579Y}
    97 {York}, D.~G., {Adelman}, J., {Anderson}, Jr., J.~E., {Anderson}, S.~F.,
    98   {Annis}, J., {Bahcall}, N.~A., {Bakken}, J.~A., {Barkhouser}, R., {Bastian},
    99   S., {Berman}, E., {Boroski}, W.~N., {Bracker}, S., {Briegel}, C., {Briggs},
    100   J.~W., {Brinkmann}, J., {Brunner}, R., {Burles}, S., {Carey}, L., {Carr},
    101   M.~A., {Castander}, F.~J., {Chen}, B., {Colestock}, P.~L., {Connolly}, A.~J.,
    102   {Crocker}, J.~H., {Csabai}, I., {Czarapata}, P.~C., {Davis}, J.~E., {Doi},
    103   M., {Dombeck}, T., {Eisenstein}, D., {Ellman}, N., {Elms}, B.~R., {Evans},
    104   M.~L., {Fan}, X., {Federwitz}, G.~R., {Fiscelli}, L., {Friedman}, S.,
    105   {Frieman}, J.~A., {Fukugita}, M., {Gillespie}, B., {Gunn}, J.~E., {Gurbani},
    106   V.~K., {de Haas}, E., {Haldeman}, M., {Harris}, F.~H., {Hayes}, J.,
    107   {Heckman}, T.~M., {Hennessy}, G.~S., {Hindsley}, R.~B., {Holm}, S.,
    108   {Holmgren}, D.~J., {Huang}, C.-h., {Hull}, C., {Husby}, D., {Ichikawa},
    109   S.-I., {Ichikawa}, T., {Ivezi{\'c}}, {\v Z}., {Kent}, S., {Kim}, R.~S.~J.,
    110   {Kinney}, E., {Klaene}, M., {Kleinman}, A.~N., {Kleinman}, S., {Knapp},
    111   G.~R., {Korienek}, J., {Kron}, R.~G., {Kunszt}, P.~Z., {Lamb}, D.~Q., {Lee},
    112   B., {Leger}, R.~F., {Limmongkol}, S., {Lindenmeyer}, C., {Long}, D.~C.,
    113   {Loomis}, C., {Loveday}, J., {Lucinio}, R., {Lupton}, R.~H., {MacKinnon}, B.,
    114   {Mannery}, E.~J., {Mantsch}, P.~M., {Margon}, B., {McGehee}, P., {McKay},
    115   T.~A., {Meiksin}, A., {Merelli}, A., {Monet}, D.~G., {Munn}, J.~A.,
    116   {Narayanan}, V.~K., {Nash}, T., {Neilsen}, E., {Neswold}, R., {Newberg},
    117   H.~J., {Nichol}, R.~C., {Nicinski}, T., {Nonino}, M., {Okada}, N., {Okamura},
    118   S., {Ostriker}, J.~P., {Owen}, R., {Pauls}, A.~G., {Peoples}, J., {Peterson},
    119   R.~L., {Petravick}, D., {Pier}, J.~R., {Pope}, A., {Pordes}, R., {Prosapio},
    120   A., {Rechenmacher}, R., {Quinn}, T.~R., {Richards}, G.~T., {Richmond}, M.~W.,
    121   {Rivetta}, C.~H., {Rockosi}, C.~M., {Ruthmansdorfer}, K., {Sandford}, D.,
    122   {Schlegel}, D.~J., {Schneider}, D.~P., {Sekiguchi}, M., {Sergey}, G.,
    123   {Shimasaku}, K., {Siegmund}, W.~A., {Smee}, S., {Smith}, J.~A., {Snedden},
    124   S., {Stone}, R., {Stoughton}, C., {Strauss}, M.~A., {Stubbs}, C., {SubbaRao},
    125   M., {Szalay}, A.~S., {Szapudi}, I., {Szokoly}, G.~P., {Thakar}, A.~R.,
    126   {Tremonti}, C., {Tucker}, D.~L., {Uomoto}, A., {Vanden Berk}, D., {Vogeley},
    127   M.~S., {Waddell}, P., {Wang}, S.-i., {Watanabe}, M., {Weinberg}, D.~H.,
    128   {Yanny}, B., {Yasuda}, N., \& {SDSS Collaboration}. 2000, \aj, 120, 1579
    129 
    130112\end{thebibliography}
  • trunk/doc/release.2015/ps1.detrend/detrend.tex

    r40423 r40439  
    200200\citep{magnier2017.datasystem}, but a short summary follows.  The raw
    201201image data is stored on the processing cluster, with a database
    202 storing the metadata of exposure parameters.  These raw images can be
    203 launched for the initial \IPPstage{chip} stage processing.  This stage
    204 performs the image detrending (described below in section
     202containing the metadata of exposure parameters.  These raw images can
     203be launched for the initial \IPPstage{chip} stage processing.  This
     204stage performs the image detrending (described below in section
    205205\ref{sec:detrending}), as well as the single epoch photometry
    206206\citep{magnier2017.analysis}, in parallel on the individual OTA device
     
    230230are provided in \citet{magnier2017.analysis}.
    231231
    232 The limited version of same reduction procedure described above is
    233 also performed in real time on new exposures as they are observed by
    234 the telescope.  This process is automatic, with new exposures being
     232A limited version of same reduction procedure described above is also
     233performed in real time on new exposures as they are observed by the
     234telescope.  This process is automatic, with new exposures being
    235235downloaded from the summit to the main IPP processing cluster at the
    236236Maui Research and Technology Center in Kihei, and registered into the
     
    271271right, the OTA labels decrease in $X$ label, with the empty OTA00
    272272located in the lower right.  The OTA $Y$ labels increase upward in the
    273 mosaic. \czw{This is somewhat of a mess?}
     273mosaic.
    274274
    275275\textit{Note: These papers are being placed on the arXiv.org to
     
    328328constructed for the signal image, the mask image, and the variance map
    329329image.  The single epoch photometry is done at this stage as well.
    330 The following subsections (\ref{sec:burntool} - \ref{sec:background})
    331 detail these detrending steps, presented in the order in which they
    332 are applied to the individual OTA image data.  \czw{I haven't
    333   rearranged into regular and ``special'' yet.}
    334 
    335 \subsection{Burntool / Persistence effect}
    336 \label{sec:burntool}
    337 
    338 Pixels that approach the saturation point on GPC1, which varies by
    339 cell with common values around 60000 DN, introduce ``persistent
    340 charge'' on that and subsequent images.  During the read out process
    341 of a cell with such a bright pixel, some of the charge remains in the
    342 undepleted region of the silicon and is not shifted down the detector
    343 column toward the amplifier.  This charge remains in the starting
    344 pixel and slowly leaks out of the undepleted region, contaminating
    345 subsequent pixels during the read out process, resulting in a ``burn
    346 trail'' that extends from the center of the bright source away from
    347 the amplifier (vertically along the pixel columns toward the top of
    348 the cell).
    349 
    350 %associated with it
    351 %is not fully shifted down the detector column toward the amplifier.
    352 %As a result, this charge remains in the starting cell, and is
    353 %partially collected in subsequent shifts, resulting in a ``burn
    354 %trail'' that extends from the center of the bright source away from
    355 %the amplifier (vertically along the pixel columns toward the top of
    356 %the cell).
    357 
    358 This incomplete charge shifting in nearly full wells continues as each
    359 row is read out.  This results in a remnant charge being deposited in
    360 the pixels that the full well was shifted through.  In following
    361 exposures, this remnant charge leaks out, resulting in a trail that
    362 extends from the initial location of the bright source on the previous
    363 image towards the amplifier (vertically down along the pixel column).
    364 This remnant charge can remain on the detector for up to thirty
    365 minutes.
    366 %, requiring the locations of these ``burns'' be retained
    367 %between exposures.
    368 
    369 Both of these types of persistence trails are measured and optionally
    370 repaired via the \IPPprog{burntool} program.  This program does an
    371 initial scan of the image, and identifies objects with pixel values
    372 higher than a conservative threshold of 30000 DN.  The trail from the
    373 peak of that object is fit with a one-dimensional power law in each
    374 pixel column above the threshold, based on empirical evidence that
    375 this is the functional form of this persistence effect.  This fit also
    376 matches the expectation that a constant fraction of charge is
    377 incompletely transferred at each shift beyond the persistence
    378 threshold.  Once the fit is done, the model can be subtracted from
    379 the image.  The location of the source is stored in a table along
    380 with the exposure PONTIME, which denotes the number of seconds since
    381 the detector was last powered on and provides an internally
    382 consistent time scale.
    383 
    384 For subsequent exposures, the table associated with the previous image
    385 is read in, and after correcting trails from the stars on the new
    386 image, the positions of the bright stars from the table are used to
    387 check for remnant trails from previous exposures on the image.  These
    388 are fit and subtracted using a one-dimensional exponential model,
    389 again based on empirical studies.  The output table retains this
    390 remnant position for 2000 seconds after the initial PONTIME recorded.
    391 This allows fits to be attempted well beyond the nominal lifetime of
    392 these trails.  Figure \ref{fig:burntool images} shows an example of a
    393 cell with a persistence trail from a bright star, the post-correction
    394 result, as well as the pre and post correction versions of the same
    395 cell on the subsequent exposure.  The profiles along the detector
    396 columns for these two exposures are presented in Figure
    397 \ref{fig:burntool plot}.
    398 
    399 Using this method of correcting the persistence trails has the
    400 challenge that it is based on fits to the raw image data, which may
    401 have other signal sources not determined by the persistence effect.
    402 The presence of other stars or artifacts in the detector column can
    403 result in a poor model to be fit, resulting in either an over- or
    404 under-subtraction of the trail.  For this reason, the image mask is
    405 marked with a value indicating that this correction has been applied.
    406 These pixels are not fully excluded, but they are marked as suspect,
    407 which allows them to be excluded from consideration in subsequent
    408 stages, such as image stacking.
    409 
    410 The cores of very bright stars can also be deformed by this process,
    411 as the burntool fitting subtracts flux from only one side of the star.
    412 As most stars that result in persistence trails already have saturated
    413 cores, they are already ignored for the purpose of PSF determination
    414 and are flagged as saturated by the photometry reduction.
    415 
    416 \begin{figure}
    417   \centering
    418   \begin{minipage}{0.45\hsize}
    419     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_nobt.png}
    420 %    \caption{(a)}
    421 %  \end{subfigure}%
    422 %  \begin{subfigure}[]{.45\hsize}
    423   \end{minipage}%
    424   \begin{minipage}{0.45\hsize}
    425     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_nobt.png}
    426 %    \caption{(b)}
    427 %  \end{subfigure}
    428   \end{minipage}
    429   \begin{minipage}{0.45\hsize}
    430     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt.png}
    431 %    \caption{(a)}
    432 %  \end{subfigure}%
    433 %  \begin{subfigure}[]{.45\hsize}
    434   \end{minipage}%
    435   \begin{minipage}{0.45\hsize}
    436     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt.png}
    437 %    \caption{(b)}
    438 %  \end{subfigure}
    439   \end{minipage}
    440   \caption{Example of OTA11 cell xy50 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.}
    441   \label{fig:burntool images}
    442 \end{figure}
    443 
    444 
    445 \begin{figure}
    446   \centering
    447   \begin{minipage}{0.45\hsize}
    448     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt_trail.png}
    449 %    \caption{(a)}
    450 %  \end{subfigure}%
    451 %  \begin{subfigure}[]{.45\hsize}
    452   \end{minipage}%
    453   \begin{minipage}{0.45\hsize}
    454     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt_trail.png}
    455 %    \caption{(b)}
    456 %  \end{subfigure}
    457   \end{minipage}
    458 
    459   \caption{Example of a profile cut along the y-axis through a bright star on exposure o5677g0123o OTA11 in cell xy50 (left panel) and on the subsequent exposure o5677g0124o (right panel).  In both figures, the green points show the image corrected with all appropriate detrending steps, but without burntool applied, illustrating the amplitude of the persistence trails.  The red points show the same data after the burntool correction, which reduces the impact of these features.  Both exposures are in the \gps{} filter with exposure times of 43s}
    460   \label{fig:burntool plot}
    461 \end{figure}
    462 
    463 
     330The following subsections (\ref{sec:overscan} - \ref{sec:background})
     331detail the detrending process used on GPC1 that are common to other
     332detectors.  The GPC1 specific detrending steps are included after,
     333explaining these additional steps that remove the instrument signature.
    464334
    465335\subsection{Overscan}
     
    471341them.  Each row has an overscan value subtracted, calculated by
    472342finding the median value of that row's overscan pixels and then
    473 smoothing between rows with a three-row boxcar median.  \czw{something
    474   about this sounding like real pixels?}
    475 
    476 \subsection{Non-linearity Correction}
    477 \label{sec:nonlinearity}
    478 
    479 The pixels of GPC1 are not uniformly linear at all flux levels.  In
    480 particular, at low flux levels, some pixels have a tendency to sag
    481 relative to the expected linear value.  This effect is most pronounced
    482 along the edges of the detector cells, although some entire cells show
    483 evidence of this effect.
    484 
    485 To correct this sag, we studied the behavior of a series of flat
    486 frames for a ramp of exposure times with approximate logarithmically
    487 equal spacing between 0.01s and 57.04s.  As the exposure time
    488 increases, the signal on each pixel also increases in what is expected
    489 to be a linear manner.  Each of the flat exposures in this ramp is
    490 overscan corrected, and then the median is calculated for each cell,
    491 as well as for the rows and columns within ten pixels of the edge of
    492 the science region.  From these median values at each exposure time
    493 value, we can construct the expected trend by fitting a linear model
    494 for the region considered.  This fitting was limited to only the range
    495 of fluxes between 12000 and 38000 counts, as these ranges were found
    496 to match the linear model well.  This range avoids the non-linearity
    497 at low fluxes, as well as the possibility of high-flux non-linearity
    498 effects.
    499 
    500 We store the average flux measurement and deviation from the linear
    501 fit for each exposure time for all regions on all detector cells in
    502 the linearity detrend look up tables.  An example of this data is
    503 shown in figure \ref{fig: nonlinearity}.  When this correction is
    504 applied to science data, these lookup tables are loaded, and a linear
    505 interpolation is performed to determine the correction needed for the
    506 flux in that pixel.  This look up is performed for both the row and
    507 column of each pixel, to allow the edge correction to be applied where
    508 applicable, and the full cell correction elsewhere.  The average of
    509 these two values is then applied to the pixel value, reducing the
    510 effects of pixel nonlinearity.
    511 
    512 This non-linearity effect appears to be stable in time for the
    513 majority of the detector pixels, with little evident change over the
    514 survey duration.  However, as the non-linearity is most pronounced at
    515 the edges of the detector cells, those are the regions where the
    516 correction is most likely to be incomplete.  Because of this fact,
    517 most pixels in the static mask with either the DARKMASK or FLATMASK
    518 bit set are found along these edges.  As the non-linearity correction
    519 is unable to reliably restore these pixels, they produce inconsistent
    520 values after the dark and flat have been applied, and are therefore
    521 rejected.
    522 
    523 \begin{figure}
    524   \centering
    525   \includegraphics[width=0.9\hsize,angle=0,clip]{images/linearity_XY27_xy16.png}
    526   \caption{Example plot of the linearity correction as a fraction of observed flux for OTA27, cell xy16.}
    527   \label{fig: nonlinearity}
    528 \end{figure}
     343smoothing between rows with a three-row boxcar median.
    529344
    530345\subsection{Dark/Bias Subtraction}
     
    548363
    549364Applying the dark model is simply a matter of calculating the response
    550 to the exposure time and detector temperature for the image to be
     365for the exposure time and detector temperature of the image to be
    551366corrected, and subtracting the resulting dark signal from the image.
    552367Figure \ref{fig:dark image} shows the results of the dark subtraction.
     
    608423\begin{figure}
    609424  \centering
    610 %  \begin{subfigure}[]{.45\hsize}
    611425  \begin{minipage}{0.45\hsize}
    612426    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_M_OS_NL_XY23_b1.jpg}
    613 %    \caption{(a)}
    614 %  \end{subfigure}%
    615 %  \begin{subfigure}[]{.45\hsize}
    616427  \end{minipage}%
    617428  \begin{minipage}{0.45\hsize}
    618429    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_to_DARK_XY23_b1.jpg}
    619 %    \caption{(b)}
    620 %  \end{subfigure}
    621430  \end{minipage}
    622431  \caption{An example of the dark model application to exposure o5677g0123o, OTA23 (2011-04-26, 43s \gps{} filter).  The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, and the detector non-linearity corrected.  The right panel, shows the same exposure with the dark applied in addition to the processing shown on the left, removing the amplifier glows in the cell corners.}
     
    644453To generate a correction for this change, a set of video dark models
    645454were created by running the standard dark construction process on a
    646 series of dark frames that have had the video signal enabled for some
     455series of dark frames that had the video signal enabled for some
    647456cells.  GPC1 can only run video signals on a subset of the OTAs at a
    648457given time.  This requires two passes to enable the video signal
     
    669478\begin{figure}
    670479  \centering
    671 %  \begin{subfigure}[]{.45\hsize}
    672480  \begin{minipage}{0.45\hsize}
    673481    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_Rdark_XY22_b1.jpg}
    674 %    \caption{(a)}
    675 %  \end{subfigure}%
    676 %  \begin{subfigure}[]{.45\hsize}
    677482  \end{minipage}%
    678483  \begin{minipage}{0.45\hsize}
    679484    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_VIDEODARK_VDim_VDdark_XY22_b1.jpg}
    680 %    \caption{(b)}
    681 %  \end{subfigure}
    682485  \end{minipage}
    683486  \caption{An example of the video dark model application to exposure o5677g0123o, OTA22 (2011-04-26, 43s \gps{} filter), which has a video cell located in cell xy16.  The left panel shows the image data mosaicked to the OTA level, and has had the static mask applied, the overscan subtracted, the detector non-linearity corrected, and a regular dark applied.  The right panel, shows the same exposure with a video dark applied instead of the standard dark.  The main impact of this change is the improved correction of the corner glows, which are over subtracted with the standard dark.}
     
    689492
    690493Based on a study of the positional dependence of all detected sources,
    691 we have discovered that the cells in GPC1 do not have uniform noise
     494we discovered that the cells in GPC1 do not have uniform noise
    692495characteristics.  Instead, there is a gradient along the pixel rows,
    693496with the noise generally higher away from the read out amplifier
     
    739542the additional empirical variance term in place of a single read noise
    740543value.
    741 
    742 %% In the detection process, we expect false positives at a rate equal to
    743 %% the one-tailed probability beyond the detection threshold.  For these
    744 %% tests, only detections measured at the $\sigma_{thresh} = 5\sigma$
    745 %% level are used, to match that used in the photometry on science data.
    746 %% This probability can be converted into a number of false detections by
    747 %% considering a given area.  As the detections must be isolated to not
    748 %% be detected as an extended object, this area must be reduced by the
    749 %% area a given PSF occupies.  Combining this, we find that we expect a
    750 %% probability $P = 1 - \Phi_{normal}(5) = \frac{1}{2}
    751 %% \erfcinv\left(\frac{5}{\sqrt{2}}\right)$, and an area given $N$
    752 %% exposures of area $X\times Y$, $A = \frac{X \times Y \times
    753 %%   N}{A_{PSF}}$.  For a typical $1"$ seeing, $A_{PSF}$ is approximately
    754 %% 16 pixels.  Using this model for the false positives, we found that
    755 %% the added read noise was insufficient to account for the observed
    756 %% false positive rate.  Inverting this relation, we can measure
    757 %% $\sigma_{obs}$, the true threshold level based on the number of false
    758 %% positives observed.  This $\sigma_{obs}$ is the combined to form a
    759 %% boost factor $B = \sigma_{thresh} / \sigma_{obs}$ that amplifies the
    760 %%   noisemap to match the observed false detection rate.
    761 
    762 %% The row-to-row variations that contribute to the extra noise are
    763 %% correlated with the dark model,
    764 %% changes, the effective noise also changes.  To ensure that the
    765 %% noisemap accurately matches the true noise level, we have created
    766 %% different noisemap models for the three major time ranges of the dark
    767 %% model.  We do not see any strong evidence that the noisemaps have the
    768 %% A/B modes visible in the dark, and so we do not generate different
    769 %% models for each individual dark model.  The additional pixel-to-pixel
    770 %% variance from this noisemap is added to the Poissonian variance to
    771 %% form the science variance image generated by the \IPPstage{chip}
    772 %% processing.
    773544
    774545\subsection{Flat}
     
    807578on this process are contained in \citet{magnier2017.calibration}.
    808579
    809 \subsection{Pattern correction}
    810 \label{sec:pattern}
    811 
    812 %% Due to detector specific issues that are not cleanly removed by the
    813 %% dark model, we have a set of ``pattern'' corrections that are applied
    814 %% to some selection of the OTAs in the camera.  This is done to reduce
    815 %% the effect that detector differences have on the measured astronomical
    816 %% signal that are not stable enough to be corrected with a static model.
    817 %% Because of this, the pattern corrections attempt to identify and
    818 %% correct the detector issues based on appropriate filtering the
    819 %% individual science exposures.
    820 
    821 %% In addition to the standard detrend corrections, we apply additional
    822 %% adjustments for features that are not completely removed by the dark
    823 %% model.
    824 
    825 %% The PATTERN.ROW correction is used to remove any remaining row-by-row
    826 %% bias variation, and the PATTERN.CONTINUITY correction attempts to
    827 %% ensure that the cells of a given OTA are consistent with the other
    828 %% cells on that OTA.
    829 
    830 \subsubsection{Pattern Row}
    831 %% Statistics so I have them written down somewhere
    832 %% chipProcessedImfile.bg/bg_stdev by filter for XY33 (a good chip)
    833 %% filter  bg_mean stdev median Qsig                              bg_stdev_mean stdev median Qsig
    834 %% g        36.37422026669   64.64175104057  32.693   6.10284     14.696938349131  78.80460307171  8.8401  0.5417843
    835 %% r       200.96143304525  471.87743546238 117.105  94.55608     33.854672792146  79.01642728089 13.4564  5.3771355
    836 %% i       447.00504994458  938.38517801037 286.810 154.71397     57.298335510188  99.38392923935 20.0217 24.2254723
    837 %% z       317.54933679054  390.38930252748 241.014 114.13316     48.359069000176  94.44452756094 17.9404  9.1535209
    838 %% y       371.09019536218  293.57439970375 288.481 133.38769     43.724342221691 135.04286534327 19.9029  7.5396461
    839 
    840 As discussed above in the dark and noisemap sections, certain
    841 detectors have significant bias offsets between adjacent rows, caused
    842 by drifts in the bias level due to cross talk.  The magnitude of these
    843 offsets increases as the distance from the readout amplifier and
    844 overscan region increases, resulting in horizontal streaks that are
    845 more pronounced along the large x pixel edge of the cell.  As the
    846 level of the offset is apparently random between exposures, the dark
    847 correction cannot fully remove this structure from the images, and the
    848 noisemap value only indicates the level of the average variance added
    849 by these bias offsets.  Therefore, we apply the PATTERN.ROW correction
    850 in an attempt to mitigate the offsets and correct the image values.
    851 To force the rows to agree, a second order clipped polynomial is fit
    852 to each row in the cell.  Four fit iterations are run, and pixels
    853 $2.5\sigma$ deviant are excluded from subsequent fits, to minimize the
    854 effect stars and other astronomical signals have.  This final trend is
    855 then subtracted from that row.  Simply doing this subtraction will
    856 also have the effect of removing the background sky level.  To prevent
    857 this, the constant and linear terms for each row are stored, and
    858 linear fits are made to these parameters as a function of row,
    859 perpendicular to the initial fits.  This produces a plane that is
    860 added back to the image to restore the background offset and any
    861 linear ramp that exists in the sky.
    862 
    863 These row-by-row variations have the largest impact on data taken in
    864 the \gps{} filter, as the read noise is the dominant noise source in
    865 that filter.  At longer wavelengths, the noise from the Poissonian
    866 variation in the sky level increases.  The PATTERN.ROW correction is
    867 still applied to data taken in the other filters, because the increase
    868 in sky noise does not fully obscure the row-by-row noise.
    869 
    870 This correction was required on all cells on all OTAs prior to
    871 2009-12-01, at which point a modification of the camera electronics
    872 reduced the scale of the row-by-row offsets for the majority of the
    873 OTAs.  \czw{describe modification} As a result, we only apply this
    874 correction to the cells where it is still necessary, as shown in
    875 Figure \ref{fig: pattern row cells}.  A list of these cells is in
    876 Table \ref{tab:pattern_row_cells}.
    877 
    878 Although this correction largely resolves the row-by-row offset issue
    879 in a satisfactory way, large and bright astronomical objects can bias
    880 the fit significantly.  This results in an oversubtraction of the
    881 offset near these objects.  As the offsets are calculated on the pixel
    882 rows, this oversubtraction is not uniform around the object, but is
    883 preferentially along the horizontal x axis of the object.  Most
    884 astronomical objects are not significantly distorted by this, with
    885 this only becoming on issue for only bright objects comparable to the
    886 size of the cell (598 pixels = 150").  Figure \ref{fig: pattern row example}
    887 shows an example of a cell pre- and post-correction.
    888 
    889 \begin{deluxetable}{lcccc}
    890   \tablecolumns{3}
    891   \tablewidth{0pc}
    892   \tablecaption{Cells which have PATTERN.ROW correction applied}
    893   \tablehead{\colhead{OTA} & \colhead{Cell columns} & \colhead{Additional cells}}
    894   \startdata
    895   OTA11 &  & xy02, xy03, xy04, xy07 \\
    896   OTA14 &  & xy23 \\
    897   OTA15 & 0 & \\
    898   OTA27 & 0, 1, 2, 3, 7 & \\
    899   OTA31 & 7 & \\
    900   OTA32 & 3, 7 & \\
    901   OTA45 & 3, 7 & \\
    902   OTA47 & 0, 3, 5, 7 & \\
    903   OTA57 & 0, 1, 2, 6, 7 & \\
    904   OTA60 &  & xy55 \\
    905   OTA74 & 2, 7 & \\
    906   \enddata
    907   \label{tab:pattern_row_cells}
    908 \end{deluxetable}
    909 
    910 \begin{figure}
    911   \centering
    912   \includegraphics[width=0.9\hsize,angle=0,clip]{images/pattern_row_edit.png}
    913   \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.}
    914   \label{fig: pattern row cells}
    915 \end{figure}
    916 
    917 \begin{figure}
    918   \centering
    919   \begin{minipage}{0.45\hsize}
    920     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_nopat.png}
    921 %    \caption{(a)}
    922 %  \end{subfigure}%
    923 %  \begin{subfigure}[]{.45\hsize}
    924   \end{minipage}%
    925   \begin{minipage}{0.45\hsize}
    926     \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_pat.png}
    927 %    \caption{(b)}
    928 %  \end{subfigure}
    929   \end{minipage}
    930   \caption{Example of the PATTERN.ROW correction on exposure o5379g0103o OTA57 cell xy01 (\ips{} filter 45s).  The left panel shows the cell with all appropriate detrending except the PATTERN.ROW, and the right shows the same cell with PATTERN.ROW applied.  The correction reduces the correlated noise on the right side, which is most distant from the read out amplifier.  There is a slight over subtraction along the rows near the bright star. \czw{I don't think this fits the convention I stated earlier}}
    931   \label{fig: pattern row example}
    932 \end{figure}
    933 
    934 \subsubsection{Pattern Continuity}
    935 
    936 The background levels of cells on a single OTA do not always have the
    937 same value.  Even with dark and flat corrections applied, adjacent
    938 cells may not match.  In addition, studies of the background level
    939 indicate that the row-by-row bias can introduce small background
    940 gradient variations along the rows of the cells that are not stable.
    941 This common feature across the columns of cells results in a ``saw
    942 tooth'' pattern horizontally across an the mosaicked OTA, and as the
    943 background model fits a smooth sky level, this induces over and under
    944 subtraction at the cell boundaries.
    945 
    946 The PATTERN.CONTINUITY correction, attempts to match the edges of a
    947 cell to those of its neighbors.  For each cell, a thin box 10 pixels
    948 wide running the full length of each edge is extracted and the median
    949 value of unmasked values calculated for that box.  These median values
    950 are then used to construct a vector of the sum of the differences
    951 between that cell's edges and the corresponding edge on any adjacent
    952 cell $\Delta$.  A matrix $A$ of these associations is also
    953 constructed, with the diagonal containing the number of cells adjacent
    954 to that cell, and the off-diagonal values being set to -1 for each
    955 pair of adjacent cells.  The offsets needed for each chip, $x$ can
    956 then be found by solving the system $A x = \Delta$. A cell with the
    957 maximum number of neighbors, usually cell xy11, the first cell not on
    958 the edge of the OTA, is used to constrain the system, ensuring that
    959 that cell has zero correction and that there is a single solution.
    960 
    961 For OTAs that initially show the saw tooth pattern, the effect of this
    962 correction is to align the cells into a single ramp, at the expense of
    963 the absolute background level.  However, as we subtract off a smooth
    964 background model prior to doing photometry, these deviations from an
    965 absolute sky level do not affect photometry for small sources.  The
    966 fact that the final ramp is smoother than it would be otherwise also
    967 allows for the background subtracted image to more closely match the
    968 astronomical sky, without significant errors at cell boundaries.  An
    969 example of the effect of this correction on an image profile is shown
    970 in Figure \ref{fig:dark switching}.
    971 
    972 
    973580\subsection{Fringe correction}
    974581\label{sec:fringe}
     
    1039646on the OTA due to defects in the semiconductor manufacturing
    1040647\czw{check this fact with Peter}.  To generate the mask for these
    1041 regions, a sample set of \czw{26} evenly-illuminated flat-field images
    1042 were measured to produce a map of the image variance in 20x20 pixel
    1043 bins.  As the flat screen is expected to illuminate the image
    1044 uniformly, the expected variances in each bin should be Poissonian
     648regions, a sample set of 26 evenly-illuminated flat-field images were
     649measured to produce a map of the image variance in 20x20 pixel bins.
     650As the flat screen is expected to illuminate the image uniformly on
     651this scale, the expected variances in each bin should be Poissonian
    1045652distributed with the flux level.  However, in regions with poor CTE,
    1046653adjacent pixels are not independent, as the charge in those pixels is
     
    1049656variance.  All regions with variance less than half the average image
    1050657level are added to the static mask.
     658
    1051659
    1052660The next step of mask construction is to examine the flat and dark
     
    1064672removing the pixels that cannot be corrected to a linear response.
    1065673
     674% http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/StaticMasks20101215
    1066675The final step of mask construction is to examine the detector for
    1067676bright columns and other static pixel issues.  This is first done by
    1068 processing \czw{examining residuals in flattened flat-field images?} a set of 100 \ips{} filter science images in the same fashion as
     677processing a set of 100 \ips{} filter science images in the same fashion as
    1069678for the DARKMASK.  A median image is constructed from these inputs
    1070679along with the per-pixel variance.  These images are used to identify
     
    1126735nature, and do not completely exclude the pixel from further
    1127736processing consideration.  The first of these dynamic masks is the
    1128 burntool advisory mask mentioned above.  These pixels are included for
     737burntool advisory mask described below.  These pixels are included for
    1129738photometry, but are rejected more readily in the stacking and
    1130739difference image construction, as they are more likely to have small
     
    1195804  \label{tab:crosstalk_rules}
    1196805\end{deluxetable}
    1197  
    1198806
    1199807\subsubsubsection{Optical ghosts}
     
    1271879  \label{tab:ghost_magnitudes}
    1272880\end{deluxetable}
    1273 
    1274881
    1275882\begin{figure}
     
    14501057distribution with a Gaussian.  All pixels that were masked in the
    14511058initial calculation are unmasked, and a histogram is again constructed
    1452 of the values, with a bin size set to $\sigma_{guess} / \left( N_{50} /
     1059from the values, with a bin size set to $\sigma_{guess} / \left( N_{50} /
    14531060500 \right)$.  With this bin size, we expect that a bin at $\pm 2
    14541061\sigma$ will have approximately 50 input points, which gives a
     
    15041111scale $3\pi$ PV3 reduction.
    15051112
     1113\subsection{Burntool / Persistence effect}
     1114\label{sec:burntool}
     1115
     1116Pixels that approach the saturation point on GPC1, which varies by
     1117cell with common values around 60000 DN, introduce ``persistent
     1118charge'' on that and subsequent images.  During the read out process
     1119of a cell with such a bright pixel, some of the charge remains in the
     1120undepleted region of the silicon and is not shifted down the detector
     1121column toward the amplifier.  This charge remains in the starting
     1122pixel and slowly leaks out of the undepleted region, contaminating
     1123subsequent pixels during the read out process, resulting in a ``burn
     1124trail'' that extends from the center of the bright source away from
     1125the amplifier (vertically along the pixel columns toward the top of
     1126the cell).
     1127
     1128This incomplete charge shifting in nearly full wells continues as each
     1129row is read out.  This results in a remnant charge being deposited in
     1130the pixels that the full well was shifted through.  In following
     1131exposures, this remnant charge leaks out, resulting in a trail that
     1132extends from the initial location of the bright source on the previous
     1133image towards the amplifier (vertically down along the pixel column).
     1134This remnant charge can remain on the detector for up to thirty
     1135minutes.
     1136
     1137Both of these types of persistence trails are measured and optionally
     1138repaired via the \IPPprog{burntool} program.  This program does an
     1139initial scan of the image, and identifies objects with pixel values
     1140higher than a conservative threshold of 30000 DN.  The trail from the
     1141peak of that object is fit with a one-dimensional power law in each
     1142pixel column above the threshold, based on empirical evidence that
     1143this is the functional form of this persistence effect.  This fit also
     1144matches the expectation that a constant fraction of charge is
     1145incompletely transferred at each shift beyond the persistence
     1146threshold.  Once the fit is done, the model can be subtracted from
     1147the image.  The location of the source is stored in a table along
     1148with the exposure PONTIME, which denotes the number of seconds since
     1149the detector was last powered on and provides an internally
     1150consistent time scale.
     1151
     1152For subsequent exposures, the table associated with the previous image
     1153is read in, and after correcting trails from the stars on the new
     1154image, the positions of the bright stars from the table are used to
     1155check for remnant trails from previous exposures on the image.  These
     1156are fit and subtracted using a one-dimensional exponential model,
     1157again based on empirical studies.  The output table retains this
     1158remnant position for 2000 seconds after the initial PONTIME recorded.
     1159This allows fits to be attempted well beyond the nominal lifetime of
     1160these trails.  Figure \ref{fig:burntool images} shows an example of a
     1161cell with a persistence trail from a bright star, the post-correction
     1162result, as well as the pre and post correction versions of the same
     1163cell on the subsequent exposure.  The profiles along the detector
     1164columns for these two exposures are presented in Figure
     1165\ref{fig:burntool plot}.
     1166
     1167Using this method of correcting the persistence trails has the
     1168challenge that it is based on fits to the raw image data, which may
     1169have other signal sources not determined by the persistence effect.
     1170The presence of other stars or artifacts in the detector column can
     1171result in a poor model to be fit, resulting in either an over- or
     1172under-subtraction of the trail.  For this reason, the image mask is
     1173marked with a value indicating that this correction has been applied.
     1174These pixels are not fully excluded, but they are marked as suspect,
     1175which allows them to be excluded from consideration in subsequent
     1176stages, such as image stacking.
     1177
     1178The cores of very bright stars can also be deformed by this process,
     1179as the burntool fitting subtracts flux from only one side of the star.
     1180As most stars that result in persistence trails already have saturated
     1181cores, they are already ignored for the purpose of PSF determination
     1182and are flagged as saturated by the photometry reduction.
     1183
     1184\begin{figure}
     1185  \centering
     1186  \begin{minipage}{0.45\hsize}
     1187    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_nobt.png}
     1188  \end{minipage}%
     1189  \begin{minipage}{0.45\hsize}
     1190    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_nobt.png}
     1191  \end{minipage}
     1192  \begin{minipage}{0.45\hsize}
     1193    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt.png}
     1194  \end{minipage}%
     1195  \begin{minipage}{0.45\hsize}
     1196    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt.png}
     1197  \end{minipage}
     1198  \caption{Example of OTA11 cell xy50 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.}
     1199  \label{fig:burntool images}
     1200\end{figure}
     1201
     1202
     1203\begin{figure}
     1204  \centering
     1205  \begin{minipage}{0.45\hsize}
     1206    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0123o_XY11_bt_trail.png}
     1207  \end{minipage}%
     1208  \begin{minipage}{0.45\hsize}
     1209    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5677g0124o_XY11_bt_trail.png}
     1210  \end{minipage}
     1211
     1212  \caption{Example of a profile cut along the y-axis through a bright star on exposure o5677g0123o OTA11 in cell xy50 (left panel) and on the subsequent exposure o5677g0124o (right panel).  In both figures, the green points show the image corrected with all appropriate detrending steps, but without burntool applied, illustrating the amplitude of the persistence trails.  The red points show the same data after the burntool correction, which reduces the impact of these features.  Both exposures are in the \gps{} filter with exposure times of 43s}
     1213  \label{fig:burntool plot}
     1214\end{figure}
     1215
     1216\subsection{Non-linearity Correction}
     1217\label{sec:nonlinearity}
     1218
     1219The pixels of GPC1 are not uniformly linear at all flux levels.  In
     1220particular, at low flux levels, some pixels have a tendency to sag
     1221relative to the expected linear value.  This effect is most pronounced
     1222along the edges of the detector cells, although some entire cells show
     1223evidence of this effect.
     1224
     1225To correct this sag, we studied the behavior of a series of flat
     1226frames for a ramp of exposure times with approximate logarithmically
     1227equal spacing between 0.01s and 57.04s.  As the exposure time
     1228increases, the signal on each pixel also increases in what is expected
     1229to be a linear manner.  Each of the flat exposures in this ramp is
     1230overscan corrected, and then the median is calculated for each cell,
     1231as well as for the rows and columns within ten pixels of the edge of
     1232the science region.  From these median values at each exposure time
     1233value, we can construct the expected trend by fitting a linear model
     1234for the region considered.  This fitting was limited to only the range
     1235of fluxes between 12000 and 38000 counts, as these ranges were found
     1236to match the linear model well.  This range avoids the non-linearity
     1237at low fluxes, as well as the possibility of high-flux non-linearity
     1238effects.
     1239
     1240We store the average flux measurement and deviation from the linear
     1241fit for each exposure time for each region on all detector cells in
     1242the linearity detrend look up tables.  An example of this data is
     1243shown in figure \ref{fig: nonlinearity}.  When this correction is
     1244applied to science data, these lookup tables are loaded, and a linear
     1245interpolation is performed to determine the correction needed for the
     1246flux in that pixel.  This look up is performed for both the row and
     1247column of each pixel, to allow the edge correction to be applied where
     1248applicable, and the full cell correction elsewhere.  The average of
     1249these two values is then applied to the pixel value, reducing the
     1250effects of pixel nonlinearity.
     1251
     1252This non-linearity effect appears to be stable in time for the
     1253majority of the detector pixels, with little evident change over the
     1254survey duration.  However, as the non-linearity is most pronounced at
     1255the edges of the detector cells, those are the regions where the
     1256correction is most likely to be incomplete.  Because of this fact,
     1257most pixels in the static mask with either the DARKMASK or FLATMASK
     1258bit set are found along these edges.  As the non-linearity correction
     1259is unable to reliably restore these pixels, they produce inconsistent
     1260values after the dark and flat have been applied, and are therefore
     1261rejected.
     1262
     1263\begin{figure}
     1264  \centering
     1265  \includegraphics[width=0.9\hsize,angle=0,clip]{images/linearity_XY27_xy16.png}
     1266  \caption{Example plot of the linearity correction as a fraction of observed flux for OTA27, cell xy16.}
     1267  \label{fig: nonlinearity}
     1268\end{figure}
     1269
     1270\subsection{Pattern correction}
     1271\label{sec:pattern}
     1272
     1273\subsubsection{Pattern Row}
     1274%% Statistics so I have them written down somewhere
     1275%% chipProcessedImfile.bg/bg_stdev by filter for XY33 (a good chip)
     1276%% filter  bg_mean stdev median Qsig                              bg_stdev_mean stdev median Qsig
     1277%% g        36.37422026669   64.64175104057  32.693   6.10284     14.696938349131  78.80460307171  8.8401  0.5417843
     1278%% r       200.96143304525  471.87743546238 117.105  94.55608     33.854672792146  79.01642728089 13.4564  5.3771355
     1279%% i       447.00504994458  938.38517801037 286.810 154.71397     57.298335510188  99.38392923935 20.0217 24.2254723
     1280%% z       317.54933679054  390.38930252748 241.014 114.13316     48.359069000176  94.44452756094 17.9404  9.1535209
     1281%% y       371.09019536218  293.57439970375 288.481 133.38769     43.724342221691 135.04286534327 19.9029  7.5396461
     1282
     1283As discussed above in the dark and noisemap sections, certain
     1284detectors have significant bias offsets between adjacent rows, caused
     1285by drifts in the bias level due to cross talk.  The magnitude of these
     1286offsets increases as the distance from the readout amplifier and
     1287overscan region increases, resulting in horizontal streaks that are
     1288more pronounced along the large x pixel edge of the cell.  As the
     1289level of the offset is apparently random between exposures, the dark
     1290correction cannot fully remove this structure from the images, and the
     1291noisemap value only indicates the level of the average variance added
     1292by these bias offsets.  Therefore, we apply the PATTERN.ROW correction
     1293in an attempt to mitigate the offsets and correct the image values.
     1294To force the rows to agree, a second order clipped polynomial is fit
     1295to each row in the cell.  Four fit iterations are run, and pixels
     1296$2.5\sigma$ deviant are excluded from subsequent fits, to minimize the
     1297effect stars and other astronomical signals have.  This final trend is
     1298then subtracted from that row.  Simply doing this subtraction will
     1299also have the effect of removing the background sky level.  To prevent
     1300this, the constant and linear terms for each row are stored, and
     1301linear fits are made to these parameters as a function of row,
     1302perpendicular to the initial fits.  This produces a plane that is
     1303added back to the image to restore the background offset and any
     1304linear ramp that exists in the sky.
     1305
     1306These row-by-row variations have the largest impact on data taken in
     1307the \gps{} filter, as the read noise is the dominant noise source in
     1308that filter.  At longer wavelengths, the noise from the Poissonian
     1309variation in the sky level increases.  The PATTERN.ROW correction is
     1310still applied to data taken in the other filters, as the increase in
     1311sky noise does not fully obscure the row-by-row noise.
     1312
     1313This correction was required on all cells on all OTAs prior to
     13142009-12-01, at which point a modification of the camera electronics
     1315reduced the scale of the row-by-row offsets for the majority of the
     1316OTAs.  \czw{describe modification} As a result, we only apply this
     1317correction to the cells where it is still necessary, as shown in
     1318Figure \ref{fig: pattern row cells}.  A list of these cells is in
     1319Table \ref{tab:pattern_row_cells}.
     1320
     1321Although this correction largely resolves the row-by-row offset issue
     1322in a satisfactory way, large and bright astronomical objects can bias
     1323the fit significantly.  This results in an oversubtraction of the
     1324offset near these objects.  As the offsets are calculated on the pixel
     1325rows, this oversubtraction is not uniform around the object, but is
     1326preferentially along the horizontal x axis of the object.  Most
     1327astronomical objects are not significantly distorted by this, with
     1328this only becoming on issue for only bright objects comparable to the
     1329size of the cell (598 pixels = 150").  Figure \ref{fig: pattern row example}
     1330shows an example of a cell pre- and post-correction.
     1331
     1332\begin{deluxetable}{lcccc}
     1333  \tablecolumns{3}
     1334  \tablewidth{0pc}
     1335  \tablecaption{Cells which have PATTERN.ROW correction applied}
     1336  \tablehead{\colhead{OTA} & \colhead{Cell columns} & \colhead{Additional cells}}
     1337  \startdata
     1338  OTA11 &  & xy02, xy03, xy04, xy07 \\
     1339  OTA14 &  & xy23 \\
     1340  OTA15 & 0 & \\
     1341  OTA27 & 0, 1, 2, 3, 7 & \\
     1342  OTA31 & 7 & \\
     1343  OTA32 & 3, 7 & \\
     1344  OTA45 & 3, 7 & \\
     1345  OTA47 & 0, 3, 5, 7 & \\
     1346  OTA57 & 0, 1, 2, 6, 7 & \\
     1347  OTA60 &  & xy55 \\
     1348  OTA74 & 2, 7 & \\
     1349  \enddata
     1350  \label{tab:pattern_row_cells}
     1351\end{deluxetable}
     1352
     1353\begin{figure}
     1354  \centering
     1355  \includegraphics[width=0.9\hsize,angle=0,clip]{images/pattern_row_edit.png}
     1356  \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.}
     1357  \label{fig: pattern row cells}
     1358\end{figure}
     1359
     1360\begin{figure}
     1361  \centering
     1362  \begin{minipage}{0.45\hsize}
     1363    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_nopat.png}
     1364  \end{minipage}%
     1365  \begin{minipage}{0.45\hsize}
     1366    \includegraphics[width=0.9\hsize,angle=0,clip]{images/o5379g0103o_XY57_pat.png}
     1367  \end{minipage}
     1368  \caption{Example of the PATTERN.ROW correction on exposure o5379g0103o OTA57 cell xy01 (\ips{} filter 45s).  The left panel shows the cell with all appropriate detrending except the PATTERN.ROW, and the right shows the same cell with PATTERN.ROW applied.  The correction reduces the correlated noise on the right side, which is most distant from the read out amplifier.  There is a slight over subtraction along the rows near the bright star.}
     1369  \label{fig: pattern row example}
     1370\end{figure}
     1371
     1372\subsubsection{Pattern Continuity}
     1373
     1374The background levels of cells on a single OTA do not always have the
     1375same value.  Even with dark and flat corrections applied, adjacent
     1376cells may not match.  In addition, studies of the background level
     1377indicate that the row-by-row bias can introduce small background
     1378gradient variations along the rows of the cells that are not stable.
     1379This common feature across the columns of cells results in a ``saw
     1380tooth'' pattern horizontally across an the mosaicked OTA, and as the
     1381background model fits a smooth sky level, this induces over and under
     1382subtraction at the cell boundaries.
     1383
     1384The PATTERN.CONTINUITY correction, attempts to match the edges of a
     1385cell to those of its neighbors.  For each cell, a thin box 10 pixels
     1386wide running the full length of each edge is extracted and the median
     1387value of unmasked values calculated for that box.  These median values
     1388are then used to construct a vector of the sum of the differences
     1389between that cell's edges and the corresponding edge on any adjacent
     1390cell $\Delta$.  A matrix $A$ of these associations is also
     1391constructed, with the diagonal containing the number of cells adjacent
     1392to that cell, and the off-diagonal values being set to -1 for each
     1393pair of adjacent cells.  The offsets needed for each chip, $x$ can
     1394then be found by solving the system $A x = \Delta$. A cell with the
     1395maximum number of neighbors, usually cell xy11, the first cell not on
     1396the edge of the OTA, is used to constrain the system, ensuring that
     1397that cell has zero correction and that there is a single solution.
     1398
     1399For OTAs that initially show the saw tooth pattern, the effect of this
     1400correction is to align the cells into a single ramp, at the expense of
     1401the absolute background level.  However, as we subtract off a smooth
     1402background model prior to doing photometry, these deviations from an
     1403absolute sky level do not affect photometry for point sources and
     1404extended sources smaller than a single cell.  The fact that the
     1405final ramp is smoother than it would be otherwise also allows for the
     1406background subtracted image to more closely match the astronomical
     1407sky, without significant errors at cell boundaries.  An example of the
     1408effect of this correction on an image profile is shown in Figure
     1409\ref{fig:dark switching}.
     1410
    15061411\section{GPC1 Detrend Construction}
    15071412\label{sec:detrend construction}
     
    15091414The various master detrend images for GPC1 are constructed using a
    15101415common approach.  A series of appropriate exposures is selected from
    1511 the database, and processed with the \IPPprog{ppImage} program.  This
    1512 program is used for the \IPPstage{chip} stage processing as well, and
     1416the database, and processed with the \IPPprog{ppImage} program, which
    15131417is designed to do multiple image processing operations.  The
    15141418processing steps applied to the images depend on the type of master
     
    16281532\section{Warping}
    16291533\label{sec:warping}
    1630 To  provide a  consistent and  uniform  set of  coordinates for image
    1631 combination  (including  stacking  and  differences),  the individual
    1632 mosaicked OTA images  are projected onto a common pixel grids, called
    1633 tessellations.  A tessellation can contain  any number of tangent plane
    1634 projections,  with those  designed for  single pointing surveys using
    1635 only one, while the tessellation used for the $3\pi$ survey containing
    1636 2643  tangent  plane  projections.   These  ``projection  cells'' are
    1637 $4\times{}4$ degree  fields spaced  onto a set  of centers that fully
    1638 cover the sky.  They are  arranged into rings of constant declination,
    1639 and allowed to overlap as  $|\delta|$ increases.  Each projection cell
    1640 is  further subdivided  into  $10\times{}10$  ``skycells'' with fixed
    1641 $0.25"$  resolution  pixels,  and  constant  overlap  regions between
    1642 adjacent skycells  of $60"$.  These  skycells are the main image unit
    1643 used for  processing image  data beyond the  initial chip stage.  The
     1534To provide a consistent and uniform set of coordinates for image
     1535combination (including stacking and differences), the individual
     1536mosaicked OTA images are projected onto a common pixel grids, called
     1537tessellations.  A tessellation can contain any number of tangent plane
     1538projections, with those designed for single pointing surveys using
     1539only one, while the tessellation used for the $3\pi$ survey contains
     15402643 tangent plane projection centers.  These ``projection cells'' are
     1541$4\times{}4$ degree fields spaced onto a set of centers that fully
     1542cover the sky.  They are arranged into rings of constant declination,
     1543and allowed to overlap as $|\delta|$ increases.  Each projection cell
     1544is further subdivided into $10\times{}10$ ``skycells'' with fixed
     1545$0.25"$ resolution pixels, and constant overlap regions between
     1546adjacent skycells of $60"$.  These skycells are the main image unit
     1547used for processing image data beyond the initial chip stage.  The
    16441548coordinate system used for these images matches the parity of the sky,
    1645 with north  in the  positive y  direction and east  to the negative x
     1549with north in the positive y direction and east to the negative x
    16461550direction.
    16471551
     
    16501554solutions that map the detector focal plane to the sky, and map the
    16511555individual OTA pixels to the detector focal plane
    1652 \citep[][see]{magnier2017.calibration}.  This solution is then used to
     1556\citep[see][]{magnier2017.calibration}.  This solution is then used to
    16531557determine which skycells the exposure OTAs overlap.
    16541558
     
    16651569
    16661570With the locally linear grid defined, Lanczos interpolation
    1667 \citep{Lanczos:1950zz} with filter size parameter $a = 3$ on the input
     1571\citep{lanczos1956applied} with filter size parameter $a = 3$ on the input
    16681572image is used to determine the values to assign to the output pixel
    16691573location.  This process is repeated for all grid boxes, for all input
     
    17591663sources.
    17601664
    1761 The stacked image is comprised of all warp frames for a given skycell
    1762 in a single filter.  The source catalogs and image components are
    1763 loaded into the \IPPprog{ppStack} program to prepare the inputs and
    1764 stack the frames.
     1665For the $3\pi$ survey, the stacked image is comprised of all warp
     1666frames for a given skycell in a single filter.  The source catalogs
     1667and image components are loaded into the \IPPprog{ppStack} program to
     1668prepare the inputs and stack the frames.
    17651669
    17661670Once all files are ingested, the first step is to measure the size and
     
    18291733Once the convolution kernels are defined for each image, they are used
    18301734to convolve the image to match the target PSF.  Any input image that
    1831 has a kernel match $chi^2$ value (defined as the sum of the RMS error
    1832 across the kernel) greater than 4.0$\sigma$ larger than the median
     1735has a kernel match $\chi^2$ value (defined as the sum of the RMS error
     1736across the kernel) 4.0$\sigma$ or larger than the median
    18331737value is rejected from the stack.  Each image also has a weight
    18341738assigned, based on the image variance after convolution.  A full image
     
    19681872
    19691873These convolved stack products are not retained, as the convolution is
    1970 only used to ensure the pixel rejection uses seeing-matched images.
    1971 Instead, we apply the normalizations and rejected pixel maps generated
    1972 from the convolved stack process to the original unconvolved input
    1973 images.  This produces an unconvolved stack that has the optimum image
    1974 quality possible from the input images.  Not convolving does mean that
    1975 the PSF shape changes across the image, as the different PSF widths of
    1976 the input images print through in the different regions to which they
    1977 have contributed.
     1874used to ensure that the pixel rejection uses seeing-matched images.
     1875This prevents any differences in the input PSF shape from skewing the
     1876input pixel rejection.  We apply the normalizations and rejected pixel
     1877maps generated from the convolved stack process to the original
     1878unconvolved input images.  This produces an unconvolved stack that has
     1879the optimum image quality possible from the input images.  Not
     1880convolving does mean that the PSF shape changes across the image, as
     1881the different PSF widths of the input images print through in the
     1882different regions to which they have contributed.
    19781883
    19791884%% Asinh compression
     
    19871892increase in the disk space required for the stacked images.
    19881893
    1989 Inspired by techniques used by SDSS \citep{2000AJ....120.1579Y}
    1990 \czw{better citation?}, we use the inverse hyperbolic sine function to
    1991 transform the data.  The domain of this function allows any input
    1992 value to be converted.  In addition, the quantization sampling can be
    1993 tuned by placing the zero of the inverse hyperbolic sine function at a
    1994 value where the highest sampling is desired.
     1894Inspired by techniques used by SDSS \citep{1999AJ....118.1406L}, we
     1895use the inverse hyperbolic sine function to transform the data.  The
     1896domain of this function allows any input value to be converted.  In
     1897addition, the quantization sampling can be tuned by placing the zero
     1898of the inverse hyperbolic sine function at a value where the highest
     1899sampling is desired.
    19951900
    19961901Formally, prior to being written to disk, the pixel values are
    19971902transformed by $C = \alpha \asinh\left(\frac{L - \mathrm{BOFFSET}}{2.0
    19981903  \cdot \mathrm{BSOFTEN}}\right)$, where $L$ are the linear input
    1999 pixel values, $C$ the transformed values, $\alpha = 2.5 \log_{10}(e)$.
     1904pixel values, $C$ the transformed values, and $\alpha = 2.5 \log_{10}(e)$.
    20001905BOFFSET centers the transformed values, and the mean of the linear
    20011906input pixel values is used.  BSOFTEN controls the stretch of the
     
    21002005
    21012006The image matching process used in constructing difference images is
    2102 essentially the same the stacking process.  An image is chosen as a
    2103 template, another image as the input, and after matching sources to
    2104 determine the scaling and transparency, convolution kernels are
     2007essentially the same as for the stacking process.  An image is chosen
     2008as a template, another image as the input, and after matching sources
     2009to determine the scaling and transparency, convolution kernels are
    21052010defined that are used to convolve one or both of the images to a
    21062011target PSF.  The images are then subtracted, and as they should now
     
    21242029minus stack) and inverse (stack minus warp) to allow for the
    21252030photometry of the difference image to detect sources that both rise
    2126 and fall relative to the stack.  Note that the convolution process
    2127 grows the mask fraction of pixels relative to the warp (the largest
    2128 source of masked pixels in these warp stack differences).  Any pixel
    2129 that after convolution has any contribution from a masked pixel is
    2130 masked as well, ensuring only fully unmasked pixels are used.
     2031and fall relative to the stack.  The convolution process grows the
     2032mask fraction of pixels relative to the warp (the largest source of
     2033masked pixels in these warp stack differences).  Any pixel that after
     2034convolution has any contribution from a masked pixel is masked as
     2035well, ensuring only fully unmasked pixels are used.
    21312036
    21322037For warp-warp differences, such as those used for the ongoing Solar
     
    21652070dependent on focal plane position.
    21662071
    2167 An obvious way to make use of the PV3 catalog is to do a statistical
     2072One obvious way to make use of the PV3 catalog is to do a statistical
    21682073search for electronic crosstalk ghosts that do not match a known rule.
    21692074Given that bright stars do not equally populate all fields, choosing
     
    21772082There is some evidence that we have not fully identified all of these
    21782083crosstalk rules, based on a study of PV3 images.  For example,
    2179 extremely bright stars may be able to create crosstalk ghosts between the second
    2180 cell column of OTA01 and OTA21, with possibly fainter ghosts appearing
    2181 on OTA11.  Despite the symmetry observed in the main ghost rules,
    2182 there do not appear to be clear examples of a similar ghost between
    2183 OTA47 and OTA66.  Examining this further based on the PV3 catalog
    2184 should provide a clear answer to this, as well as clarify brightness
    2185 limits below which the ghost does not appear.
     2084extremely bright stars may be able to create crosstalk ghosts between
     2085the second cell column of OTA01 and OTA21, with possibly fainter
     2086ghosts appearing on OTA11.  Despite the symmetry observed in the main
     2087ghost rules, there do not appear to be clear examples of a similar
     2088ghost between OTA47 and OTA66.  Examining this further based on the
     2089PV3 catalog should provide a clear answer to this, as well as clarify
     2090brightness limits below which the ghost does not appear.
    21862091
    21872092The PV3 catalog may also allow better determination of which date
    21882093ranges we should use to build the dark model.  The date ranges
    21892094currently in use are based on limited sampling of exposures, and do
    2190 not have strong tests indicating that they are the best.  By examining
     2095not have strong tests indicating that they are optimal.  By examining
    21912096the scatter between the detections on a given exposure and the catalog
    21922097average, we can attempt to look for increases in scatter that might
     
    22232128to isolate and remove this signal in the Fourier domain.  Preliminary
    22242129investigations have shown that there is a small peak visible in the
    2225 power spectrum of a single cell, but determining the optimal way to
     2130power spectrum of a single cell, but determining the best way to
    22262131clip this peak to reduce the noise in the image space is not clear.
    22272132
Note: See TracChangeset for help on using the changeset viewer.