IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41223 for trunk


Ignore:
Timestamp:
Jan 13, 2020, 1:47:54 PM (7 years ago)
Author:
eugene
Message:

adding empty image versions for faster processing; updates to text

Location:
trunk/doc/release.2015/ps1.detrend
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/release.2015/ps1.detrend/detrend.tex

    r41220 r41223  
    2121%\def\plotmode{bw}
    2222
     23% journal images:
     24\def\plotopt{}
     25
    2326% arxiv needs small graphics, but publishers want full-scale
    2427%\def\plotopt{_sm}
    25 \def\plotopt{}
     28
     29% empty images for quick processing
     30% \def\plotopt{_mt}
    2631
    2732% use this to make the figure picture path flexible:
     
    4146%\newcommand{\ippstage}[1]{\textsc{#1}}
    4247\newcommand{\asinh}{\mathop{\rm asinh}\nolimits}
     48
     49\newcommand{\SKIP}{}
    4350
    4451% Pick a terse version of the title here;
     
    179186improved calibration of the PV3 processing of that dataset.
    180187
     188\begin{figure}[htpb]
     189  \centering
     190\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{{\picdir/gpc1.layout}.pdf}
     191  \caption{Diagram illustrating layout of OTA devices in GPC1.  The
     192    blue dots mark the locations of the amplifiers for xy00 cells in
     193    each chip.  When cells are mosaicked to a single pixel grid, the
     194    pixel in this corner is at chip coordinate (1,1).  The figure
     195    illustrates the orientation of the OTA devices relative to the
     196    parity of the sky.  An exposure taken with North at the top of the
     197    field-of-view will have East to the left when the OTA devices are
     198    mosaicked as shown.  Note that the devices OTA0Y - OTA3Y are
     199    rotated by 180\degrees\ relative to the other half of the camera.
     200    The labeling of the non-existent corner OTAs is provided to orient
     201    the focal plane.}
     202  \label{fig:gpc1.layout}
     203\end{figure}
     204
    181205This is the third in a series of seven papers describing the
    182206Pan-STARRS1 Surveys, the data reduction techniques and the resulting
     
    229253survey. The Medium Deep Survey is not part of Data Releases 1 or 2 and
    230254will be made available in a future data release.
     255
     256In this article, we use the following type-faces to distinguish
     257different concepts:
     258\begin{itemize}
     259\item \ippstage{Small caps} for the analysis stages.
     260\item \ippprog{Fixed-width} font for program names, variables, and
     261  miscellaneous constants.
     262\end{itemize}
    231263
    232264\section{Background}
     
    276308are provided in Paper IV.
    277309
    278 \begin{figure}[htpb]
    279   \centering
    280   \includegraphics[width=0.9\hsize,angle=0,clip]{{\picdir/gpc1.layout}.pdf}
    281   \caption{Diagram illustrating layout of OTA devices in GPC1.  The
    282     blue dots mark the locations of the amplifiers for xy00 cells in
    283     each chip.  When cells are mosaicked to a single pixel grid, the
    284     pixel in this corner is at chip coordinate (1,1).  The figure
    285     illustrates the orientation of the OTA devices relative to the
    286     parity of the sky.  An exposure taken with North at the top of the
    287     field-of-view will have East to the left when the OTA devices are
    288     mosaicked as shown.  Note that the devices OTA0Y - OTA3Y are
    289     rotated by 180\degrees\ relative to the other half of the camera.
    290     The labeling of the non-existent corner OTAs is provided to orient
    291     the focal plane.}
    292   \label{fig:gpc1.layout}
    293 \end{figure}
    294 
    295310A limited version of the same reduction procedure described above is also
    296311performed in real time on new exposures as they are observed by the
     
    306321observations \citep{2015IAUGA..2251124W}.
    307322
    308 \begin{table*}
    309 \caption{\label{tab:detrend.steps} Detrend steps in order of application} % \vspace{-0.5cm}
    310 \begin{center}
    311 \footnotesize
    312 \begin{tabular}{lll}
    313 \hline
    314 \hline
    315 {\bf Detrend} & {\bf Stage} & {\bf Section} \\
    316 \hline
    317   Burntool repair          & registration & \ref{sec:burntool} \\
    318   Non-linearity correction & cell         & \ref{sec:nonlinearity} \\
    319   Overscan Subtraction     & cell         & \ref{sec:overscan} \\
    320   Dark \& Bias Subtraction & cell         & \ref{sec:dark} \\
    321   Pattern Row correction   & cell         & \ref{sec:pattern.row} \\
    322   Noisemap                 & cell         & \ref{sec:noisemap} \\
    323   Flat-field Correction    & chip         & \ref{sec:flat} \\
    324   Fringe Correction$^1$    & chip         & \ref{sec:fringe} \\
    325   Pattern Continuity       & chip         & \ref{sec:pattern_continuity} \\
    326   Static Masks             & chip         & \ref{sec:static_masks} \\
    327   Crosstalk masks          & camera       & \ref{sec:crosstalk} \\
    328   Optical ghost masks      & camera       & \ref{sec:optical_ghosts} \\
    329   Optical glint masks      & camera       & \ref{sec:glints} \\
    330   Diffraction spike masks  & camera       & \ref{sec:diffraction_spikes} \\
    331   Saturated star masks     & camera       & \ref{sec:diffraction_spikes} \\
    332 \hline
    333 \multicolumn{3}{l}{$^1$ only \yps} \\
    334 \end{tabular}
    335 \end{center}
    336 \end{table*}
    337 
    338323Section \ref{sec:detrending} provides an overview of the detrending
    339324process that corrects the instrumental signatures of GPC1, with
     
    346331remaining issues and possible future improvements is presented in
    347332section \ref{sec:discussion}.
    348 
    349 \begin{figure*}[htpb]
    350   \centering
    351   \begin{minipage}{0.45\hsize}
    352     \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123o_M_OS_NL_XY23\plotopt.png}
    353   \end{minipage}%
    354   \begin{minipage}{0.45\hsize}
    355     \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123o_to_DARK_XY23\plotopt.png}
    356   \end{minipage}
    357   \caption{{\bf Dark Correction:} 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.}
    358   \label{fig:dark image}
    359 \end{figure*}
    360333
    361334As mentioned above, the GPC1 camera is composed of 60 orthogonal
     
    403376the detector surface.
    404377
     378\begin{table}
     379\caption{\label{tab:detrend.steps} Detrend steps in order of application} \vspace{-0.5cm}
     380\begin{center}
     381\begin{tabular}{lll}
     382\hline
     383\hline
     384{\bf Detrend} & {\bf Stage} & {\bf Section} \\
     385\hline
     386  Burntool repair          & registration & \ref{sec:burntool} \\
     387  Non-linearity correction & cell         & \ref{sec:nonlinearity} \\
     388  Overscan Subtraction     & cell         & \ref{sec:overscan} \\
     389  Dark \& Bias Subtraction & cell         & \ref{sec:dark} \\
     390  Pattern Row correction   & cell         & \ref{sec:pattern.row} \\
     391  Noisemap                 & cell         & \ref{sec:noisemap} \\
     392  Flat-field Correction    & chip         & \ref{sec:flat} \\
     393  Fringe Correction$^1$    & chip         & \ref{sec:fringe} \\
     394  Pattern Continuity       & chip         & \ref{sec:pattern_continuity} \\
     395  Static Masks             & chip         & \ref{sec:static_masks} \\
     396  Crosstalk masks          & camera       & \ref{sec:dynamic_masks} \\
     397  Optical ghost masks      & camera       & \ref{sec:dynamic_masks} \\
     398  Optical glint masks      & camera       & \ref{sec:dynamic_masks} \\
     399  Diffraction spike masks  & camera       & \ref{sec:dynamic_masks} \\
     400  Saturated star masks     & camera       & \ref{sec:dynamic_masks} \\
     401\hline
     402\multicolumn{3}{l}{$^1$ Only \yps\ for GPC1} \\
     403\end{tabular}
     404\end{center} \vspace{-0.25cm}
     405\end{table}
     406
    405407These corrections assume that the detector response is linear across
    406408the full dynamic range and that the pixels contain only signals coming
     
    455457\label{sec:dark}
    456458
     459\begin{figure*}[htpb]
     460  \centering
     461  \begin{minipage}{0.45\hsize}
     462\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123o_M_OS_NL_XY23\plotopt.png}
     463  \end{minipage}%
     464  \begin{minipage}{0.45\hsize}
     465\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123o_to_DARK_XY23\plotopt.png}
     466  \end{minipage}
     467  \caption{{\bf Dark Correction:} 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.}
     468  \label{fig:dark image}
     469\end{figure*}
     470
    457471The dark current in the GPC1 detectors has significant variations
    458472across each cell.  The model we make to remove this signal considers
     
    476490Figure \ref{fig:dark image} shows the results of the dark subtraction.
    477491
    478 \subsubsection{Time evolution}
    479 
    480492\begin{figure}[htpb]
    481493  \centering
    482   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/B_profile_v1.pdf}
     494\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/B_profile_v1\plotopt.pdf}
    483495  \caption{Example showing a profile cut across exposure o5676g0195,
    484496    OTA67 (2011-04-25, 43s \gps{} filter).  The entire first row of
     
    503515\end{figure}
    504516
     517\subsubsection{Time evolution}
     518
    505519The dark model is not consistently stable over the full survey, with
    506520significant drift over the course of multiple months.  Some of the
     
    536550gradient in the dark corrected data. 
    537551
     552\begin{figure*}[htpb]
     553  \centering
     554  \begin{minipage}{0.45\hsize}
     555\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123o_VIDEODARK_VDim_Rdark_XY22\plotopt.png}
     556  \end{minipage}%
     557  \begin{minipage}{0.45\hsize}
     558\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123o_VIDEODARK_VDim_VDdark_XY22\plotopt.png}
     559  \end{minipage}
     560  \caption{{\bf Video Dark:} 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.}
     561  \label{fig:video_darks}
     562\end{figure*}
     563
    538564The bias drift gradients of the mode switching can be visualized in
    539565Figure \ref{fig:dark switching}.  This figure shows the image profile
     
    558584  \centering
    559585  \begin{minipage}{0.45\hsize}
    560     \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123o_VIDEODARK_VDim_Rdark_XY22\plotopt.png}
     586\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5220g0025o_nofringe_XY53\plotopt.png}
    561587  \end{minipage}%
    562588  \begin{minipage}{0.45\hsize}
    563     \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123o_VIDEODARK_VDim_VDdark_XY22\plotopt.png}
     589\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5220g0025o_fringe_XY53\plotopt.png}
    564590  \end{minipage}
    565   \caption{{\bf Video Dark:} 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.}
    566   \label{fig:video_darks}
     591  \caption{{\bf Fringing:} Example of the \yps{} filter fringe pattern
     592    on exposure o5220g0025o OTA53 (\yps{} filter 30s).  The left panel
     593    shows the OTA mosaic with all detrending except the fringe
     594    correction, while the right shows the same including the fringe
     595    correction.  Both images have been smoothed with a Gaussian with
     596    $\sigma = 3$ pixels to highlight the faint and large scale fringe
     597    patterns.  }
     598  \label{fig: fringe example}
    567599\end{figure*}
    568600
     
    641673from random Gaussian noise, we estimated the true read noise level.
    642674
    643 \begin{figure*}[htpb]
    644   \centering
    645   \begin{minipage}{0.45\hsize}
    646     \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5220g0025o_nofringe_XY53\plotopt.png}
    647   \end{minipage}%
    648   \begin{minipage}{0.45\hsize}
    649     \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5220g0025o_fringe_XY53\plotopt.png}
    650   \end{minipage}
    651   \caption{{\bf Fringing:} Example of the \yps{} filter fringe pattern
    652     on exposure o5220g0025o OTA53 (\yps{} filter 30s).  The left panel
    653     shows the OTA mosaic with all detrending except the fringe
    654     correction, while the right shows the same including the fringe
    655     correction.  Both images have been smoothed with a Gaussian with
    656     $\sigma = 3$ pixels to highlight the faint and large scale fringe
    657     patterns.  }
    658   \label{fig: fringe example}
    659 \end{figure*}
    660 
    661675As the noisemap uses bias frames that have had a dark model
    662676subtracted, we constructed noisemaps for each dark model used for
     
    677691value.
    678692
    679 \subsection{Flat}
    680 \label{sec:flat}
    681 
    682 Determining a flat field correction for GPC1 is a challenging
    683 endeavor, as the wide field of view makes it difficult to construct a
    684 uniformly illuminated image.  Using a dome screen is not possible, as
    685 the variations in illumination and screen rigidity create large
    686 scatter between different images that are not caused by the detector
    687 response function.  Because of this, we use sky flat images taken at
    688 twilight, which are more consistently illuminated than screen flats.
    689 We calculate the mean of these images to determine the initial flat
    690 model.
    691 
    692 From this starting skyflat model, we construct a photometric
    693 correction to remove the effect of the illumination differences over
    694 the detector surface.  This is done by dithering a series of science
    695 exposures with a given pointing, as described in
    696 \citet{2004PASP..116..449M}.  By fully calibrating these exposures
    697 with the initial flat model, and then comparing the measured fluxes
    698 for the same star as a function of position on the detector, we can
    699 determine position dependent scaling factors.  From the set of scaling
    700 factors for the full catalog of stars observed in the dithered
    701 sequence, we can construct a model of the error in the initial flat
    702 model as a function of detector position.  Applying a correction that
    703 reduces the amplitude of these errors produces a flat field model that
    704 better represents the true detector response.
    705 
    706 In addition to this flat field applied to the individual images, the
    707 ``ubercal'' analysis -- in which photometric data are used define
    708 image zero points
    709 \citep[][]{2012ApJ...756..158S,magnier2017.calibration} and in turn
    710 used used to calibrate the database of all detections -- constructs
    711 ``in catalog'' flat field corrections.  Although a single set of image
    712 flat fields was used for the PV3 processing of the entire $3\pi$
    713 survey, five separate ``seasons'' of database flat fields were needed
    714 to ensure proper calibration.  This indicates that the flat field
    715 response is not completely fixed in time.  More details on this
    716 process are contained in Paper V.
    717 
    718 \subsection{Fringe correction}
    719 \label{sec:fringe}
    720 % det_id 296 is the fringe we use.
    721 
    722 Due to variations in the thickness of the detectors, we observe
    723 interference patterns at the infrared end of the filter set, as the
    724 wavelength of the light becomes comparable to the thickness of the
    725 detectors.  Visually inspecting the images shows that the fringing is
    726 most prevalent in the \yps{} filter images, with negligible fringing in the
    727 other bands.  As a result of this, we only apply a fringe correction
    728 to the \yps{} filter data.
    729 
    730 The fringe used for PV3 processing was constructed from a set of 20
    731 120s science exposures.  These exposures are overscan subtracted, and
    732 corrected for non-linearity, and have the dark and flat models
    733 applied.  These images are smoothed with a Gaussian kernel with
    734 $\sigma = 2$ pixels to minimize pixel to pixel noise.  The fringe
    735 image data is then constructed by calculating the clipped mean of the
    736 input images with two iteration of clipping at the $3\sigma$ level.
    737 
    738 \begin{deluxetable*}{ccl}[htp]
    739   \tablecolumns{3}
    740   \tablewidth{0pc}
    741   \tablecaption{GPC1 Mask Values}
    742   \tablehead{\colhead{Mask Name} & \colhead{Mask Value} &
    743     \colhead{Description (static values listed in bold)}}
    744   \startdata
     693\begin{table*}
     694\caption{\label{tab:mask_values} GPC1 Mask Values} \vspace{-0.5cm}
     695\begin{center}
     696\begin{tabular}{lll}
     697\hline
     698\hline
     699{\bf Mask Name} & {\bf Mask Value} & {\bf Description (static values listed in bold)} \\
     700\hline
    745701  {\bf DETECTOR } & {\bf 0x0001}  & {\bf A detector defect is present.} \\
    746702  {\bf FLAT     } & {\bf 0x0002}  & {\bf The flat field model does not calibrate the pixel reliably.} \\
     
    760716  CONV.POOR& 0x4000 & The pixel is poor after convolution with a bad pixel. \\
    761717  MARK     & 0x8000 & An internal flag for temporarily marking a pixel. \\
    762   \enddata
    763   \label{tab:mask_values}
    764 \end{deluxetable*}
     718\hline
     719\end{tabular}
     720\end{center} \vspace{-0.25cm}
     721\end{table*}
     722
     723%% \begin{deluxetable*}{ccl}[htp]
     724%%   \tablecolumns{3}
     725%%   \tablewidth{0pc}
     726%%   \tablecaption{GPC1 Mask Values}
     727%%   \tablehead{\colhead{Mask Name} & \colhead{Mask Value} &
     728%%     \colhead{Description (static values listed in bold)}}
     729%%   \startdata
     730%%   {\bf DETECTOR } & {\bf 0x0001}  & {\bf A detector defect is present.} \\
     731%%   {\bf FLAT     } & {\bf 0x0002}  & {\bf The flat field model does not calibrate the pixel reliably.} \\
     732%%   {\bf DARK     } & {\bf 0x0004}  & {\bf The dark model does not calibrate the pixel reliably.} \\
     733%%   {\bf BLANK    } & {\bf 0x0008}  & {\bf The pixel does not contain valid data.} \\
     734%%   {\bf CTE      } & {\bf 0x0010}  & {\bf The pixel has poor charge transfer efficiency.} \\
     735%%   SAT      & 0x0020 & The pixel is saturated. \\
     736%%   LOW      & 0x0040 & The pixel has a lower value than expected. \\
     737%%   SUSPECT  & 0x0080 & The pixel is suspected of being bad (overloaded with the BURNTOOL bit). \\
     738%%   BURNTOOL & 0x0080 & The pixel contain an burntool repaired streak. \\
     739%%   CR       & 0x0100 & A cosmic ray is present. \\
     740%%   SPIKE    & 0x0200 & A diffraction spike is present. \\
     741%%   GHOST    & 0x0400 & An optical ghost is present. \\
     742%%   STREAK   & 0x0800 & A streak is present. \\
     743%%   STARCORE & 0x1000 & A bright star core is present. \\
     744%%   CONV.BAD & 0x2000 & The pixel is bad after convolution with a bad pixel. \\
     745%%   CONV.POOR& 0x4000 & The pixel is poor after convolution with a bad pixel. \\
     746%%   MARK     & 0x8000 & An internal flag for temporarily marking a pixel. \\
     747%%   \enddata
     748%%   \label{tab:mask_values}
     749%% \end{deluxetable*}
     750
     751\subsection{Flat}
     752\label{sec:flat}
     753
     754Determining a flat field correction for GPC1 is a challenging
     755endeavor, as the wide field of view makes it difficult to construct a
     756uniformly illuminated image.  Using a dome screen is not possible, as
     757the variations in illumination and screen rigidity create large
     758scatter between different images that are not caused by the detector
     759response function.  Because of this, we use sky flat images taken at
     760twilight, which are more consistently illuminated than screen flats.
     761We calculate the mean of these images to determine the initial flat
     762model.
     763
     764From this starting skyflat model, we construct a photometric
     765correction to remove the effect of the illumination differences over
     766the detector surface.  This is done by dithering a series of science
     767exposures with a given pointing, as described in
     768\citet{2004PASP..116..449M}.  By fully calibrating these exposures
     769with the initial flat model, and then comparing the measured fluxes
     770for the same star as a function of position on the detector, we can
     771determine position dependent scaling factors.  From the set of scaling
     772factors for the full catalog of stars observed in the dithered
     773sequence, we can construct a model of the error in the initial flat
     774model as a function of detector position.  Applying a correction that
     775reduces the amplitude of these errors produces a flat field model that
     776better represents the true detector response.
     777
     778In addition to this flat field applied to the individual images, the
     779``ubercal'' analysis -- in which photometric data are used define
     780image zero points
     781\citep[][]{2012ApJ...756..158S,magnier2017.calibration} and in turn
     782used used to calibrate the database of all detections -- constructs
     783``in catalog'' flat field corrections.  Although a single set of image
     784flat fields was used for the PV3 processing of the entire $3\pi$
     785survey, five separate ``seasons'' of database flat fields were needed
     786to ensure proper calibration.  This indicates that the flat field
     787response is not completely fixed in time.  More details on this
     788process are contained in Paper V.
     789
     790\subsection{Fringe correction}
     791\label{sec:fringe}
     792% det_id 296 is the fringe we use.
     793
     794Due to variations in the thickness of the detectors, we observe
     795interference patterns at the infrared end of the filter set, as the
     796wavelength of the light becomes comparable to the thickness of the
     797detectors.  Visually inspecting the images shows that the fringing is
     798most prevalent in the \yps{} filter images, with negligible fringing in the
     799other bands.  As a result of this, we only apply a fringe correction
     800to the \yps{} filter data.
     801
     802The fringe used for PV3 processing was constructed from a set of 20
     803120s science exposures.  These exposures are overscan subtracted, and
     804corrected for non-linearity, and have the dark and flat models
     805applied.  These images are smoothed with a Gaussian kernel with
     806$\sigma = 2$ pixels to minimize pixel to pixel noise.  The fringe
     807image data is then constructed by calculating the clipped mean of the
     808input images with two iteration of clipping at the $3\sigma$ level.
    765809
    766810A coarse background model for each cell is constructed by calculating
     
    793837calculated based on objects in the field, and so changes between
    794838images.  Construction of the static mask consists of three phases.
     839
     840\begin{figure}[b]
     841  \centering
     842\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/gpc1_mask_indexed.png}
     843  \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.}
     844  \label{fig:static mask}
     845\end{figure}
    795846
    796847First, regions in which the charge transfer efficiency (CTE) is low
     
    813864level are added to the static mask.
    814865
     866\begin{table}[tpb]
     867\caption{\label{tab:crosstalk_rules} GPC1 Crosstalk Rules} \vspace{-0.5cm}
     868\begin{center}
     869\begin{tabular}{lllc}
     870\hline
     871\hline
     872{\bf Type} & {\bf Source OTA/Cell} & {\bf Ghost OTA/Cell} & {\bf $\Delta m$} \\
     873\hline
     874  Inter-OTA & OTA2Y XY3v & OTA3Y XY3v & 6.16 \\
     875            & OTA3Y XY3v & OTA2Y XY3v &      \\
     876            & OTA4Y XY3v & OTA5Y XY3v &      \\
     877            & OTA5Y XY3v & OTA4Y XY3v &      \\
     878  Intra-OTA & OTA2Y XY5v & OTA2Y XY6v & 7.07 \\
     879            & OTA2Y XY6v & OTA2Y XY5v &      \\
     880            & OTA5Y XY5v & OTA5Y XY6v &      \\
     881            & OTA5Y XY6v & OTA5Y XY5v &      \\
     882  One-way   & OTA2Y XY7v & OTA3Y XY2v & 7.34 \\
     883            & OTA5Y XY7v & OTA4Y XY2v &      \\
     884\hline
     885\end{tabular}
     886\end{center} \vspace{-0.25cm}
     887\end{table}
     888
     889%% \begin{deluxetable}{lllc}[htpb]
     890%%   \tablecolumns{4}
     891%%   \tablewidth{0pc}
     892%%   \tablecaption{GPC1 Crosstalk Rules}
     893%%   \tablehead{\colhead{Type}&\colhead{Source OTA/Cell}&\colhead{Ghost OTA/Cell}&\colhead{$\Delta m$}}
     894%%   \startdata
     895%%   Inter-OTA & OTA2Y XY3v & OTA3Y XY3v & 6.16 \\
     896%%             & OTA3Y XY3v & OTA2Y XY3v &      \\
     897%%             & OTA4Y XY3v & OTA5Y XY3v &      \\
     898%%             & OTA5Y XY3v & OTA4Y XY3v &      \\
     899%%   Intra-OTA & OTA2Y XY5v & OTA2Y XY6v & 7.07 \\
     900%%             & OTA2Y XY6v & OTA2Y XY5v &      \\
     901%%             & OTA5Y XY5v & OTA5Y XY6v &      \\
     902%%             & OTA5Y XY6v & OTA5Y XY5v &      \\
     903%%   One-way   & OTA2Y XY7v & OTA3Y XY2v & 7.34 \\
     904%%             & OTA5Y XY7v & OTA4Y XY2v &      \\
     905%%   \enddata
     906%%   \label{tab:crosstalk_rules}
     907%% \end{deluxetable}
     908
    815909The next step of mask construction is to examine the flat and dark
    816910models, and exclude pixels that appear to be poorly corrected by these
     
    826920the rest of image are assigned the FLAT mask bit in the static mask,
    827921removing the pixels that cannot be corrected to a linear response.
    828 
    829 \begin{figure}[b]
    830   \centering
    831   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/gpc1_mask_indexed.png}
    832   \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.}
    833   \label{fig:static mask}
    834 \end{figure}
    835 
    836 \begin{deluxetable}{lllc}[htpb]
    837   \tablecolumns{4}
    838   \tablewidth{0pc}
    839   \tablecaption{GPC1 Crosstalk Rules}
    840   \tablehead{\colhead{Type}&\colhead{Source OTA/Cell}&\colhead{Ghost OTA/Cell}&\colhead{$\Delta m$}}
    841   \startdata
    842   Inter-OTA & OTA2Y XY3v & OTA3Y XY3v & 6.16 \\
    843             & OTA3Y XY3v & OTA2Y XY3v &      \\
    844             & OTA4Y XY3v & OTA5Y XY3v &      \\
    845             & OTA5Y XY3v & OTA4Y XY3v &      \\
    846   Intra-OTA & OTA2Y XY5v & OTA2Y XY6v & 7.07 \\
    847             & OTA2Y XY6v & OTA2Y XY5v &      \\
    848             & OTA5Y XY5v & OTA5Y XY6v &      \\
    849             & OTA5Y XY6v & OTA5Y XY5v &      \\
    850   One-way   & OTA2Y XY7v & OTA3Y XY2v & 7.34 \\
    851             & OTA5Y XY7v & OTA4Y XY2v &      \\
    852   \enddata
    853   \label{tab:crosstalk_rules}
    854 \end{deluxetable}
    855922
    856923% http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/StaticMasks20101215
     
    886953difference image construction, as they are more likely to have small
    887954deviations due to imperfections in the burntool correction.
     955
     956\begin{table}[tpb]
     957\caption{\label{tab:ghost_centers} Optical Ghost Center Transformations} \vspace{-0.5cm}
     958\begin{center}
     959\begin{tabular}{lrr}
     960\hline
     961\hline
     962{\bf Polynomial Term} & {\bf $L$ center} & {\bf $M$ center} \\
     963\hline
     964  $x^0 y^0$ & -1.215661e+02 &  2.422174e+01 \\
     965  $x^1 y^0$ &  1.321875e-02 &  4.170486e-04 \\
     966  $x^2 y^0$ & -4.017026e-09 & -1.934260e-08 \\
     967  $x^3 y^0$ &  1.148288e-10 & -1.173657e-12 \\
     968  $x^0 y^1$ & -1.908074e-03 &  1.189352e-02 \\
     969  $x^1 y^1$ &  8.479150e-08 & -9.256748e-08 \\
     970  $x^2 y^1$ &  1.635732e-11 &  1.140772e-10 \\
     971  $x^0 y^2$ &  2.625405e-08 &  8.123932e-08 \\
     972  $x^1 y^2$ &  1.125586e-10 &  1.328378e-11 \\
     973  $x^0 y^3$ &  2.912432e-12 &  1.170865e-10 \\
     974\hline
     975\end{tabular}
     976\end{center} \vspace{-0.25cm}
     977\end{table}
    888978
    889979The remaining dynamic masks are generated in the IPP \IPPstage{camera}
     
    9261016electronic path for the crosstalk.
    9271017
     1018\begin{figure*}[htpb]
     1019  \centering
     1020\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/GPC1_Ghosts_with_Zoom\plotopt.pdf}
     1021  \caption{{\bf Ghosts:} Example of optical ghosts in GPC1.  The
     1022    central $6 \times 6$ detectors from exposure o5677g0123o
     1023    (2011-04-26, 43s \gps{} filter) are shown.  The dashed red lines
     1024    link three example sets of stellar sources and the destinations of
     1025    the corresponding ghosts.  The insets zoom in on these ghosts and
     1026    highlight the increasingly distorted images away from the optical
     1027    axis.  The bright star on OTA33 results in a nearly circular ghost
     1028    on the opposite OTA.  In contrast, the trio of stars on OTA11
     1029    result in very elongated ghosts on OTA66, in the upper left
     1030    corner.}
     1031  \label{fig:optical ghosts}
     1032\end{figure*}
     1033
    9281034For the very brightest sources ($m_{inst} < -15$), there can be
    9291035crosstalk ghosts between all columns of cells during the readout.
     
    9351041magnitude, with $W = 5 \times \left(-15 - m_{inst,source}\right)$
    9361042pixels.
    937 
    938 \begin{deluxetable}{lcc}[htpb]
    939   \tablecolumns{3}
    940   \tablewidth{0pc}
    941   \tablecaption{Optical Ghost Center Transformations}
    942   \tablehead{\colhead{Polynomial Term}&\colhead{$L$ center}&\colhead{$M$ center}}
    943   \startdata
    944   $x^0 y^0$ & -1.215661e+02 &  2.422174e+01 \\
    945   $x^1 y^0$ &  1.321875e-02 &  4.170486e-04 \\
    946   $x^2 y^0$ & -4.017026e-09 & -1.934260e-08 \\
    947   $x^3 y^0$ &  1.148288e-10 & -1.173657e-12 \\
    948   $x^0 y^1$ & -1.908074e-03 &  1.189352e-02 \\
    949   $x^1 y^1$ &  8.479150e-08 & -9.256748e-08 \\
    950   $x^2 y^1$ &  1.635732e-11 &  1.140772e-10 \\
    951   $x^0 y^2$ &  2.625405e-08 &  8.123932e-08 \\
    952   $x^1 y^2$ &  1.125586e-10 &  1.328378e-11 \\
    953   $x^0 y^3$ &  2.912432e-12 &  1.170865e-10 \\
    954   \enddata
    955   \label{tab:ghost_centers}
    956 \end{deluxetable}
    9571043
    9581044\paragraph{Optical ghosts}
     
    9721058several prominent optical ghosts.
    9731059
    974 \begin{deluxetable*}{lcccc}[htpb]
    975   \tablecolumns{5}
    976   \tablewidth{0pc}
    977   \tablecaption{Optical Ghost Annulus Axis Length}
    978   \tablehead{\colhead{Radial Order}&\colhead{Inner Major Axis}&\colhead{Inner Minor Axis}&\colhead{Outer Major Axis}&\colhead{Outer Minor Axis}}
    979   % \tablehead{\colhead{Order}&\colhead{Maj$_{\rm in}$}&\colhead{Min$_{\rm in}$}&    \colhead{Maj$_{\rm out}$}&\colhead{Min$_{\rm out}$}}
    980   \startdata
     1060\begin{table*}[tphb]
     1061\caption{\label{tab:ghost_radii} Optical Ghost Annulus Axis Length} \vspace{-0.5cm}
     1062\begin{center}
     1063\begin{tabular}{lcccc}
     1064\hline
     1065\hline
     1066{\bf Radial Order} & {\bf Inner Major Axis} & {\bf Inner Minor Axis} & {\bf Outer Major Axis} & {\bf Outer Minor Axis} \\
     1067\hline
    9811068  $r^0$ & 3.926693e+01 & 5.287548e+01 & 7.928722e+01 & 1.314265e+02 \\
    9821069  $r^1$ & 5.325759e-03 &-2.191669e-03 & 1.722181e-02 & -2.627153e-03 \\
    983   \enddata
    984   \label{tab:ghost_radii}
    985 \end{deluxetable*}
     1070\hline
     1071\end{tabular}
     1072\end{center} \vspace{-0.25cm}
     1073\end{table*}
     1074
     1075%% \begin{deluxetable*}{lcccc}[htpb]
     1076%%   \tablecolumns{5}
     1077%%   \tablewidth{0pc}
     1078%%   \tablecaption{Optical Ghost Annulus Axis Length}
     1079%%   \tablehead{\colhead{Radial Order}&\colhead{Inner Major Axis}&\colhead{Inner Minor Axis}&\colhead{Outer Major Axis}&\colhead{Outer Minor Axis}}
     1080%%   % \tablehead{\colhead{Order}&\colhead{Maj$_{\rm in}$}&\colhead{Min$_{\rm in}$}&    \colhead{Maj$_{\rm out}$}&\colhead{Min$_{\rm out}$}}
     1081%%   \startdata
     1082%%   $r^0$ & 3.926693e+01 & 5.287548e+01 & 7.928722e+01 & 1.314265e+02 \\
     1083%%   $r^1$ & 5.325759e-03 &-2.191669e-03 & 1.722181e-02 & -2.627153e-03 \\
     1084%%   \enddata
     1085%%   \label{tab:ghost_radii}
     1086%% \end{deluxetable*}
    9861087
    9871088These optical ghosts can be modeled in the focal plane coordinates
     
    9921093in the focal plane $L$ and $M$ directions (as listed in Table
    9931094\ref{tab:ghost_centers}).  An elliptical annulus mask is constructed
    994 at the expected ghost location, with the major and minor axes of the inner and outer elliptical annuli defined
    995 by linear functions of the ghost distance from the optical axis, and
    996 oriented with the ellipse major axis is along the radial direction
    997 (Table \ref{tab:ghost_radii}).  All stars brighter than a
    998 filter-dependent threshold (listed in Table
    999 \ref{tab:ghost_magnitudes}) have such masks constructed.
    1000 
    1001 %% \begin{table*}[htpb]
    1002 %% \begin{center}
    1003 %%   % \tablecolumns{5}
    1004 %%   % \tablewidth{0pc}
    1005 %%   % \tablecaption{Optical Ghost Annulus Axis Length}
    1006 %%   \caption{Optical Ghost Annulus Axis Length\label{tab:ghost_radii}}
    1007 %%   \begin{tabular}{lcccc}
    1008 %%   % \tablehead{\colhead{Radial Order}&\colhead{Inner Major Axis}&\colhead{Inner Minor Axis}&\colhead{Outer Major Axis}&\colhead{Outer Minor Axis}}
    1009 %%   % \startdata
    1010 %%   \hline
    1011 %%   \hline
    1012 %%   {\bf Radial Order}&{\bf Inner Major Axis}&{\bf Inner Minor Axis}&{\bf Outer Major Axis}&{\bf Outer Minor Axis} \\
    1013 %%   \hline
    1014 %%   $r^0$ & 3.926693e+01 & 5.287548e+01 & 7.928722e+01 & 1.314265e+02 \\
    1015 %%   $r^1$ & 5.325759e-03 &-2.191669e-03 & 1.722181e-02 & -2.627153e-03 \\
    1016 %%   \hline
    1017 %%   \end{tabular}
    1018 %% \end{center}
    1019 %% \end{table*}
     1095at the expected ghost location, with the major and minor axes of the
     1096inner and outer elliptical annuli defined by linear functions of the
     1097ghost distance from the optical axis, and oriented with the ellipse
     1098major axis is along the radial direction (Table
     1099\ref{tab:ghost_radii}).  All stars brighter than a filter-dependent
     1100threshold (listed in Table \ref{tab:ghost_magnitudes}) have such masks
     1101constructed.
    10201102
    10211103\paragraph{Optical glints}
     
    10731155\begin{figure*}[htpb]
    10741156  \centering
    1075 % \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/GPC1_Ghosts_with_Zoom.png}
    1076   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/GPC1_Ghosts_with_Zoom.pdf}
    1077   \caption{{\bf Ghosts:} Example of optical ghosts in GPC1.  The
    1078     central $6 \times 6$ detectors from exposure o5677g0123o
    1079     (2011-04-26, 43s \gps{} filter) are shown.  The dashed red lines
    1080     link three example sets of stellar sources and the destinations of
    1081     the corresponding ghosts.  The insets zoom in on these ghosts and
    1082     highlight the increasingly distorted images away from the optical
    1083     axis.  The bright star on OTA33 results in a nearly circular ghost
    1084     on the opposite OTA.  In contrast, the trio of stars on OTA11
    1085     result in very elongated ghosts on OTA66, in the upper left
    1086     corner.}
    1087   \label{fig:optical ghosts}
    1088 \end{figure*}
    1089 
    1090 \begin{figure*}[htpb]
    1091   \centering
    1092   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/full_fpa_glints\plotopt.png}
     1157\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/full_fpa_glints\plotopt.png}
    10931158  \caption{{\bf Glints:}  Example of a glint on exposure o5379g0103o (2010-07-02, 45s \ips{} filter).  The source star out of the field of view creates a long reflection that extends through OTA73 and OTA63.}
    10941159  \label{fig:optical glints}
     
    10971162\begin{figure}[htpb]
    10981163  \centering
    1099   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o6802g0338o_SATSTAR_XY51\plotopt.png}
     1164\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o6802g0338o_SATSTAR_XY51\plotopt.png}
    11001165  \caption{Example of saturated star, with diffraction spikes extending from the core on exposure o6802g0338o, OTA51 (2014-05-25, 45s \gps{} filter).}
    11011166  \label{fig:saturated star}
    11021167\end{figure}
     1168
     1169\begin{table}[pb]
     1170\caption{\label{tab:ghost_magnitudes} Optical Ghost Magnitude Limits} \vspace{-0.5cm}
     1171\begin{center}
     1172\begin{tabular}{lrr}
     1173\hline
     1174\hline
     1175{\bf Filter} & {\bf $m_{inst}$} & {\bf Apparent mag} \\
     1176& & {\bf ($3\pi$)} \\
     1177\hline
     1178  \gps{} & -16.5 & 12.2 \\
     1179  \rps{} & -20.0 &  8.9 \\
     1180  \ips{} & -25.0 &  3.7 \\
     1181  \zps{} & -25.0 &  3.4 \\
     1182  \yps{} & -25.0 &  2.5 \\
     1183  \wps{} & -20.0 & 10.2 \\
     1184\hline
     1185\end{tabular}
     1186\end{center} \vspace{-0.25cm}
     1187\end{table}
     1188
     1189%% \begin{deluxetable}{lrr}[b]
     1190%%   \tablecolumns{3}
     1191%%   \tablewidth{0pc}
     1192%%   \tablecaption{Optical Ghost Magnitude Limits}
     1193%%   \tablehead{\colhead{Filter} & \colhead{$m_{inst}$} & \colhead{Apparent mag ($3\pi$)}}
     1194%%   \startdata
     1195%%   \gps{} & -16.5 & 12.2 \\
     1196%%   \rps{} & -20.0 &  8.9 \\
     1197%%   \ips{} & -25.0 &  3.7 \\
     1198%%   \zps{} & -25.0 &  3.4 \\
     1199%%   \yps{} & -25.0 &  2.5 \\
     1200%%   \wps{} & -20.0 & 10.2 \\
     1201%%   \enddata
     1202%%   \label{tab:ghost_magnitudes}
     1203%% \end{deluxetable}
    11031204
    11041205\subsubsection{Masking Fraction}
     
    11561257%% Other = CR, SPIKE, GHOST, STARCORE [Ghost & Spike probably dominate]
    11571258
    1158 \begin{deluxetable}{lrr}[b]
    1159   \tablecolumns{3}
    1160   \tablewidth{0pc}
    1161   \tablecaption{Optical Ghost Magnitude Limits}
    1162 % \tablehead{\colhead{Filter} & \colhead{$m_{inst}$} & \colhead{\parbox{2cm}{Apparent mag ($3\pi$)}}}
    1163   \tablehead{\colhead{Filter} & \colhead{$m_{inst}$} & \colhead{Apparent mag ($3\pi$)}}
    1164   \startdata
    1165   \gps{} & -16.5 & 12.2 \\
    1166   \rps{} & -20.0 &  8.9 \\
    1167   \ips{} & -25.0 &  3.7 \\
    1168   \zps{} & -25.0 &  3.4 \\
    1169   \yps{} & -25.0 &  2.5 \\
    1170   \wps{} & -20.0 & 10.2 \\
    1171   \enddata
    1172   \label{tab:ghost_magnitudes}
    1173 \end{deluxetable}
    1174 
    11751259During the \IPPstage{camera} processing, a separate estimate of the
    11761260mask fraction for a given exposure is calculated by counting the
     
    11861270The significant advisory value is a result of applying such masks to
    11871271all burntool corrected pixels.
     1272
     1273\begin{table}[htpb]
     1274\caption{\label{tab:mask fraction} Mask Fraction by Mask Source} \vspace{-0.5cm}
     1275\begin{center}
     1276\begin{tabular}{lcc}
     1277\hline
     1278\hline
     1279 & \multicolumn{2}{c}{\bf Field of View} \\
     1280{\bf Mask Source} & {\bf 3\degree} & {\bf 3.25\degree} \\
     1281\hline
     1282  Good pixel              & 78.9\% & 71.1\% \\
     1283  Unpopulated             & 13.1\% & 19.6\% \\
     1284  CTE issue               &  2.3\% &  2.6\% \\
     1285  Other issue             &  5.4\% &  6.4\% \\
     1286  Static advisory         &  0.3\% &  0.3\% \\
     1287\hline
     1288\end{tabular}
     1289\end{center} \vspace{-0.25cm}
     1290\end{table}
     1291
     1292%% \begin{deluxetable}{lcc}[htpb]
     1293%%   \tablecolumns{3}
     1294%%   \tablewidth{0pc}
     1295%%   \tablecaption{Mask Fraction by Mask Source}
     1296%%   \tablehead{
     1297%%     &\multicolumn{2}{c}{Field of View} \\
     1298%%     \colhead{Mask Source}&\colhead{3\degree}&\colhead{3.25\degree}}
     1299%%   \startdata
     1300%%   Good pixel              & 78.9\% & 71.1\% \\
     1301%%   Unpopulated             & 13.1\% & 19.6\% \\
     1302%%   CTE issue               &  2.3\% &  2.6\% \\
     1303%%   Other issue             &  5.4\% &  6.4\% \\
     1304%%   Static advisory         &  0.3\% &  0.3\% \\
     1305%%   \enddata
     1306%%   \label{tab:mask fraction}
     1307%% \end{deluxetable}
     1308
     1309\subsection{Burntool / Persistence effect}
     1310\label{sec:burntool}
     1311
     1312Pixels that approach the saturation point on GPC1 (see
     1313Section~\ref{sec:diffraction_spikes}) introduce ``persistent charge''
     1314on that and subsequent images.  During the read out process of a cell
     1315with such a bright pixel, some of the charge remains in the undepleted
     1316region of the silicon and is not shifted down the detector column
     1317toward the amplifier.  This charge remains in the starting pixel and
     1318slowly leaks out of the undepleted region, contaminating subsequent
     1319pixels during the read out process, resulting in a ``burn trail'' that
     1320extends from the center of the bright source away from the amplifier
     1321(vertically along the pixel columns toward the top of the cell).
     1322
     1323This incomplete charge shifting in nearly full wells continues as each
     1324row is read out.  This results in a remnant charge being deposited in
     1325the pixels that the full well was shifted through.  In following
     1326exposures, this remnant charge leaks out, resulting in a trail that
     1327extends from the initial location of the bright source on the previous
     1328image towards the amplifier (vertically down along the pixel column).
     1329This remnant charge can remain on the detector for up to thirty
     1330minutes.
     1331
     1332Both of these types of persistence trails are measured and optionally
     1333repaired via the \IPPprog{burntool} program.  This program does an
     1334initial scan of the image, and identifies objects with pixel values
     1335higher than a conservative threshold of 30000 DN.  The trail from the
     1336peak of that object is fit with a one-dimensional power law in each
     1337pixel column above the threshold, based on empirical evidence that
     1338this is the functional form of this persistence effect.  This fit also
     1339matches the expectation that a constant fraction of charge is
     1340incompletely transferred at each shift beyond the persistence
     1341threshold.  Once the fit is done, the model can be subtracted from
     1342the image.  The location of the source is stored in a table along
     1343with the exposure PONTIME, which denotes the number of seconds since
     1344the detector was last powered on and provides an internally
     1345consistent time scale.
     1346
     1347For subsequent exposures, the table associated with the previous image
     1348is read in, and after correcting trails from the stars on the new
     1349image, the positions of the bright stars from the table are used to
     1350check for remnant trails from previous exposures on the image.  These
     1351are fit and subtracted using a one-dimensional exponential model,
     1352again based on empirical studies.  The output table retains this
     1353remnant position for 2000 seconds after the initial PONTIME recorded.
     1354This allows fits to be attempted well beyond the nominal lifetime of
     1355these trails.  Figure \ref{fig:burntool images} shows an example of a
     1356cell with a persistence trail from a bright star, the post-correction
     1357result, as well as the pre and post correction versions of the same
     1358cell on the subsequent exposure.  The profiles along the detector
     1359columns for these two exposures are presented in Figure
     1360\ref{fig:burntool plot}.
     1361
     1362\begin{figure}[tpb]
     1363  \centering
     1364  %% need a small version of this for arxiv
     1365\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/persistent_charge\plotopt.png}
     1366  \caption{{\bf Persistent Charge:}  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.}
     1367  \label{fig:burntool images}
     1368\end{figure}
     1369
     1370Using this method of correcting the persistence trails has the
     1371challenge that it is based on fits to the raw image data, which may
     1372have other signal sources not determined by the persistence effect.
     1373The presence of other stars or artifacts in the detector column can
     1374result in a poor model to be fit, resulting in either an over- or
     1375under-subtraction of the trail.  For this reason, the image mask is
     1376marked with a value indicating that this correction has been applied.
     1377These pixels are not fully excluded, but they are marked as suspect,
     1378which allows them to be excluded from consideration in subsequent
     1379stages, such as image stacking.
     1380
     1381The cores of very bright stars can also be deformed by this process,
     1382as the burntool fitting subtracts flux from only one side of the star.
     1383As most stars that result in persistence trails already have saturated
     1384cores, they are already ignored for the purpose of PSF determination
     1385and are flagged as saturated by the photometry reduction.
     1386
     1387\begin{figure}[htpb]
     1388  \centering
     1389\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123n4o_XY11_bt_trail.pdf}
     1390  \caption{{\bf Burntool Correction:} Example of a profile cut along
     1391    the y-axis through a bright star on exposure o5677g0123o OTA11 in
     1392    cell xy50 (left panel) and on the subsequent exposure o5677g0124o
     1393    (right panel).  In both figures, the blue pluses show the image
     1394    corrected with all appropriate detrending steps, but without
     1395    burntool applied, illustrating the amplitude of the persistence
     1396    trails.  The red circles show the same data after the burntool
     1397    correction, which reduces the impact of these features.  Both
     1398    exposures are in the \gps{} filter with exposure times of 43s}
     1399  \label{fig:burntool plot}
     1400\end{figure}
     1401
     1402\subsection{Non-linearity Correction}
     1403\label{sec:nonlinearity}
     1404
     1405The pixels of GPC1 are not uniformly linear at all flux levels.  In
     1406particular, at low flux levels, some pixels have a tendency to sag
     1407relative to the expected linear value.  This effect is most pronounced
     1408along the edges of the detector cells, although some entire cells show
     1409evidence of this effect.
     1410
     1411To correct this sag, we studied the behavior of a series of flat
     1412frames for a ramp of exposure times with approximate logarithmically
     1413equal spacing between 0.01s and 57.04s.  As the exposure time
     1414increases, the signal on each pixel also increases in what is expected
     1415to be a linear manner.  Each of the flat exposures in this ramp is
     1416overscan corrected, and then the median is calculated for each cell,
     1417as well as for the rows and columns within ten pixels of the edge of
     1418the science region.  From these median values at each exposure time
     1419value, we can construct the expected trend by fitting a linear model
     1420for the region considered.  This fitting was limited to only the range
     1421of fluxes between 12000 and 38000 counts, as these ranges were found
     1422to match the linear model well.  This range avoids the non-linearity
     1423at low fluxes, as well as the possibility of high-flux non-linearity
     1424effects.
     1425
     1426\begin{table}[tpb]
     1427\caption{\label{tab:pattern_row_cells} Cells which have \nocode{PATTERN.ROW} correction applied} \vspace{-0.5cm}
     1428\begin{center}
     1429\begin{tabular}{lcccc}
     1430\hline
     1431\hline
     1432{\bf OTA} & {\bf Cell columns} & {\bf Additional cells} \\
     1433\hline
     1434  OTA11 &  & xy02, xy03, xy04, xy07 \\
     1435  OTA14 &  & xy23 \\
     1436  OTA15 & 0 & \\
     1437  OTA27 & 0, 1, 2, 3, 7 & \\
     1438  OTA31 & 7 & \\
     1439  OTA32 & 3, 7 & \\
     1440  OTA45 & 3, 7 & \\
     1441  OTA47 & 0, 3, 5, 7 & \\
     1442  OTA57 & 0, 1, 2, 6, 7 & \\
     1443  OTA60 &  & xy55 \\
     1444  OTA74 & 2, 7 & \\
     1445\hline
     1446\end{tabular}
     1447\end{center} \vspace{-0.25cm}
     1448\end{table}
     1449
     1450%% \begin{deluxetable}{lcccc}[htpb]
     1451%%   \tablecolumns{3}
     1452%%   \tablewidth{0pc}
     1453%%   \tablecaption{Cells which have \nocode{PATTERN.ROW} correction applied}
     1454%%   \tablehead{\colhead{OTA} & \colhead{Cell columns} & \colhead{Additional cells}}
     1455%%   \startdata
     1456%%   OTA11 &  & xy02, xy03, xy04, xy07 \\
     1457%%   OTA14 &  & xy23 \\
     1458%%   OTA15 & 0 & \\
     1459%%   OTA27 & 0, 1, 2, 3, 7 & \\
     1460%%   OTA31 & 7 & \\
     1461%%   OTA32 & 3, 7 & \\
     1462%%   OTA45 & 3, 7 & \\
     1463%%   OTA47 & 0, 3, 5, 7 & \\
     1464%%   OTA57 & 0, 1, 2, 6, 7 & \\
     1465%%   OTA60 &  & xy55 \\
     1466%%   OTA74 & 2, 7 & \\
     1467%%   \enddata
     1468%%   \label{tab:pattern_row_cells}
     1469%% \end{deluxetable}
     1470
     1471We store the average flux measurement and deviation from the linear
     1472fit for each exposure time for each region on all detector cells in
     1473the linearity detrend look-up tables.  When this correction is
     1474applied to science data, these lookup tables are loaded, and a linear
     1475interpolation is performed to determine the correction needed for the
     1476flux in that pixel.  This look up is performed for both the row and
     1477column of each pixel, to allow the edge correction to be applied where
     1478applicable, and the full cell correction elsewhere.  The average of
     1479these two values is then applied to the pixel value, reducing the
     1480effects of pixel nonlinearity.
     1481
     1482This non-linearity effect appears to be stable in time for the
     1483majority of the detector pixels, with little evident change over the
     1484survey duration.  However, as the non-linearity is most pronounced at
     1485the edges of the detector cells, those are the regions where the
     1486correction is most likely to be incomplete.  Because of this fact,
     1487most pixels in the static mask with either the DARKMASK or FLATMASK
     1488bit set are found along these edges.  As the non-linearity correction
     1489is unable to reliably restore these pixels, they produce inconsistent
     1490values after the dark and flat have been applied, and are therefore
     1491rejected.
     1492
     1493\subsection{Pattern correction}
     1494\label{sec:pattern}
     1495
     1496\subsubsection{Pattern Row}
     1497\label{sec:pattern.row}
     1498%% Statistics so I have them written down somewhere
     1499%% chipProcessedImfile.bg/bg_stdev by filter for XY33 (a good chip)
     1500%% filter  bg_mean stdev median Qsig                              bg_stdev_mean stdev median Qsig
     1501%% g        36.37422026669   64.64175104057  32.693   6.10284     14.696938349131  78.80460307171  8.8401  0.5417843
     1502%% r       200.96143304525  471.87743546238 117.105  94.55608     33.854672792146  79.01642728089 13.4564  5.3771355
     1503%% i       447.00504994458  938.38517801037 286.810 154.71397     57.298335510188  99.38392923935 20.0217 24.2254723
     1504%% z       317.54933679054  390.38930252748 241.014 114.13316     48.359069000176  94.44452756094 17.9404  9.1535209
     1505%% y       371.09019536218  293.57439970375 288.481 133.38769     43.724342221691 135.04286534327 19.9029  7.5396461
     1506
     1507As discussed above in the dark and noisemap sections, certain
     1508detectors have significant bias offsets between adjacent rows, caused
     1509by drifts in the bias level due to cross talk.  The magnitude of these
     1510offsets increases as the distance from the readout amplifier and
     1511overscan region increases, resulting in horizontal streaks that are
     1512more pronounced along the large $x$ pixel edge of the cell.  As the
     1513level of the offset is apparently random between exposures, the dark
     1514correction cannot fully remove this structure from the images, and the
     1515noisemap value only indicates the level of the average variance added
     1516by these bias offsets.  Therefore, we apply the \ippmisc{PATTERN.ROW} correction
     1517in an attempt to mitigate the offsets and correct the image values.
     1518To force the rows to agree, a second order clipped polynomial is
     1519fitted to each row in the cell.  Four fit iterations are run and
     1520pixels $2.5\sigma$ deviant (chosen empirically) are excluded from
     1521subsequent fits in order to minimize the bias from stars and other
     1522astronomical sources in the pixels.  This final trend is then
     1523subtracted from that row.  Simply doing this subtraction will also
     1524have the effect of removing the background sky level.  To prevent
     1525this, the constant and linear terms for each row are stored, and
     1526linear fits are made to these parameters as a function of row,
     1527perpendicular to the initial fits.  This produces a plane that is
     1528added back to the image to restore the background offset and any
     1529linear ramp that exists in the sky.
     1530
     1531\begin{figure}[tpb]
     1532  \centering
     1533\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/pattern_row_edit.png}
     1534  \caption{Diagram illustrating in red which cells on GPC1 require the
     1535    \nocode{PATTERN.ROW} correction to be applied.  The footprint of
     1536    each OTA is outlined, and cell xy00 is marked with either a filled
     1537    box or an outline.  The labeling of the non-existent corner OTAs
     1538    is provided to orient the focal plane.}
     1539  \label{fig: pattern row cells}
     1540\end{figure}
     1541
     1542These row-by-row variations have the largest impact on data taken in
     1543the \gps{} filter, as the read noise is the dominant noise source in
     1544that filter.  At longer wavelengths, the noise from the Poissonian
     1545variation in the sky level increases.  The \ippmisc{PATTERN.ROW} correction is
     1546still applied to data taken in the other filters, as the increase in
     1547sky noise does not fully obscure the row-by-row noise.
     1548
     1549%% GPC1 tuning describe in email from Peter Onaka 2009.11.30,
     1550%% with notes in GPC1TuningTestLog.pdf
     1551
     1552This correction was required on all cells on all OTAs prior to
     15532009-12-01, at which point a modification of the camera clocking phase
     1554delays reduced the scale of the row-by-row offsets for the majority of
     1555the OTAs.  As a result, we only apply this correction to the cells
     1556where it is still necessary, as shown in Figure \ref{fig: pattern row
     1557  cells}.  A list of these cells is in Table
     1558\ref{tab:pattern_row_cells}.
     1559
     1560\begin{figure*}[tpb]
     1561  \centering
     1562  %% need small version for arxiv
     1563\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/{correlated.noise\plotopt}.png}
     1564  \caption{{\bf Correlated Noise:} Example of the
     1565    \nocode{PATTERN.ROW} correction on exposure o5379g0103o OTA57
     1566    cell xy01 (\ips{} filter 45s).  The left panel shows the cell with
     1567    all appropriate detrending except the \nocode{PATTERN.ROW}, and
     1568    the right shows the same cell with \nocode{PATTERN.ROW} applied.
     1569    The correction reduces the correlated noise on the right side,
     1570    which is most distant from the read out amplifier.  There is a
     1571    slight over subtraction along the rows near the bright star.}
     1572  \label{fig: pattern row example}
     1573\end{figure*}
     1574
     1575Although this correction largely resolves the row-by-row offset issue
     1576in a satisfactory way, large and bright astronomical objects can bias
     1577the fit significantly.  This results in an oversubtraction of the
     1578offset near these objects.  As the offsets are calculated on the pixel
     1579rows, this oversubtraction is not uniform around the object, but is
     1580preferentially along the horizontal x axis of the object.  Most
     1581astronomical objects are not significantly distorted by this, with
     1582this only becoming on issue for only bright objects comparable to the
     1583size of the cell (598 pixels = 150").  Figure \ref{fig: pattern row example}
     1584shows an example of a cell pre- and post-correction.
     1585
     1586\subsubsection{Pattern Continuity}
     1587\label{sec:pattern_continuity}
     1588
     1589\begin{figure*}[htpb]
     1590  \centering
     1591\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/{N157.v1\plotopt}.png}
     1592  \caption{These four panels illustrate the impact of the
     1593    \nocode{PATTERN.ROW}, \nocode{PATTERN.CONTINUITY}, and background
     1594    subtraction steps on a large galaxy.  Upper-left: all detrends
     1595    except \nocode{PATTERN.ROW}, \nocode{PATTERN.CONTINUITY}, and background
     1596    subtraction applied to a single GPC1 image of NGC 157.
     1597    Upper-right: same image as upper-left with \nocode{PATTERN.ROW} applied.
     1598    Lower-right: same image as upper-right with
     1599    \nocode{PATTERN.CONTINUITY} applied.  Lower-left: same image as
     1600    lower-right with background subtraction.}
     1601  \label{fig:ngc157.with.pattern}
     1602\end{figure*}
     1603
     1604\begin{figure*}[htpb]
     1605  \centering
     1606\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/{N157.v2\plotopt}.png}
     1607  \caption{These two panels illustrate the impact of the
     1608    \nocode{PATTERN.CONTINUITY}, and background subtraction steps on a
     1609    large galaxy, without \nocode{PATTERN.ROW}.  Left: all detrends
     1610    and \nocode{PATTERN.CONTINUITY}, but not \nocode{PATTERN.ROW} and
     1611    background subtraction, applied to a single GPC1 image of NGC 157.
     1612    Right: same image as left with background subtraction.  Without
     1613    the \nocode{PATTERN.ROW} correction, the background is much less affected.}
     1614  \label{fig:ngc157.without.pattern}
     1615\end{figure*}
     1616
     1617The background sky levels of cells on a single OTA do not always have
     1618the same value.  Despite having dark and flat corrections applied,
     1619adjacent cells may not match even for images of nominally empty sky.
     1620In addition, studies of the background level indicate that the
     1621row-by-row bias can introduce small background gradient variations
     1622along the rows of the cells that are not stable.  This common feature
     1623across the columns of cells results in a ``saw tooth'' pattern
     1624horizontally across the mosaicked OTA, and as the background model
     1625fits a smooth sky level, this induces over- and under subtraction at
     1626the cell boundaries.
     1627
     1628The \ippmisc{PATTERN.CONTINUITY} correction, attempts to match the edges of a
     1629cell to those of its neighbors.  For each cell, a thin box 10 pixels
     1630wide running the full length of each edge is extracted and the median
     1631of unmasked values is calculated for that box.  These median values
     1632are then used to construct a vector of the sum of the differences
     1633between that cell's edges and the corresponding edge on any adjacent
     1634cell $\Delta$.  A matrix $A$ of these associations is also
     1635constructed, with the diagonal containing the number of cells adjacent
     1636to that cell, and the off-diagonal values being set to -1 for each
     1637pair of adjacent cells.  The offsets needed for each chip, $\zeta$ can
     1638then be found by solving the system $A \zeta = \Delta$. A cell with the
     1639maximum number of neighbors, usually cell xy11, the first cell not on
     1640the edge of the OTA, is used to constrain the system, ensuring that
     1641that cell has zero correction and that there is a single solution.
     1642
     1643For OTAs that initially show the saw tooth pattern, the effect of this
     1644correction is to align the cells into a single ramp, at the expense of
     1645the absolute background level.  However, as we subtract off a smooth
     1646background model prior to doing photometry, these deviations from an
     1647absolute sky level do not affect photometry for point sources and
     1648extended sources smaller than a single cell.  The fact that the
     1649final ramp is smoother than it would be otherwise also allows for the
     1650background subtracted image to more closely match the astronomical
     1651sky, without significant errors at cell boundaries.  An example of the
     1652effect of this correction on an image profile is shown in Figure
     1653\ref{fig:dark switching}.
    11881654
    11891655\subsection{Background subtraction}
     
    12911757model mean and standard deviation.
    12921758
    1293 \begin{deluxetable}{lcc}[htpb]
    1294   \tablecolumns{3}
    1295   \tablewidth{0pc}
    1296   \tablecaption{Mask Fraction by Mask Source}
    1297   \tablehead{
    1298     &\multicolumn{2}{c}{Field of View} \\
    1299     \colhead{Mask Source}&\colhead{3\degree}&\colhead{3.25\degree}}
    1300   \startdata
    1301   Good pixel              & 78.9\% & 71.1\% \\
    1302   Unpopulated             & 13.1\% & 19.6\% \\
    1303   CTE issue               &  2.3\% &  2.6\% \\
    1304   Other issue             &  5.4\% &  6.4\% \\
    1305   Static advisory         &  0.3\% &  0.3\% \\
    1306   \enddata
    1307   \label{tab:mask fraction}
    1308 \end{deluxetable}
    1309 
    1310 Although this background modeling process works well for most of the
    1311 sky, astronomical sources that are large compared to the
    1312 $800\times{}800$ pixel subdivisions can bias the calculated background
    1313 level high, resulting in an oversubtraction near that object.  The
    1314 most common source that can cause this issue are large galaxies, which
    1315 can have their own features modeled as being part of the background.
    1316 For the specialized processing of M31, which covers an entire pointing
    1317 of GPC1, the measured background was added back to the \IPPstage{chip}
    1318 stage images, but this special processing was not used for the large
    1319 scale $3\pi$ PV3 reduction.
    1320 
    1321 \subsection{Burntool / Persistence effect}
    1322 \label{sec:burntool}
    1323 
    1324 Pixels that approach the saturation point on GPC1 (see
    1325 Section~\ref{sec:diffraction_spikes}) introduce ``persistent charge''
    1326 on that and subsequent images.  During the read out process of a cell
    1327 with such a bright pixel, some of the charge remains in the undepleted
    1328 region of the silicon and is not shifted down the detector column
    1329 toward the amplifier.  This charge remains in the starting pixel and
    1330 slowly leaks out of the undepleted region, contaminating subsequent
    1331 pixels during the read out process, resulting in a ``burn trail'' that
    1332 extends from the center of the bright source away from the amplifier
    1333 (vertically along the pixel columns toward the top of the cell).
    1334 
    1335 This incomplete charge shifting in nearly full wells continues as each
    1336 row is read out.  This results in a remnant charge being deposited in
    1337 the pixels that the full well was shifted through.  In following
    1338 exposures, this remnant charge leaks out, resulting in a trail that
    1339 extends from the initial location of the bright source on the previous
    1340 image towards the amplifier (vertically down along the pixel column).
    1341 This remnant charge can remain on the detector for up to thirty
    1342 minutes.
    1343 
    1344 \begin{figure}[htpb]
    1345   \centering
    1346   %% need a small version of this for arxiv
    1347   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/persistent_charge\plotopt.png}
    1348   \caption{{\bf Persistent Charge:}  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.}
    1349   \label{fig:burntool images}
    1350 \end{figure}
    1351 
    1352 Both of these types of persistence trails are measured and optionally
    1353 repaired via the \IPPprog{burntool} program.  This program does an
    1354 initial scan of the image, and identifies objects with pixel values
    1355 higher than a conservative threshold of 30000 DN.  The trail from the
    1356 peak of that object is fit with a one-dimensional power law in each
    1357 pixel column above the threshold, based on empirical evidence that
    1358 this is the functional form of this persistence effect.  This fit also
    1359 matches the expectation that a constant fraction of charge is
    1360 incompletely transferred at each shift beyond the persistence
    1361 threshold.  Once the fit is done, the model can be subtracted from
    1362 the image.  The location of the source is stored in a table along
    1363 with the exposure PONTIME, which denotes the number of seconds since
    1364 the detector was last powered on and provides an internally
    1365 consistent time scale.
    1366 
    1367 For subsequent exposures, the table associated with the previous image
    1368 is read in, and after correcting trails from the stars on the new
    1369 image, the positions of the bright stars from the table are used to
    1370 check for remnant trails from previous exposures on the image.  These
    1371 are fit and subtracted using a one-dimensional exponential model,
    1372 again based on empirical studies.  The output table retains this
    1373 remnant position for 2000 seconds after the initial PONTIME recorded.
    1374 This allows fits to be attempted well beyond the nominal lifetime of
    1375 these trails.  Figure \ref{fig:burntool images} shows an example of a
    1376 cell with a persistence trail from a bright star, the post-correction
    1377 result, as well as the pre and post correction versions of the same
    1378 cell on the subsequent exposure.  The profiles along the detector
    1379 columns for these two exposures are presented in Figure
    1380 \ref{fig:burntool plot}.
    1381 
    1382 \begin{figure}[htpb]
    1383   \centering
    1384   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/o5677g0123n4o_XY11_bt_trail.pdf}
    1385 
    1386   \caption{{\bf Burntool Correction:} Example of a profile cut along
    1387     the y-axis through a bright star on exposure o5677g0123o OTA11 in
    1388     cell xy50 (left panel) and on the subsequent exposure o5677g0124o
    1389     (right panel).  In both figures, the blue pluses show the image
    1390     corrected with all appropriate detrending steps, but without
    1391     burntool applied, illustrating the amplitude of the persistence
    1392     trails.  The red circles show the same data after the burntool
    1393     correction, which reduces the impact of these features.  Both
    1394     exposures are in the \gps{} filter with exposure times of 43s}
    1395 
    1396   \label{fig:burntool plot}
    1397 \end{figure}
    1398 
    1399 Using this method of correcting the persistence trails has the
    1400 challenge that it is based on fits to the raw image data, which may
    1401 have other signal sources not determined by the persistence effect.
    1402 The presence of other stars or artifacts in the detector column can
    1403 result in a poor model to be fit, resulting in either an over- or
    1404 under-subtraction of the trail.  For this reason, the image mask is
    1405 marked with a value indicating that this correction has been applied.
    1406 These pixels are not fully excluded, but they are marked as suspect,
    1407 which allows them to be excluded from consideration in subsequent
    1408 stages, such as image stacking.
    1409 
    1410 The cores of very bright stars can also be deformed by this process,
    1411 as the burntool fitting subtracts flux from only one side of the star.
    1412 As most stars that result in persistence trails already have saturated
    1413 cores, they are already ignored for the purpose of PSF determination
    1414 and are flagged as saturated by the photometry reduction.
    1415 
    1416 \subsection{Non-linearity Correction}
    1417 \label{sec:nonlinearity}
    1418 
    1419 The pixels of GPC1 are not uniformly linear at all flux levels.  In
    1420 particular, at low flux levels, some pixels have a tendency to sag
    1421 relative to the expected linear value.  This effect is most pronounced
    1422 along the edges of the detector cells, although some entire cells show
    1423 evidence of this effect.
    1424 
    1425 To correct this sag, we studied the behavior of a series of flat
    1426 frames for a ramp of exposure times with approximate logarithmically
    1427 equal spacing between 0.01s and 57.04s.  As the exposure time
    1428 increases, the signal on each pixel also increases in what is expected
    1429 to be a linear manner.  Each of the flat exposures in this ramp is
    1430 overscan corrected, and then the median is calculated for each cell,
    1431 as well as for the rows and columns within ten pixels of the edge of
    1432 the science region.  From these median values at each exposure time
    1433 value, we can construct the expected trend by fitting a linear model
    1434 for the region considered.  This fitting was limited to only the range
    1435 of fluxes between 12000 and 38000 counts, as these ranges were found
    1436 to match the linear model well.  This range avoids the non-linearity
    1437 at low fluxes, as well as the possibility of high-flux non-linearity
    1438 effects.
    1439 
    1440 % An example of this data is shown in Figure~\ref{fig: nonlinearity}. 
    1441 
    1442 We store the average flux measurement and deviation from the linear
    1443 fit for each exposure time for each region on all detector cells in
    1444 the linearity detrend look-up tables.  When this correction is
    1445 applied to science data, these lookup tables are loaded, and a linear
    1446 interpolation is performed to determine the correction needed for the
    1447 flux in that pixel.  This look up is performed for both the row and
    1448 column of each pixel, to allow the edge correction to be applied where
    1449 applicable, and the full cell correction elsewhere.  The average of
    1450 these two values is then applied to the pixel value, reducing the
    1451 effects of pixel nonlinearity.
    1452 
    1453 This non-linearity effect appears to be stable in time for the
    1454 majority of the detector pixels, with little evident change over the
    1455 survey duration.  However, as the non-linearity is most pronounced at
    1456 the edges of the detector cells, those are the regions where the
    1457 correction is most likely to be incomplete.  Because of this fact,
    1458 most pixels in the static mask with either the DARKMASK or FLATMASK
    1459 bit set are found along these edges.  As the non-linearity correction
    1460 is unable to reliably restore these pixels, they produce inconsistent
    1461 values after the dark and flat have been applied, and are therefore
    1462 rejected.
    1463 
    1464 \begin{deluxetable}{lcccc}[htpb]
    1465   \tablecolumns{3}
    1466   \tablewidth{0pc}
    1467   \tablecaption{Cells which have \nocode{PATTERN.ROW} correction applied}
    1468   \tablehead{\colhead{OTA} & \colhead{Cell columns} & \colhead{Additional cells}}
    1469   \startdata
    1470   OTA11 &  & xy02, xy03, xy04, xy07 \\
    1471   OTA14 &  & xy23 \\
    1472   OTA15 & 0 & \\
    1473   OTA27 & 0, 1, 2, 3, 7 & \\
    1474   OTA31 & 7 & \\
    1475   OTA32 & 3, 7 & \\
    1476   OTA45 & 3, 7 & \\
    1477   OTA47 & 0, 3, 5, 7 & \\
    1478   OTA57 & 0, 1, 2, 6, 7 & \\
    1479   OTA60 &  & xy55 \\
    1480   OTA74 & 2, 7 & \\
    1481   \enddata
    1482   \label{tab:pattern_row_cells}
    1483 \end{deluxetable}
    1484 
    1485 \subsection{Pattern correction}
    1486 \label{sec:pattern}
    1487 
    1488 \subsubsection{Pattern Row}
    1489 \label{sec:pattern.row}
    1490 %% Statistics so I have them written down somewhere
    1491 %% chipProcessedImfile.bg/bg_stdev by filter for XY33 (a good chip)
    1492 %% filter  bg_mean stdev median Qsig                              bg_stdev_mean stdev median Qsig
    1493 %% g        36.37422026669   64.64175104057  32.693   6.10284     14.696938349131  78.80460307171  8.8401  0.5417843
    1494 %% r       200.96143304525  471.87743546238 117.105  94.55608     33.854672792146  79.01642728089 13.4564  5.3771355
    1495 %% i       447.00504994458  938.38517801037 286.810 154.71397     57.298335510188  99.38392923935 20.0217 24.2254723
    1496 %% z       317.54933679054  390.38930252748 241.014 114.13316     48.359069000176  94.44452756094 17.9404  9.1535209
    1497 %% y       371.09019536218  293.57439970375 288.481 133.38769     43.724342221691 135.04286534327 19.9029  7.5396461
    1498 
    1499 As discussed above in the dark and noisemap sections, certain
    1500 detectors have significant bias offsets between adjacent rows, caused
    1501 by drifts in the bias level due to cross talk.  The magnitude of these
    1502 offsets increases as the distance from the readout amplifier and
    1503 overscan region increases, resulting in horizontal streaks that are
    1504 more pronounced along the large $x$ pixel edge of the cell.  As the
    1505 level of the offset is apparently random between exposures, the dark
    1506 correction cannot fully remove this structure from the images, and the
    1507 noisemap value only indicates the level of the average variance added
    1508 by these bias offsets.  Therefore, we apply the \ippmisc{PATTERN.ROW} correction
    1509 in an attempt to mitigate the offsets and correct the image values.
    1510 To force the rows to agree, a second order clipped polynomial is
    1511 fitted to each row in the cell.  Four fit iterations are run and
    1512 pixels $2.5\sigma$ deviant (chosen empirically) are excluded from
    1513 subsequent fits in order to minimize the bias from stars and other
    1514 astronomical sources in the pixels.  This final trend is then
    1515 subtracted from that row.  Simply doing this subtraction will also
    1516 have the effect of removing the background sky level.  To prevent
    1517 this, the constant and linear terms for each row are stored, and
    1518 linear fits are made to these parameters as a function of row,
    1519 perpendicular to the initial fits.  This produces a plane that is
    1520 added back to the image to restore the background offset and any
    1521 linear ramp that exists in the sky.
    1522 
    1523 \begin{figure}[htpb]
    1524   \centering
    1525   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/pattern_row_edit.png}
    1526   \caption{Diagram illustrating in red which cells on GPC1 require the
    1527     \nocode{PATTERN.ROW} correction to be applied.  The footprint of
    1528     each OTA is outlined, and cell xy00 is marked with either a filled
    1529     box or an outline.  The labeling of the non-existent corner OTAs
    1530     is provided to orient the focal plane.}
    1531   \label{fig: pattern row cells}
    1532 \end{figure}
    1533 
    1534 These row-by-row variations have the largest impact on data taken in
    1535 the \gps{} filter, as the read noise is the dominant noise source in
    1536 that filter.  At longer wavelengths, the noise from the Poissonian
    1537 variation in the sky level increases.  The \ippmisc{PATTERN.ROW} correction is
    1538 still applied to data taken in the other filters, as the increase in
    1539 sky noise does not fully obscure the row-by-row noise.
    1540 
    1541 %% GPC1 tuning describe in email from Peter Onaka 2009.11.30,
    1542 %% with notes in GPC1TuningTestLog.pdf
    1543 
    1544 This correction was required on all cells on all OTAs prior to
    1545 2009-12-01, at which point a modification of the camera clocking phase
    1546 delays reduced the scale of the row-by-row offsets for the majority of
    1547 the OTAs.  As a result, we only apply this correction to the cells
    1548 where it is still necessary, as shown in Figure \ref{fig: pattern row
    1549   cells}.  A list of these cells is in Table
    1550 \ref{tab:pattern_row_cells}.
    1551 
    1552 Although this correction largely resolves the row-by-row offset issue
    1553 in a satisfactory way, large and bright astronomical objects can bias
    1554 the fit significantly.  This results in an oversubtraction of the
    1555 offset near these objects.  As the offsets are calculated on the pixel
    1556 rows, this oversubtraction is not uniform around the object, but is
    1557 preferentially along the horizontal x axis of the object.  Most
    1558 astronomical objects are not significantly distorted by this, with
    1559 this only becoming on issue for only bright objects comparable to the
    1560 size of the cell (598 pixels = 150").  Figure \ref{fig: pattern row example}
    1561 shows an example of a cell pre- and post-correction.
    1562 
    1563 \begin{figure*}[htpb]
    1564   \centering
    1565   %% need small version for arxiv
    1566   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/{correlated.noise\plotopt}.png}
    1567   \caption{{\bf Correlated Noise:} Example of the
    1568     \nocode{PATTERN.ROW} correction on exposure o5379g0103o OTA57
    1569     cell xy01 (\ips{} filter 45s).  The left panel shows the cell with
    1570     all appropriate detrending except the \nocode{PATTERN.ROW}, and
    1571     the right shows the same cell with \nocode{PATTERN.ROW} applied.
    1572     The correction reduces the correlated noise on the right side,
    1573     which is most distant from the read out amplifier.  There is a
    1574     slight over subtraction along the rows near the bright star.}
    1575   \label{fig: pattern row example}
    1576 \end{figure*}
    1577 
    1578 \subsubsection{Pattern Continuity}
    1579 \label{sec:pattern_continuity}
    1580 
    1581 \begin{figure*}[htpb]
    1582   \centering
    1583   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/{N157.v1\plotopt}.png}
    1584   \caption{These four panels illustrate the impact of the
    1585     \nocode{PATTERN.ROW}, \nocode{PATTERN.CONTINUITY}, and background
    1586     subtraction steps on a large galaxy.  Upper-left: all detrends
    1587     except \nocode{PATTERN.ROW}, \nocode{PATTERN.CONTINUITY}, and background
    1588     subtraction applied to a single GPC1 image of NGC 157.
    1589     Upper-right: same image as upper-left with \nocode{PATTERN.ROW} applied.
    1590     Lower-right: same image as upper-right with
    1591     \nocode{PATTERN.CONTINUITY} applied.  Lower-left: same image as
    1592     lower-right with background subtraction.}
    1593   \label{fig:ngc157.with.pattern}
    1594 \end{figure*}
    1595 
    1596 \begin{figure*}[htpb]
    1597   \centering
    1598   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/{N157.v2\plotopt}.png}
    1599   \caption{These two panels illustrate the impact of the
    1600     \nocode{PATTERN.CONTINUITY}, and background subtraction steps on a
    1601     large galaxy, without \nocode{PATTERN.ROW}.  Left: all detrends
    1602     and \nocode{PATTERN.CONTINUITY}, but not \nocode{PATTERN.ROW} and
    1603     background subtraction, applied to a single GPC1 image of NGC 157.
    1604     Right: same image as left with background subtraction.  Without
    1605     the \nocode{PATTERN.ROW} correction, the background is much less affected.}
    1606   \label{fig:ngc157.without.pattern}
    1607 \end{figure*}
    1608 
    1609 The background sky levels of cells on a single OTA do not always have
    1610 the same value.  Despite having dark and flat corrections applied,
    1611 adjacent cells may not match even for images of nominally empty sky.
    1612 In addition, studies of the background level indicate that the
    1613 row-by-row bias can introduce small background gradient variations
    1614 along the rows of the cells that are not stable.  This common feature
    1615 across the columns of cells results in a ``saw tooth'' pattern
    1616 horizontally across the mosaicked OTA, and as the background model
    1617 fits a smooth sky level, this induces over- and under subtraction at
    1618 the cell boundaries.
    1619 
    1620 The \ippmisc{PATTERN.CONTINUITY} correction, attempts to match the edges of a
    1621 cell to those of its neighbors.  For each cell, a thin box 10 pixels
    1622 wide running the full length of each edge is extracted and the median
    1623 of unmasked values is calculated for that box.  These median values
    1624 are then used to construct a vector of the sum of the differences
    1625 between that cell's edges and the corresponding edge on any adjacent
    1626 cell $\Delta$.  A matrix $A$ of these associations is also
    1627 constructed, with the diagonal containing the number of cells adjacent
    1628 to that cell, and the off-diagonal values being set to -1 for each
    1629 pair of adjacent cells.  The offsets needed for each chip, $\zeta$ can
    1630 then be found by solving the system $A \zeta = \Delta$. A cell with the
    1631 maximum number of neighbors, usually cell xy11, the first cell not on
    1632 the edge of the OTA, is used to constrain the system, ensuring that
    1633 that cell has zero correction and that there is a single solution.
    1634 
    1635 For OTAs that initially show the saw tooth pattern, the effect of this
    1636 correction is to align the cells into a single ramp, at the expense of
    1637 the absolute background level.  However, as we subtract off a smooth
    1638 background model prior to doing photometry, these deviations from an
    1639 absolute sky level do not affect photometry for point sources and
    1640 extended sources smaller than a single cell.  The fact that the
    1641 final ramp is smoother than it would be otherwise also allows for the
    1642 background subtracted image to more closely match the astronomical
    1643 sky, without significant errors at cell boundaries.  An example of the
    1644 effect of this correction on an image profile is shown in Figure
    1645 \ref{fig:dark switching}.
    1646 
    1647 \subsection{Background (``Sky'') Subtraction}
    1648 
    1649 \note{does this section duplicate section 3.7 ??}
    1650 
    1651 During the \IPPstage{chip}-stage processing, after the detrending
    1652 steps are done but before source detection begins, a model of the
    1653 background light is subtracted from each chip image.  The decision to
    1654 subtract a background model is somewhat tricky as the trade-offs are
    1655 not clear in all possible cases.  It is helpful to consider the types
    1656 of sources which contribute to the background light in astronomical
    1657 images.
    1658 
    1659 First, there is ``scattered light'', which means flux that reaches the
     1759\subsection{Astrophysical vs Other Backgrounds}
     1760
     1761The model of the background light is subtracted from each chip image
     1762during the \IPPstage{chip}-stage processing before source detection
     1763begins.  The decision to subtract a background model is somewhat
     1764tricky as the trade-offs are not clear in all possible cases.  It is
     1765helpful to consider the types of sources which contribute to the
     1766background light in astronomical images.
     1767
     1768\begin{table*}[tpb]
     1769\caption{\label{tab:detrend ppMerge} Detrend Merge Options} \vspace{-0.5cm}
     1770\begin{center}
     1771\begin{tabular}{lcccc}
     1772\hline
     1773\hline
     1774{\bf Detrend Type} & {\bf Preprocess$^1$} & {\bf Iterations} & {\bf Threshold} & {\bf Combination Method} \\
     1775\hline
     1776  DARK      & ON   & 2 & $3\sigma$ & Clipped mean \\
     1777  FLAT      & OND  & 1 & $3\sigma$ & Clip Top $30\%$ \& Bottom $10\%$; Mean \\
     1778  FRINGE    & ONDF & 2 & $3\sigma$ & Clipped mean \\
     1779  DARKMASK  & OND  & 3 & $8\sigma$ & Mask if $>10\%$ rejected \\
     1780  FLATMASK  & ONDF & 3 & $3\sigma$ & Mask if $>10\%$ rejected \\
     1781  CTEMASK   & ONDF & 2 & $2\sigma$ & Clipped mean; mask if $\sigma^2/\langle I\rangle < 0.5$ \\
     1782  NOISEMAP  & ON   & 2 & $3\sigma$ & Mean \\
     1783\hline
     1784\multicolumn{5}{l}{$^1$O: Overscan subtraction; N: Non-linearity correction; D: Dark correction; F: Flat-field correction} \\
     1785\end{tabular}
     1786\end{center} \vspace{-0.25cm}
     1787\end{table*}
     1788
     1789First, there is ``scattered'' light\footnote{We put the term ``scattered'' in quotes because this
     1790  background may include light which reaches the detector directly
     1791  from the sky or other light source rather than scattering off
     1792  elements of the optical system.}, which means flux that reaches the
    16601793detector from a path that is different from the path through the
    16611794optics taken by the light from the imaged stars.  In an ideal
     
    16641797systems such as the Pan-STARRS telescopes, it is impossible to
    16651798sufficiently baffle the optical path to prevent ``scattered''
    1666 light\footnote{We put the term ``scattered'' in quotes because this
    1667   background may include light which reaches the detector directly
    1668   from the sky or other light source rather than scattering off
    1669   elements of the optical system.}  from reaching the detector without
     1799light from reaching the detector without
    16701800blocking the main optical path.  This class of background light may
    16711801include sharp features such as the glints discussed
    1672 above(Section~\ref{sec:glints}), but in this discussion we are
     1802above (Section~\ref{sec:dynamic_masks}), but in this discussion we are
    16731803primarily concerned with large-scale structures.  Another type of
    16741804``scattered'' background light source would be the large out-of-focus
     
    16811811telescope.  This may include glow from emission lines in the
    16821812atmosphere, light from the moon or terrestrial sources scattered off
    1683 thin (or thick!) clouds or just scattered in the clear atmosphere via
    1684 Rayleigh off dust particles and gas molecules in the atmosphere.  Both
    1685 ``scattered'' and direct terrestrial contributions to the background
    1686 light are not expected to be consistent for a given location on the
    1687 sky, though the pupil ghost image may well be the same for a fixed
     1813thin (or thick!) clouds or just scattered in the cloud-free atmosphere
     1814off dust particles and gas molecules.  Both ``scattered'' and direct
     1815terrestrial contributions to the background light vary with time and
     1816are not expected to be repeatable for a given location on the sky,
     1817though the pupil ghost image may well be the same for a fixed
    16881818telescope pointing and night sky brighness.
    16891819
    16901820Finally, there are astrophysical contributions to the background
    1691 light.  These range from the nearby zodiacal light to the
     1821light.  These range from the (relatively) nearby zodiacal light to the
    16921822extragalactic background.  Depending on the context and the source
    16931823being measured, astrophysical background sources may even include the
     
    16951825sources, it is necessary to subtract (or otherwise model) any
    16961826large-scale diffuse background component.  When measuring a larger
    1697 object, e.g., a well-resolved galaxy, it is necessary to make a
    1698 decision what portion of the large-scale flux is a background and what
     1827object, e.g., a well-resolved galaxy, it is necessary to
     1828decide what portion of the large-scale flux is a background and what
    16991829is part of the flux of the object being measured.
    17001830
     
    17131843combined to make a deep stack. 
    17141844
    1715 The details of the background model are discussed in Paper IV.
    1716 Briefly, the background subtraction is performed on each chip
    1717 independently.  The image is divided into a grid of points with a
    1718 spacing of 400 pixels.  A superpixel of size $800 \times 800$ pixels
    1719 is used to measure the background corresponding to each point.
    1720 Bilinear interpolation is used to estimate the background value at any
    1721 point in the full image.  This approach works well to follow the
    1722 large-scale background structures from the terrestrial and scattered
     1845The IPP background subtraction works well to remove the large-scale
     1846background structures from the terrestrial and scattered-light
    17231847sources, and to subtract the background light of large-scale
    1724 astronomical feasures for the analysis of point sources or small-scale
    1725 feasures such as small galaxies.  However, this process acts as a
     1848astronomical features for the analysis of point sources or small-scale
     1849features such as small galaxies.  However, this process acts as a
    17261850high-pass filter, with the result that galaxies larger than a certain
    1727 size will have a significant portion of their light subtracted.  In
     1851size have a significant portion of their light subtracted.  In
    17281852addition, the \ippmisc{PATTERN.ROW} and \ippmisc{PATTERN.CONTINUITY}
    17291853corrections described above (Section~\ref{sec:pattern}) also
     
    17321856\ref{fig:ngc157.without.pattern} illustrate the impact of the
    17331857background subtraction on a large galaxy both with and withouth the
    1734 \ippmisc{PATTERN.ROW} correction.
     1858\ippmisc{PATTERN.ROW} correction.  For the specialized processing of
     1859M31, which covers an entire pointing of GPC1, the measured background
     1860was added back to the \IPPstage{chip} stage images.  This special
     1861processing was not used for the large scale $3\pi$ PV3 reduction.
    17351862
    17361863\section{GPC1 Detrend Construction}
     
    17441871detrend to be constructed.  In general, the input exposures to the
    17451872detrend have all prior stages of detrend processing applied.  Table
    1746 \ref{tab:detrend ppImage} summarizes stages applied for the detrends
     1873\ref{tab:detrend ppMerge} summarizes stages applied for the detrends
    17471874we construct.
    17481875
     
    17701897the PV3 processing.
    17711898
    1772 \begin{deluxetable*}{lcccc}[htpb]
    1773   \tablecolumns{5}
    1774   \tablewidth{0pc}
    1775   \tablecaption{Detrend Construction Processing}
    1776   \tablehead{\colhead{Detrend Type} & \colhead{Overscan Subtracted} & \colhead{Nonlinearity Correction} & \colhead{Dark Subtracted} & \colhead{Flat Applied} }
    1777   \startdata
    1778   LINEARITY & Y & & & \\
    1779 %%  DARKMASK  & Y & Y & Y & \\
    1780 %%  FLATMASK  & Y & Y & Y & Y \\
    1781 %%  CTEMASK   & Y & Y & Y & Y \\
    1782   DARK      & Y & Y & & \\
    1783 %%  NOISEMAP  & Y & Y & & \\
    1784   FLAT      & Y & Y & Y & \\
    1785   FRINGE    & Y & Y & Y & Y \\
    1786   DARKMASK  & Y & Y & Y & \\
    1787   FLATMASK  & Y & Y & Y & Y \\
    1788   CTEMASK   & Y & Y & Y & Y \\
    1789   NOISEMAP  & Y & Y & & \\
    1790   \enddata
    1791   \label{tab:detrend ppImage}
    1792 \end{deluxetable*}
    1793 
    1794 
    1795 \begin{deluxetable*}{lcccc}[htpb]
    1796   \tablecolumns{5}
    1797   \tablewidth{0pc}
    1798   \tablecaption{Detrend Merge Options}
    1799   \tablehead{\colhead{Detrend Type} & \colhead{Iterations} & \colhead{Threshold} & \colhead{Additional Clipping} & \colhead{Combination Method} }
    1800   \startdata
    1801   DARKMASK  & 3 & $8\sigma$ & & Mask if $>10\%$ rejected \\
    1802   FLATMASK  & 3 & $3\sigma$ & & Mask if $>10\%$ rejected \\
    1803   CTEMASK   & 2 & $2\sigma$ & & Clipped mean; mask if $\sigma^2/\langle I\rangle < 0.5$ \\
    1804   DARK      & 2 & $3\sigma$ & & Clipped mean \\
    1805   NOISEMAP  & 2 & $3\sigma$ & & Mean \\
    1806   FLAT      & 1 & $3\sigma$ & Top $30\%$; Bottom $10\%$ & Mean \\
    1807   FRINGE    & 2 & $3\sigma$ & & Clipped mean \\
    1808   \enddata
    1809   \label{tab:detrend ppMerge}
    1810 \end{deluxetable*}
    1811 
    1812 \begin{deluxetable*}{lclll}[htpb]
    1813   \tablecolumns{5}
    1814   \tablewidth{0pc}
    1815   \tablecaption{PV3 Detrends}
    1816   \tablehead{\colhead{Detrend Type} & \colhead{Detrend ID} &
    1817     \colhead{Start Date (UT)} & \colhead{End Date (UT)} & \colhead{Note} }
    1818   \startdata
     1899%% \begin{table*}
     1900%% \caption{\label{tab:detrend ppImage} Detrend Construction Processing} \vspace{-0.5cm}
     1901%% \begin{center}
     1902%% \footnotesize
     1903%% \begin{tabular}{lcccc}
     1904%% \hline
     1905%% \hline
     1906%% {\bf Detrend Type} & {\bf Overscan Subtracted} & {\bf Nonlinearity Correction} & {\bf Dark Subtracted} & {\bf Flat Applied} \\
     1907%% \hline
     1908%%   LINEARITY & Y &   &   &   \\
     1909%%   DARK      & Y & Y &   &   \\
     1910%%   FLAT      & Y & Y & Y &   \\
     1911%%   FRINGE    & Y & Y & Y & Y \\
     1912%%   DARKMASK  & Y & Y & Y &   \\
     1913%%   FLATMASK  & Y & Y & Y & Y \\
     1914%%   CTEMASK   & Y & Y & Y & Y \\
     1915%%   NOISEMAP  & Y & Y &   &   \\
     1916%% \hline
     1917%% \end{tabular}
     1918%% \end{center} \vspace{-0.25cm}
     1919%% \end{table*}
     1920
     1921\begin{table*}
     1922\caption{\label{tab:detrend list} PV3 Detrends} \vspace{-0.5cm}
     1923\begin{center}
     1924\begin{tabular}{lclll}
     1925\hline
     1926\hline
     1927{\bf Detrend Type} & {\bf Detrend ID} & {\bf Start Date (UT)} & {\bf End Date (UT)} & {\bf Note} \\
     1928\hline
    18191929  LINEARITY & 421  & 2009-01-01 00:00:00 & & \\
    18201930  MASK      & 945  & 2009-01-01 00:00:00 & & \\
     
    18511961  FRINGE    & 296  & 2009-12-09 00:00:00 & & \\
    18521962  ASTROM    & 1064 & 2008-05-06 00:00:00 & & \\
    1853   \enddata
    1854   \tablenotetext{a}{These dates mark the beginning and ending of the two-mode dark models, between which multiple dates use the B-mode dark.}
    1855   \label{tab:detrend list}
    1856 \end{deluxetable*}
     1963\hline
     1964\multicolumn{5}{l}{$^a$These dates mark the beginning and ending of the two-mode dark models, between which multiple dates use the B-mode dark.} \\
     1965\end{tabular}
     1966\end{center} \vspace{-0.25cm}
     1967\end{table*}
     1968
     1969%% \begin{deluxetable*}{lcccc}[htpb]
     1970%%   \tablecolumns{5}
     1971%%   \tablewidth{0pc}
     1972%%   \tablecaption{Detrend Construction Processing}
     1973%%   \tablehead{\colhead{Detrend Type} & \colhead{Overscan Subtracted} & \colhead{Nonlinearity Correction} & \colhead{Dark Subtracted} & \colhead{Flat Applied} }
     1974%%   \startdata
     1975%%   LINEARITY & Y & & & \\
     1976%% %%  DARKMASK  & Y & Y & Y & \\
     1977%% %%  FLATMASK  & Y & Y & Y & Y \\
     1978%% %%  CTEMASK   & Y & Y & Y & Y \\
     1979%%   DARK      & Y & Y & & \\
     1980%% %%  NOISEMAP  & Y & Y & & \\
     1981%%   FLAT      & Y & Y & Y & \\
     1982%%   FRINGE    & Y & Y & Y & Y \\
     1983%%   DARKMASK  & Y & Y & Y & \\
     1984%%   FLATMASK  & Y & Y & Y & Y \\
     1985%%   CTEMASK   & Y & Y & Y & Y \\
     1986%%   NOISEMAP  & Y & Y & & \\
     1987%%   \enddata
     1988%%   \label{tab:detrend ppImage}
     1989%% \end{deluxetable*}
     1990%%
     1991%% \begin{deluxetable*}{lcccc}[htpb]
     1992%%   \tablecolumns{5}
     1993%%   \tablewidth{0pc}
     1994%%   \tablecaption{Detrend Merge Options}
     1995%%   \tablehead{\colhead{Detrend Type} & \colhead{Iterations} & \colhead{Threshold} & \colhead{Additional Clipping} & \colhead{Combination Method} }
     1996%%   \startdata
     1997%%   DARKMASK  & 3 & $8\sigma$ & & Mask if $>10\%$ rejected \\
     1998%%   FLATMASK  & 3 & $3\sigma$ & & Mask if $>10\%$ rejected \\
     1999%%   CTEMASK   & 2 & $2\sigma$ & & Clipped mean; mask if $\sigma^2/\langle I\rangle < 0.5$ \\
     2000%%   DARK      & 2 & $3\sigma$ & & Clipped mean \\
     2001%%   NOISEMAP  & 2 & $3\sigma$ & & Mean \\
     2002%%   FLAT      & 1 & $3\sigma$ & Top $30\%$; Bottom $10\%$ & Mean \\
     2003%%   FRINGE    & 2 & $3\sigma$ & & Clipped mean \\
     2004%%   \enddata
     2005%%   \label{tab:detrend ppMerge}
     2006%% \end{deluxetable*}
     2007%%
     2008%% \begin{deluxetable*}{lclll}[htpb]
     2009%%   \tablecolumns{5}
     2010%%   \tablewidth{0pc}
     2011%%   \tablecaption{PV3 Detrends}
     2012%%   \tablehead{\colhead{Detrend Type} & \colhead{Detrend ID} &
     2013%%     \colhead{Start Date (UT)} & \colhead{End Date (UT)} & \colhead{Note} }
     2014%%   \startdata
     2015%%   LINEARITY & 421  & 2009-01-01 00:00:00 & & \\
     2016%%   MASK      & 945  & 2009-01-01 00:00:00 & & \\
     2017%%             & 946  & 2009-12-09 00:00:00 & & \\
     2018%%             & 947  & 2010-01-01 00:00:00 & & \\
     2019%%             & 948  & 2011-01-06 00:00:00 & & \\
     2020%%             & 949  & 2011-03-09 00:00:00 & 2011-03-10 23:59:59 & \\
     2021%%             & 950  & 2011-08-02 00:00:00 & & \\
     2022%%             & 1072 & 2015-12-17 00:00:00 & & Update OTA62 mask \\
     2023%%   DARK      & 223  & 2009-01-01 00:00:00 & 2009-12-09 00:00:00 & \\
     2024%%             & 229  & 2009-12-09 00:00:00 & & \\
     2025%%             & 863  & 2010-01-23 00:00:00 & 2011-05-01 00:00:00 & A-mode \\
     2026%%             & 864  & 2011-05-01 00:00:00 & 2011-08-01 00:00:00 & \\
     2027%%             & 865  & 2011-08-01 00:00:00 & 2011-11-01 00:00:00 & \\
     2028%%             & 866  & 2011-11-01 00:00:00 & 2019-04-01 00:00:00 & \\
     2029%%             & 869-935 & 2010-01-25 00:00:00\tablenotemark{a} & 2011-04-25 23:59:59\tablenotemark{a} & B-mode \\
     2030%%   VIDEODARK & 976  & 2009-01-01 00:00:00 & 2009-12-09 00:00:00 & \\
     2031%%             & 977  & 2009-12-09 00:00:00 & 2010-01-23 00:00:00 & \\
     2032%%             & 978  & 2010-01-23 00:00:00 & 2011-05-01 00:00:00 & A-mode \\
     2033%%             & 979  & 2011-05-01 00:00:00 & 2011-08-01 00:00:00 & \\
     2034%%             & 980  & 2011-08-01 00:00:00 & 2011-11-01 00:00:00 & \\
     2035%%             & 981  & 2011-11-01 00:00:00 & 2019-04-01 00:00:00 & \\
     2036%%             & 982-1048 & 2010-01-25 00:00:00\tablenotemark{a} & 2011-04-25 23:59:59\tablenotemark{a} & B-mode \\
     2037%%             & 1049 & 2010-09-12 00:00:00 & 2011-05-01 00:00:00 & A-mode with OTA47fix \\
     2038%%   NOISEMAP  & 963  & 2008-01-01 00:00:00 & 2010-09-01 00:00:00 & \\
     2039%%             & 964  & 2010-09-01 00:00:00 & 2011-05-01 00:00:00 & \\
     2040%%             & 965  & 2011-05-01 00:00:00 & & \\
     2041%%   FLAT      & 300  & 2009-12-09 00:00:00 & & \gps{} filter \\
     2042%%             & 301  & 2009-12-09 00:00:00 & & \rps{} filter \\
     2043%%             & 302  & 2009-12-09 00:00:00 & & \ips{} filter \\
     2044%%             & 303  & 2009-12-09 00:00:00 & & \zps{} filter \\
     2045%%             & 304  & 2009-12-09 00:00:00 & & \yps{} filter \\
     2046%%             & 305  & 2009-12-09 00:00:00 & & \wps{} filter \\
     2047%%   FRINGE    & 296  & 2009-12-09 00:00:00 & & \\
     2048%%   ASTROM    & 1064 & 2008-05-06 00:00:00 & & \\
     2049%%   \enddata
     2050%%   \tablenotetext{a}{These dates mark the beginning and ending of the two-mode dark models, between which multiple dates use the B-mode dark.}
     2051%%   \label{tab:detrend list}
     2052%% \end{deluxetable*}
    18572053
    18582054\section{Warping}
     
    18612057\begin{figure*}[htpb]
    18622058  \centering
    1863   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/{warp.and.stack.demo}.pdf}
     2059\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/{warp.and.stack.demo}.pdf}
    18642060  \caption{Warping and Stacking Flowchart.  The diagram on the
    18652061    upper right shows an example of two neighboring GPC1 exposures
     
    19012097\begin{figure}[htpb]
    19022098  \centering
    1903   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/warp_2046019_sci\plotopt.png}
     2099\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/warp_2046019_sci\plotopt.png}
    19042100  \caption{Example of the warp image for skycell skycell.1146.095
    19052101    centered at ($\alpha,\delta$) = (11.934, -4.197) for exposure
     
    19142110\begin{figure}[htpb]
    19152111  \centering
    1916   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/warp_2046019_var\plotopt.png}
     2112\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/warp_2046019_var\plotopt.png}
    19172113  \caption{Example of the warp variance image for skycell
    19182114    skycell.1146.095 of exposure o5104g0266o, the same as in Figure
     
    19292125\begin{figure}[htpb]
    19302126  \centering
    1931   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/warp_2046019_mask.png}
     2127\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/warp_2046019_mask.png}
    19322128  \caption{Example of the warp mask image for skycell skycell.1146.095
    19332129    of exposure o5104g0266o, the same as in Figure \ref{fig:warp
     
    19922188change.
    19932189
    1994 \begin{figure}[t]
    1995   \centering
    1996   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_sci\plotopt.png}
    1997   \caption{Example of the stack image for skycell skycell.1146.095
    1998     centered at ($\alpha,\delta$) = (11.934, -4.197) in the \rps{}
    1999     filter, stack\_id 3956997.  This stack includes 39 input images
    2000     including o5104g0266o, the warp image in Figure \ref{fig:warp
    2001       image}, and has a combined exposure time of 1880s.  Combining
    2002     such a large number of input images removes the inter-cell and
    2003     inter-chip gaps, providing a fully populated image.  In addition,
    2004     the combined signal allows many more faint objects to be found
    2005     than were visible on the single frame warp image.}
    2006 
    2007   \label{fig:stack image}
    2008 \end{figure}
    2009 
    20102190The interpolation constructs the output pixels from more than one
    20112191input pixel, which introduces covariance between pixels.  For each
     
    20392219\label{sec:stacking}
    20402220
    2041 \begin{figure}[t]
    2042   \centering
    2043   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_var\plotopt.png}
    2044   \caption{Example of the stack variance image for skycell
    2045     skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
    2046     in the \rps{} filter, stack\_id 3956997.  The variance
    2047     map for this stack is reasonably smooth, with the mottled pattern
    2048     from the inter-chip and inter-cell gaps printing through.  Some
    2049     regions with higher variance are found where the number of inputs
    2050     is lower.}
    2051 
    2052   \label{fig:stack wt image}
    2053 \end{figure}
    2054 
    20552221Once individual exposures have been warped onto a common projection
    20562222system, they can be combined pixel-by-pixel regardless of their
     
    20752241detect inconsistent pixels even in the sensitive wings of bright objects.
    20762242
     2243\begin{figure}[t]
     2244  \centering
     2245\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_sci\plotopt.png}
     2246  \caption{Example of the stack image for skycell skycell.1146.095
     2247    centered at ($\alpha,\delta$) = (11.934, -4.197) in the \rps{}
     2248    filter, stack\_id 3956997.  This stack includes 39 input images
     2249    including o5104g0266o, the warp image in Figure \ref{fig:warp
     2250      image}, and has a combined exposure time of 1880s.  Combining
     2251    such a large number of input images removes the inter-cell and
     2252    inter-chip gaps, providing a fully populated image.  In addition,
     2253    the combined signal allows many more faint objects to be found
     2254    than were visible on the single frame warp image.}
     2255
     2256  \label{fig:stack image}
     2257\end{figure}
     2258
    20772259For the $3\pi$ survey, the stacked image is comprised of all warp
    20782260frames for a given skycell in a single filter.  The source catalogs
    20792261and image components are loaded into the \IPPprog{ppStack} program to
    20802262prepare the inputs and stack the frames.
    2081 
    2082 \begin{figure}[t]
    2083   \centering
    2084   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_mask.png}
    2085   \caption{Example of the stack mask image for skycell
    2086     skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
    2087     in the \rps{} filter, stack\_id 3956997.  The entire frame is
    2088     largely unmasked after combining inputs, with the only remaining
    2089     masks falling on the cores of bright stars, and in small regions
    2090     around the brightest objects where the overlapping of diffraction
    2091     spike masks have removed all inputs.}
    2092   \label{fig:stack mask image}
    2093 \end{figure}
    20942263
    20952264Once all files are ingested, the first step is to measure the size and
     
    21302299\begin{figure}[t]
    21312300  \centering
    2132   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_num\plotopt.png}
    2133   \caption{Example of the stack number image for skycell
     2301\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_var\plotopt.png}
     2302  \caption{Example of the stack variance image for skycell
    21342303    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
    2135     in the \rps{} filter, stack\_id 3956997.  This map shows
    2136     the number of inputs contributing to each pixel of the output
    2137     stack.  Again, the pattern of the inter-chip and inter-cell gaps
    2138     is visible, along with other mask features. }
    2139 
    2140   \label{fig:stack num image}
     2304    in the \rps{} filter, stack\_id 3956997.  The variance
     2305    map for this stack is reasonably smooth, with the mottled pattern
     2306    from the inter-chip and inter-cell gaps printing through.  Some
     2307    regions with higher variance are found where the number of inputs
     2308    is lower.}
     2309
     2310  \label{fig:stack wt image}
    21412311\end{figure}
    21422312
     
    21692339convolution kernel is returned.
    21702340
     2341\begin{figure}[t]
     2342  \centering
     2343\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_mask.png}
     2344  \caption{Example of the stack mask image for skycell
     2345    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
     2346    in the \rps{} filter, stack\_id 3956997.  The entire frame is
     2347    largely unmasked after combining inputs, with the only remaining
     2348    masks falling on the cores of bright stars, and in small regions
     2349    around the brightest objects where the overlapping of diffraction
     2350    spike masks have removed all inputs.}
     2351  \label{fig:stack mask image}
     2352\end{figure}
     2353
    21712354This convolution may change the image flux scaling, so the kernel is
    21722355normalized to account for this.  The normalization factor is equal to
     
    21742357kernel.  The image is multiplied by this factor, and the variance by
    21752358the square of it, scaling all inputs to the common zeropoint.
    2176 
    2177 \begin{figure}[t]
    2178   \centering
    2179   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_exp\plotopt.png}
    2180   \caption{Example of the stack exposure time image for skycell
    2181     skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
    2182     in the \rps{} filter, stack\_id 3956997.  Since the input
    2183     exposures had exposures times of 40 and 60 seconds, the pattern
    2184     observed here similar to, but subtly different from the number
    2185     map.}
    2186   \label{fig:stack exp image}
    2187 \end{figure}
    21882359
    21892360Once the convolution kernels are defined for each image, they are used
     
    22182389image:
    22192390
     2391\begin{figure}[t]
     2392  \centering
     2393\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_num\plotopt.png}
     2394  \caption{Example of the stack number image for skycell
     2395    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
     2396    in the \rps{} filter, stack\_id 3956997.  This map shows
     2397    the number of inputs contributing to each pixel of the output
     2398    stack.  Again, the pattern of the inter-chip and inter-cell gaps
     2399    is visible, along with other mask features. }
     2400
     2401  \label{fig:stack num image}
     2402\end{figure}
     2403
    22202404\begin{eqnarray}
    22212405  \mathrm{Stack}_\mathrm{value} &=& \sum_i\left(\mathrm{value}_\mathrm{input} \times W_\mathrm{input}\right) / \sum_\mathrm{inputs}\left(W_\mathrm{input}\right) \\
     
    22312415The output mask value is taken to be zero (no masked bits), unless
    22322416there were no valid inputs, in which case the BLANK mask bit is set.
    2233 
    2234 \begin{figure}[t]
    2235   \centering
    2236   \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_expwt\plotopt.png}
    2237   \caption{Example of the stack weighted exposure image for skycell
    2238     skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
    2239     in the \rps{} filter, stack\_id 3956997.  This map shows
    2240     the weighted average exposure time, as described in the text.  It
    2241     is similar to the simple exposure time map, but shows how some
    2242     input exposures have their contributions weighted down due to the
    2243     observed larger image variances.}
    2244   \label{fig:stack exp wtimage}
    2245 \end{figure}
    22462417
    22472418Due to uncorrected artifacts that can occur on GPC1, and the fact that
     
    22642435higher pixel value outliers than lower pixel values, as described below.
    22652436
     2437\begin{figure}[t]
     2438  \centering
     2439\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_exp\plotopt.png}
     2440  \caption{Example of the stack exposure time image for skycell
     2441    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
     2442    in the \rps{} filter, stack\_id 3956997.  Since the input
     2443    exposures had exposures times of 40 and 60 seconds, the pattern
     2444    observed here similar to, but subtly different from the number
     2445    map.}
     2446  \label{fig:stack exp image}
     2447\end{figure}
     2448
    22662449Following the initial combination, a ``testing'' loop iterates in an
    22672450attempt to identify outlier points.  Again, if only one input is
     
    23092492  \mathrm{limit}_\mathrm{default} &=& 4^2 \times (\sigma^2_\mathrm{input} + (0.1 \times \mathrm{value}_\mathrm{input})^2)
    23102493\end{eqnarray}
     2494
     2495\begin{figure}[t]
     2496  \centering
     2497\SKIP \includegraphics[width=0.9\hsize,angle=0,clip]{\picdir/stack_3956997_expwt\plotopt.png}
     2498  \caption{Example of the stack weighted exposure image for skycell
     2499    skycell.1146.095 centered at ($\alpha,\delta$) = (11.934, -4.197)
     2500    in the \rps{} filter, stack\_id 3956997.  This map shows
     2501    the weighted average exposure time, as described in the text.  It
     2502    is similar to the simple exposure time map, but shows how some
     2503    input exposures have their contributions weighted down due to the
     2504    observed larger image variances.}
     2505  \label{fig:stack exp wtimage}
     2506\end{figure}
    23112507
    23122508Each input pixel is then compared against this limit, and the most
Note: See TracChangeset for help on using the changeset viewer.