abstract: The main obstacles for the practical deployment of DNA-based data storage platforms are the prohibitively high cost of synthetic DNA and the large number of errors introduced during synthesis. In particular, synthetic DNA products contain both individual oligo (fragment) symbol errors as well as missing DNA oligo errors, with rates that exceed those of modern storage systems by orders of magnitude. These errors can be corrected either through the use of a large number of redundant oligos or through cycles of writing, reading, and rewriting of information that eliminate the errors. Both approaches add to the overall storage cost and are hence undesirable. Here we propose the first method for storing quantized images in DNA that uses signal processing and machine learning techniques to deal with error and cost issues without resorting to the use of redundant oligos or rewriting. Our methods rely on decoupling the RGB channels of images, performing specialized quantization and compression on the individual color channels, and using new discoloration detection and image inpainting techniques. We demonstrate the performance of our approach experimentally on a collection of movie posters stored in DNA.
address: $^{1}$University of Illinois, Urbana-Champaign, $^{2}$Dorna Robotics
bibliography: refs.bib
title: Image Processing in DNA

# Introduction

DNA-based data storage has recently emerged as a viable alternative to classical storage devices that can be used to record bits at a nanoscale level and preserve them in a nonvolatile fashion for thousands of years . Almost all existing DNA-based data recording architectures store user content in synthetic DNA strands of length $100-1000$ basepairs, organized within large unordered pools, and retrieve desired information via next-generation (e.g., HiSeq and MiSeq) or third-generation nanopore sequencing. Although DNA sequencing can be performed at a very low cost, de novo synthesis of DNA oligos with a predetermined content still represents a major bottleneck of the platform. Synthetic DNA platforms are prohibitively expensive compared to existing optical and magnetic media . Furthermore, synthetic DNA-based storage systems have error-rates of the order of $10^{-3}$ that by far exceed those of existing high-density recorders. Synthesis errors include both symbol errors as well as *missing oligo errors* which are unique to this type of storage media and refer to the fact that one may not be able to cover all substrings of the user-defined string. Missing oligos represent serious obstacles to accurate data retrieval as they may affect more than $20\%$ of the product. To address this type of error, Grass et al.  proposed using Reed-Solomon codes at both the oligo and pool of oligo level to ensure that missing strings may be reconstructed from combinations of redundantly encoded oligos. Unfortunately, adding redundant oligos further increases the cost of the system as the oligos have to be sequenced to determine the missing oligo rate in order to add the correct amount of redundancy.

We propose a new means of archiving images in DNA in which the missing and erroneous oligos are corrected through specialized learning methods, rather than expensive coding redundancy. The gist of our approach is to first aggressively quantize and compress colored images by specialized encoding methods that separately operate on the three color channels, RGB. Our quantization scheme reduces the image color pallet to $8$ intensity levels per channel, and compresses intensity levels through a combination of Hilbert-space filling curves, differential and Huffman coding. Given that compression may lead to catastrophic error-propagation in the presence of missing or mismatched oligos, we also introduce very sparsely spaced markers into the oligo codes in order to resynchronize positional pixel information when this is lost. No error-correcting redundancy is added to the pool in order to further save in synthesis cost, and instead, the retrieved corrupted images are subjected to specialized image processing techniques that lead to barely distorted outputs. Our scheme combines automatic detection of discolorations in images with inpainting based on EdgeConnect  and smoothing via bilateral filtering . We experimentally tested our proposed DNA image processing scheme on a pool of $11,826$ oligos of length $196$ basepairs each, purchased from Integrated DNA Technologies (IDT).

The paper is organized as follows. Section  contains a description of our color image encoding scheme, while Section  describes the oligo synthesis, amplification, image processing procedures and experimental results.

# The encoding procedure

Our two-step encoding procedure first translates an image file into $24$ binary strings, and then converts the binary strings into DNA oligos for storage and amplification. A detailed description of each step used in the process is provided below.

**Converting image files to binary strings.** The first step in the procedure is *RGB channel separation and quantization.* First, we split the color images into three color channels, R (red) G (green) B (blue), and then perform $3$-bit quantization of the values in each channel. More precisely, the image $I$ is represented by a three-dimension tensor of size $m\times n\times 3$, i.e., $I\in [256]^{m\times n\times 3}$, which we split into three matrices $\textbf{R}, \textbf{G}, \textbf{B}$ of size $m\times n$ each. Next, we perform $3$-bit quantization of each color matrix, leading to intensity values mapped from $0-255$ to $0-7$. More specifically, we use the following quantization rule for all three channels: $$\textbf{X}[p,q] = \text{floor}\left(\frac{\textbf{X}[p,q]\times 8}{256}\right)\quad \forall p\in[m],q\in[n],$$ where $\textbf{X}\in[8]^{m\times n}$ is the quantized matrix for $\textbf{X} \in \{{\textbf{R},\textbf{G},\textbf{B}\}}$.

**Converting 2D images into 1D oligo strings.** There exist several methods for converting a matrix into a string so as to nearly-optimally preserve 2D image distances in the 1D domain, such as the Hilbert and Peano space-filling curve. The Hilbert space-filling curve, shown in Figure , provides a good means to capture 2D locality  and is the method of choice in our conversion process. Note that the Hilbert curve is standardly used on square images, so we adapt the transversal implementation to account for matrices with arbitrary dimensions (the detailed description of the mapping is postponed to the full version of the paper). After the mapping, the matrices $\textbf{R},\textbf{G},\textbf{B}$ are converted into vectors $V_R,V_G,V_B$, respectively.

**Partitioning color channels according to levels.** Upon quantization, the values in $V_R,V_G,V_B$ lie in $\{{0,\ldots,7\}}$. We next decompose each vector into strings of possibly different lengths according to the intensity value. Specifically, $V_R$ is decomposed into $L_{R,0},\dots,L_{R,7}$, where the vector $L_{R,j}$ contains the indices of the elements in $V_R$ whose value equals $j$, $j\in[8]$; the same procedure is performed for the vectors $V_G,V_B$. An example decomposition may read as: $$V_R=[0,0,0,1,7,6,7,7,\dots] \longrightarrow
\begin{matrix}
L_{R,0} = [0,1,2,\dots] \\
\vdots \\
L_{R,7} = [4,6,7,\dots]
\end{matrix}$$ Note that the elements in $V_i$ are assigned to $L_{i,j}$ in order, $i\in\{R,G,B\}$, $0\leq j\leq 7$. Hence each vector $L_{i,j}$ contains increasing values, a fact that we exploit in our reconstruction procedure. Given the Hilbert scan, one may expect the differences between adjacent entries in each of the vectors $L_{i,j}$ to be small with high probability. Therefore, splitting a vector into individual levels enables subsequent differential encoding . Moreover, since the level information is split among different vectors, we will also be able to correct distortions in the images in the presence of errors. In summary, after the RGB decomposition and level partition, each image is represented by $24$ vectors. **Differential encoding** converts a string into another string containing the initial value of the original and the differences between consecutive values, summarized in vectors denoted by $D_{i,j}$. In order to prevent catastrophic error propagation, we set $3\%$ of the values in each $D_{i,j}$ to their original undifferentiated values and prepend to them the symbol $-1$. We also append an additional $-2$ to each $D_{i,j}$ to indicate the end of the vector. For example, a typical pair of $L_{i,j}$ and $D_{i,j}$ may be of the form: $$\begin{matrix}
L_{i,j} = [x_1,x_2,\dots,x_{31},x_{32},\dots] \\
\downarrow \\
D_{i,j} = [-1,x_1,x_2-x_1,\dots,-1,x_{31},x_{32}-x_{31},\dots,-2].
\end{matrix}$$ Note that as $L_{i,j}$ has increasing values, the symbols $-1$ and $-2$ cannot be confused with information-bearing values in $D_{i,j}$. **Huffman coding**  is performed after differential coding, and all values in $D_{i,j}$ are used to construct the Huffman code dictionary. This results in a collection of binary strings $B_{i,j},$ $i\in\{R,G,B\}$, $0\leq j\leq 7$.

**Conversion of binary strings into DNA oligos.** The binary information is converted into oligo strings over the alphabet $\{{\text{A,T,G,C}\}}$ of length $196$ nucleotides. Each oligo contains a unique block-id for its position in the original string. If needed, some strings are padded with dummy values to ensure uniform lengths. Once again, $-2$ is used to indicate the end of the vector. In addition, each DNA oligo includes a prefix primer, address, an information block and suffix primer.

**Mapping binary sequences to DNA blocks.** To ensure a high quality of the synthetic product, we perform constraint coding by imposing a maximum runlength-$3$ constraint for the symbols C and G and ensuring a GC content in the range $40-60\%$ . The constrained coder maps $18$ and $22$-bit sequences into $10$ and $13$ nucleotide DNA oligos, respectively. This constrained code, along with the color code, is the only source of redundancy in the encoding procedure.

**Primer sequences.** We add to each DNA oligo a prefix and suffix primer, used for PCR amplification of the single stranded DNA oligos. To allow for random access, we choose $8$ pairs of primers of length $20$, one for each level, all of which are at a Hamming distance $\geq 10$ nucleotides. The primers are paired up so as to have similar melting temperature, which allows for all oligos to be amplified in the same cycle.

**Address sequences.** Strings of length $13$ are added to the DNA oligos following the primers in order to represent the address of the information blocks contained. The first $3$ nucleotides of the address encode the color (RGB). Since color information is highly important for reconstruction, we present it in redundant form as R = 'ATC', G = 'TCG', B = 'GAT'. This allows for single-error correction in the color code. The second part of the address is of length $10$ nucleotides, encoding a $18$-bit binary string including the index of the corresponding image file, the index of the color level and the index of the information block within that level.

**Information blocks** are added to the oligos between the address and suffix primer, including $11$ blocks of length $13$ nucleotides. The total length of the information block is $143$ nucelotides. Overall, with the compression scheme and additional addressing information added, $8,654,400$ bits of the original images are converted into $2,317,896$ nucleotides. The encoding steps are summarized in Figure .

# DNA image processing and experiments

The $11,826$ DNA oPools oligos were ordered from IDT (https://www.idtdna.com/pages/products/custom-dna-rna/dna-oligos/custom-dna-oligos/opools-oligo-pools). They were PCR amplified and the PCR products were then converted into a shotgun sequencing library with the Hyper Library construction kit from Kapa Biosystems (Roche). The library was quantitated by qPCR and sequenced on one ISeq flowcell for $251$ cycles from one end of the fragments. The fast file was generated with the Illumina bcl2fastq v2.20 Conversion Software. As each oligo read may contain errors that arise both during synthesis and sequencing, we first *reconstructed a consensus sequence* via sequence alignment to exploit the inherent redundancy of the read process. After the whole writing, reading and consensus process, we obtained $10,981$ perfectly reconstructed oligos, $745$ oligos with symbol errors that do not cause obvious defects in the reconstructed images, and $100$ oligos with large corruption levels or completely missing from the pool.

The decoding procedure operates on the consensus reads and reverses the two-step encoding process. Due to lack of space, a detailed description of the procedure is omitted.

**Converting DNA consensus strings into binary strings.** If some oligo unique identifiers are corrupted by errors during the synthesis or sequencing process, we replace the erroneous identifier by a unique string at smallest Hamming distance from it. Each DNA block is converted into some binary string, although this string may be wrong and cause visible discolorations in the image.

**Image processing.** An example illustrating the image corruptions caused by erroneous/missing oligos is shown in Figure . Small blocks with the wrong color can be easily observed visually, and they are a consequence of only $10$ missing oligos. To correct the discolorations automatically, we propose a three-part image processing procedure. The first step consists in detecting the locations with discolorations, masking the regions with discolorations and subsequently treating them as missing pixels. The second step involves using deep learning techniques to inpaint the missing pixels. The third step involves smoothing the image to reduce both blocking effects caused by aggressive quantization and the mismatched inpainted pixels.

**Automatic discoloration detection.** To the best of our knowledge, detecting arbitrarily shaped discolorations is a difficult problem in computer vision that has not been successfully addressed for classical image processing systems. This is due to the fact that discolored pixels usually have simultaneous distortions in all three color channels of possibly different degrees. However, detecting discolorations in DNA-encoded images is possible since with high probability, only one of the three color channels will be corrupted due to independent encoding of the RGB components. Figure  illustrates this fact, as erroneous pixels in different channels do not overlap. Within the correct color channels, pixels have neighbors of similar level, while within the erroneous channel, pixels have values that differ significantly from those of their neighbors. Figures  (a)(b)(c) illustrates that pixels with the smallest $t=15$ frequencies in the difference vectors indeed correspond to almost all erroneous regions in the red channel. The results of our detection scheme are depicted in Figure (d)(e), for $t=18$. Note that the whitened out regions are treated as missing data, and filled in using inpainting techniques.

**Image inpainting,** or image completion, is a method for filling out missing regions in an image. There exist several methods for image inpainting currently in use, including diffusion-based, patch-based  and deep learning approaches . The former two methods use local or non-local information only within the target image itself which leads to poor performance when trying to recover complex details in large images. On the other hand, deep-learning methods such as EdgeConnect combine edges in the missing regions with color and texture information from the remainder of the image to fill in the missing pixels. Since the encoded movie posters have obvious edge structures, we inpainted the images using EdgeConnect with the result shown in Figure (a).

**Smoothing.** Although the problem of discoloration may be addressed through inpainting, the reconstructed images still suffer from mismatched inpaints and blocking effect caused by quantization. To further improve the image quality we perform smoothing through bilateral filtering  that tends to preserve the edges structures. The smoothing equations read as: $$\begin{aligned}
\hat{I}[i,j] &= \frac{\sum_{[k,l]\in\Omega}I[k,l]w(i,j,k,l)}{\sum_{[k,l]\in\Omega}w(i,j,k,l)}, \notag \\
w(i, j, k, l) &=\exp \left(-\frac{(i-k)^{2}+(j-l)^{2}}{2 \sigma_{d}^{2}}-\frac{\|I[i, j]-I[k, l]\|^{2}}{2 \sigma_{r}^{2}}\right), \notag
\end{aligned}$$ where $I$ denotes the original image and $\hat{I}$ the filtered image, $\Omega$ is some predefined window centered at the coordinates $[i,j]$, and $\sigma_r$ and $\sigma_d$ are parameters that control the smoothing differences for intensities and coordinates, respectively. The filter performs Gaussian blurring on background regions but respects edge boundaries in the image. The result of smoothing with $\sigma_d^2=\sigma_r^2=45$ and $\Omega$ of the form of a $9\times 9$ square is shown in Figure (b), and no obvious discolorations are detectable. Furthermore, in order to address other possible impairments, we also used the positions of error blocks obtained from the discoloration detection platfrom to perform adaptive median smoothing around erroneous regions. The output of this iterative process is illustrated in Figure (c)(d).


abstract: This paper describes the use of the   class file for setting papers for the **.
address: John Wiley & Sons, Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, UK
author: A. N. Other
title: A demonstration of the  class file for the **

# Introduction

Many authors submitting to research journals use  to prepare their papers. This paper describes the  class file which can be used to convert articles produced with other  class files into the correct form for publication in the **.

The  class file preserves much of the standard  interface so that any document which was produced using the standard  article style can easily be converted to work with the  style. However, the width of text and typesize will vary from that of article.cls; therefore, *line breaks will change* and it is likely that displayed mathematics and tabular material will need re-setting.

In the following sections we describe how to lay out your code to use  to reproduce the typographical look of the **. However, this paper is not a guide to using  and we would refer you to any of the many books available (see, for example, ).

# The Three Golden Rules

Before we proceed, we would like to stress *three golden rules* that need to be followed to enable the most efficient use of your code at the typesetting stage:

1.  keep your own macros to an absolute minimum;

2.  as TeX is designed to make sensible spacing decisions by itself, do *not* use explicit horizontal or vertical spacing commands, except in a few accepted (mostly mathematical) situations, such as `\,` before a differential d, or `\quad` to separate an equation from its qualifier;

3.  follow the ** reference style.

# Getting Started

The  class file should run on any standard  installation. If any of the fonts, style files or packages it requires are missing from your installation, they can be found on the *TeX Collection* DVDs or from CTAN.

** is published using Times fonts and this is achieved by using the `times` option as
`\documentclass[times]{fldauth}`.

If for any reason you have a problem using Times you can easily resort to Computer Modern fonts by removing the `times` option.

# The Article Header Information

The heading for any file using  is shown in Figure .

## Remarks

1.  In `\runningheads` use '*et al.*' if there are three or more authors.

2.  Note the use of `\affil` and `\affilnum` to link names and addresses. The author for correspondence is marked by `\corrauth` and `\corraddr` is used to give that author's address, which will be printed as a footnote, prefaced by 'Correspondence to:'.

3.  For submitting a double-spaced manuscript, add `doublespace` as an option to the documentclass line.

4.  Use `\cgs` for giving details of financial sponsors; alternatively use `\cgsn` if the grant number is also to be included. These details will be printed as a footnote, with 'Contract/grant sponsor:' and 'contract/grant number:' inserted in the appropriate places.

5.  The abstract should be capable of standing by itself, in the absence of the body of the article and of the bibliography. Therefore, it must not contain any reference citations.

6.  Keywords are separated by semicolons.

# The Body of the Article

## Mathematics

 makes the full functionality of TeX available. We encourage the use of the `align`, `gather` and `multline` environments for displayed mathematics. amsthm is used for setting theorem-like and proof environments. The usual `\newtheorem` command needs to be used to set up the environments for your particular document.

## Figures and Tables

 includes the graphicx package for handling figures.

Figures are called in as follows:

    \begin{figure}
    \centering
    \includegraphics{
}
    \caption{
}
    \end{figure}

For further details on how to size figures, etc., with the graphicx package see, for example, or . If figures are available in an acceptable format (for example, .eps, .ps) they will be used but a printed version should always be provided.

The standard coding for a table is shown in Figure .

## Cross-referencing

The use of the LaTeX cross-reference system for figures, tables, equations, etc., is encouraged (using `\ref{<name>}` and `\label{<name>}`).

## Acknowledgements

An Acknowledgements section is started with `\ack` or `\acks` for *Acknowledgement* or *Acknowledgements*, respectively. It must be placed just before the References.

## Bibliography

The normal commands for producing the reference list are:

    \begin{thebibliography}{99}
    \bibitem{<x-ref label>}
             <Reference details>
    .
    .
    .
    \end{thebibliography}

where `\bibitem{x-ref label}` corresponds to `\cite{x-ref label}` in the body of the article and `{99}` is the widest such number expected and determines the width of the number column in the reference list.

Please note that the file wileyj.bst is available from the same download page for those authors using B-.05em i-.025em b-.08em T-.1667em.7ex-.125emX.

## Double Spacing

If you need to double space your document for submission please use the `doublespace` option as shown in the sample layout in Figure .

# Support for

We offer on-line support to participating authors. Please contact us via e-mail at
[`firstname.lastname@example.com`](mailto:firstname.lastname@example.com).

We would welcome any feedback, positive or otherwise, on your experiences of using .

# Copyright Statement

Please be aware that the use of this  class file is governed by the following conditions.

## Copyright

Copyright © 2010 John Wiley & Sons, Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, UK. All rights reserved.

## Rules of Use

This class file is made available for use by authors who wish to prepare an article for publication in the ** published by John Wiley & Sons, Ltd. The user may not exploit any part of the class file commercially.

This class file is provided on an *as is* basis, without warranties of any kind, either express or implied, including but not limited to warranties of title, or implied warranties of merchantablility or fitness for a particular purpose. There will be no duty on the author\[s\] of the software or John Wiley & Sons, Ltd to correct any errors or defects in the software. Any statutory rights you may have remain unaffected by your acceptance of these rules of use.

This class file was developed by Sunrise Setting Ltd, Torquay, Devon, UK. Website:
[`www.sunrise-setting.co.uk`](http://www.sunrise-setting.co.uk)


**XROM and RCOM: Two New OGLE-III Real Time Data Analysis Systems** **A.   U d a l s k i** Warsaw University Observatory, Al. Ujazdowskie 4, 00-478 Warszawa, Poland
e-mail: email@example.com

ABSTRACT

We describe two new OGLE-III real time data analysis systems: XROM and RCOM. The XROM system has been designed to provide continuous real time photometric monitoring of the optical counterparts of X-ray sources while RCOM system provides real time photometry of R Coronae Borealis variable stars located in the OGLE-III fields. Both systems can be used for triggering follow-up observations in crucial phases of variability episodes of monitored objects.

 *Surveys – Techniques: photometric – X-rays: stars – Stars: AGB and post-AGB*

# Introduction

The Optical Gravitational Lensing Experiment (OGLE) is a long term large scale sky survey regularly monitoring the most dense stellar fields in the sky (Udalski *et al. *1992, Udalski, Kubiak and Szymañski 1997, Udalski 2003). The OGLE project started originally in 1992 as a first generation microlensing survey and contributed in its subsequent phases to many fields of modern astrophysics like stellar astrophysics, extrasolar planet searches, gravitational lensing and others. Huge databases of photometric measurements of hundreds of millions stars spanning several years provide a unique opportunity for data mining, performing statistical analyzes of huge samples of particular objects or conducting analysis of long term behavior of selected classes of stars.

One of the most important results of the OGLE survey was the implementation of real time data analysis systems that allow monitoring of selected variable objects in almost real time. Advantages of this approach are obvious, especially in the case of transient or non-periodic variable objects. For instance, one can carefully prepare different kind of follow-up observations, knowing current photometric behavior of a selected object. Microlensing field is the best example here. The OGLE project was the first to implement the so called Early Warning System (EWS, Udalski *et al. *1994) – the system that detected on-going microlensing events in their early phases. Information on such events was made public. Several microlensing follow-up teams were formed in the several past years to observe intensively the already discovered ongoing microlensing phenomena. This strategy turned out to be very successful leading to the important discoveries like microlensing extrasolar planets (Udalski *et al. * 2005, Beaulieu *et al. *2006, Gould *et al. *2006, Gaudi *et al. *2008) or Magellanic Cloud microlensings (Afonso *et al. *2000, Dong *et al. *2007).

OGLE-III phase of the OGLE project, that started on June 12, 2001 and has been conducted up to now, was a significant extension of the OGLE survey. Much larger observing capabilities made it possible to cover practically entire area of the LMC and SMC and large fraction of the Galactic bulge. Also new data analysis systems were implemented during this phase (Udalski 2003). Beside the EWS system allowing the discovery of about 600 microlensing events every year, two new systems were developed after the first four seasons of the OGLE-III phase: EEWS and NOOS.

The EEWS system was designed to detect in the real time anomalies of microlensing events from a single mass microlensing. The implementation of this system became an important step – thanks to it the vast majority of non-standard microlensing events, including many planetary microlensings, were detected in almost real time and the information was passed to other microlensing groups. EEWS system also allowed to switch the OGLE observing mode from the standard survey mode to follow up mode where the observations of a particular object were done with much higher cadence – dependent on the variability rate.

The second real time system NOOS (Udalski 2003) was designed to detect in real time the transient stellar objects that brighten strongly enough to be seen in the OGLE images for some time. This class of objects include supernovae (SNe), long term variable stars, microlensing of very faint stars (non-detectable in the regular OGLE photometry range) etc. A few new SNe were detected soon after the implementation of this system (Udalski 2004).

Finally, the real time monitoring of the Einstein Cross gravitational lens (QSO 2237+0305) provides the real time photometry of four images of the quasar. This object is one of the most important gravitational lenses and unique OGLE photometric dataset (Wo¼niak *et al. *2000, Udalski *et al. *2006) was often used for its modeling. Continuous monitoring of the quasar images allows early detection of potential caustic crossings or cusp approaches in this lens. These events are crucial for proper modeling and understanding the gravitational lenses and provide an opportunity to estimate the quasar size.

In this note we present two new real time OGLE-III data analysis systems implemented recently: XROM and RCOM. They allow real time monitoring of selected classes of highly variable optical objects. The photometry provided by these systems is available to the astronomical community from the OGLE Internet archive.

# XROM: X-Ray Variables OGLE Monitoring System

X-ray astronomy is one of the most rapidly developing branches of modern astrophysics. New space missions provide more and more exciting data in this wavelenght range and the data flow accelerates. Nevertheless in the majority of cases the proper interpretation of observed X-ray behavior of detected objects requires observations in other wavelengths as well, including the optical range.

The dense OGLE-III fields like the Magellanic Clouds or Galactic bulge include many X-ray sources. Part of them has been successfully identified with the optical counterparts. For example, the SMC contains a large sample of X-ray pulsars discovered during the past few years (Coe *et al. * 2005). OGLE data has already been used for interpretation of some of these objects (Coe *et al. *2005, McGowan *et al. *2008).

Continuous optical monitoring of counterparts of X-ray sources is very important, as many of them undergo large optical variations, eruptions etc. likely related to the X-ray activity. Therefore, many planned X-ray follow-up observations may be much better tuned-up when the current optical state and behavior of these objects is known.

The OGLE-III XROM system provides continuous photometric coverage of a selected sample of known optical counterparts of X-ray sources located in the OGLE-III fields. The initial sample contains 52 objects. It can be easily extended with other or newly detected objects. Photometry of the XROM objects is typically updated after each clear night. Fig. 1 presents the OGLE-III light curve of one of such objects: SXP 756.

The interactive access to the XROM objects is provided *via* the main OGLE WWW page:

*http://ogle.astrouw.edu.pl*

The structure of the page is similar to other OGLE real time system pages. After selecting an object, the object page is invoked providing the basic information: its OGLE identification, RA/DEC coordinates, finding chart and two light curve plots: one showing the entire light curve and the second one showing the last 60 days. The photometry is obtained through the *I*-filter and it is only roughly calibrated with accuracy of the zero points of $\pm0.1{-}0.2$ mag.

The photometry can be download from the OGLE archive:

*ftp://ftp.astrouw.edu.pl/ogle3/xrom*

# RCOM: OGLE Real Time Monitoring of R CrB Variable Stars

R CrB stars form a group of stars that reveal dramatic variability episodes. Their brightness can fade by a few magnitudes in the time scale of several days. These fading episodes are unpredictable and can last for months. After that period the brightness of these stars gradually recovers to the original state.

It is believed that fading is related to the formation of dust clouds over the surface of these stars. When they disperse the brightness returns to the unobscured level. Some such clouds were directly observed. R CrB variables are very small group of stars – only about 50 is known in the Galaxy (Tisserand *et al. *2008) and about 20 in the Magellanic Clouds (Alcock *et al. *2001, Tisserand *et al. *2004).

R CrB stars provide an opportunity of studying the late stages of stellar evolution. To clarify their evolutionary status extensive follow-up observations are needed in the most dramatic fading or rising phases of the variability episodes. As the episodes are unpredictable only continuous observations of R CrB variables may trigger such follow-up programs.

OGLE-III fields are ideal for the real time data analysis system monitoring R CrB variables. They contain many R CrB stars, both in the Magellanic Clouds and the Galactic bulge. The RCOM system was designed to continuously monitor a sample of R CrB stars from the OGLE-III fields. Initially the sample consists of 23 objects but it can be extended when the new objects are detected. Unfortunately most of the known R CrB stars in the Galactic bulge are saturated in the OGLE-III reference images, therefore their photometry is not available. Fig. 2 shows an example of the light curve of one of the R CrB objects monitored by the CROM system, MACHO-051551.8-691008.

The interactive access to the RCOM objects is provided *via* the main OGLE WWW page:

*http://ogle.astrouw.edu.pl*

The structure of the page and provided information are identical as for the XROM system.

The photometry can be download from the OGLE archive:

*ftp://ftp.astrouw.edu.pl/ogle3/rcom*

This paper was partially supported by the Polish MNiSW grant N20303032/4275. We thank Drs. Malcolm Coe, Matthew Schurch and Peter Cottrell for encouraging us to design and implement presented systems.

# REFERENCES


abstract: We have used the Hubble Space Telescope's Advanced Camera for Surveys to measure the cumulative mass density in morphologically-selected early-type galaxies over the redshift range $0.8<z<1.7$. Our imaging data set covers four well-separated sight-lines, and is roughly intermediate (in terms of both depth and area) between the GOODS/GEMS imaging data, and the images obtained in the Hubble Deep Field campaigns. Our images contain 144 galaxies with ultra-deep spectroscopy obtained as part of the Gemini Deep Deep Survey. These images have been analyzed using a new purpose-written morphological analysis code which improves the reliability of morphological classifications by adopting a 'quasi-Petrosian' image thresholding technique. We find that at $z\sim1$ about 80% of the stars living in the most massive galaxies reside in early-type systems. This fraction is similar to that seen in the local Universe. However, we detect very rapid evolution in this fraction over the range $0.8<z<1.7$, suggesting that over this redshift range the strong morphology-mass relationship seen in the nearby Universe is beginning to fall into place. By comparing our images to published spectroscopic classifications, we show that little ambiguity exists in connecting spectral classes to morphological classes for spectroscopically quiescent systems. However, the mass density function of early-type galaxies is evolving more rapidly than that of spectroscopically quiescent systems, which we take as further evidence that we are witnessing the formation of massive early-type galaxies over the $0.8<z<1.7$ redshift range.
author: Roberto G. Abraham, Preethi Nair; Patrick J. McCarthy; Karl Glazebrook; Erin Mentuch; Haojing Yan; Sandra Savaglio; David Crampton, Richard Murowinski; Stephanie Juneau; Damien Le Borgne, R. G. Carlberg; Inger Jørgensen, Kathy Roth; Hsiao-Wen Chen; Ronald O. Marzke
title: The Gemini Deep Deep Survey: VIII. When Did Early-type Galaxies Form?

# INTRODUCTION

The study of galaxy formation and evolution is one of the most active interfaces between observation and theory in contemporary astrophysics. Sophisticated numerical simulations have elucidated the key role of dark matter in driving the formation of structure , while the most recent generation of simulations incorporate gas dynamics and highlight the role of feedback . A number of recent galaxy surveys allow one to trace the evolution of stellar systems from high redshift to their present-day counterparts . The combination of deep imaging surveys with the Hubble Space Telescope (HST) and ground based spectroscopic surveys play a special role, as they provide both structural information and stellar content for galaxies to early epochs .

Large area shallow surveys (e.g. SDSS) have provided a detailed census of galaxies in the local volume by luminosity, stellar mass, and stellar content . There is a remarkably strong correlation between the structural properties of galaxies, as quantified by the Hubble type for example, stellar content as revealed by integrated spectra, and stellar mass. Galaxies with stellar masses $> 3 \times 10^{10}$M$_{\odot}$ have colors and spectra indicative of primarily passive evolution, while lower mass galaxies have blue colors and spectral features indicative of on-going star formation . The red sequence galaxies are spheroid dominated, the blue sequence galaxies are primarily disk and irregular systems. Understanding the origin of the tight connection between spectral and morphological classes and their mass dependence is critical to a complete picture of galaxy formation and evolution.

Intermediate depth surveys with HST combined with ground-base spectroscopy have shown that the Hubble sequence is largely in place at $z \sim 1$ . At higher redshifts, deep surveys (e.g. GOODS) reveal galaxies with structures that are not easily classified into disks and spheriods . This trend is even stronger in small area ultra-deep surveys e.g.the Hubble Deep and Ultra-Deep Fields) , although some large disks were present at $z \sim 2.5$ . Red and Near-IR surveys have shown that the red sequence of massive galaxies was in place at $z \sim 1$, although with number densities lower than today by a factor of $\sim 1.5 - 3$ . Thus it appears that the galaxies acquired their present day morphologies in the $1 < z < 3$ epoch.

The onset of the strong correlation between morphology and stellar content and its dependance on mass is not as well constrained. One of the primary goals of the Gemini Deep Deep Survey was to use stellar-mass-selected samples to probe galaxy evolution in the critical $1 < z < 2$ range. The GDDS and other samples have shown that the total stellar mass density evolves mildly for $z < 1.5$ and that the high-mass end in particular is slowly evolving . Many of the most massive galaxies at $z < 2$ have red optical-to-near-IR colors and spectra dominated by old stellar populations . In this paper we examine the evolution of the stellar mass density as a function of morphological and spectral types using the GDDS spectra and deep HST/ACS imaging. Our analysis is aided by the use of quantitative morphological measurements obtained using a new 'quasi-Petrosian' threshold technique. This allows us to derive robust morphologies over a range of redshifts and apparent magnitudes. We show that the correlation between morphology and spectral class remains strong for passively evolving objects at $z \sim 1.5$ and that the mass densities in spheroids (defined by morphology) and passive systems (defined by stellar content) evolve steeply in the $1 < z < 1.5$ range. These results strongly suggest that the core formation epoch for massive spheroids is drawing to a close in this interval. Signatures of major mergers in the passive population appear to have faded by $z \sim 1.5$ or higher, and subsequent mass evolution at $z < 1$ apparently does not significantly disturb the spectral-morphology correlation. In a subsequent paper we will extend these results to $z \sim 2$ by using NICMOS to explore the rest-frame visible morphologies of the most distant passively evolving galaxies.

We describe our GDDS+HST/ACS sample in Section 2, our approach to quantitative morphological classification in Section 3. Our results are presented in Sections 4 and 5, and discussed in Section 6. Our conclusions are summarized in Section 7. An Appendix at the end of the paper presents a detailed analysis of the robustness of our morphological classification technique. Throughout this paper we adopt a cosmology with $H_0$=70 km/s/Mpc, $\Omega_M=0.3$, and $\Omega_\Lambda=0.7$. The Vega magnitude system is used throughout.

# SAMPLE

The GDDS is a spectroscopic survey of an optical and near-IR-selected sample targeting massive galaxies at $0.8 < z < 2.0$. The motivation for the survey, along with selection functions, sampling weights, details of the observations and catalogs, are presented in Paper I . Only a brief overview is given here.

The GDDS sample is drawn from four fields in the one square-degree Las Campanas IR imaging survey , spanning a total area of 121 square arcmin. Broad-band colors were used to pre-select galaxies likely to be in the $0.8 < z < 1.7$ redshift range, and the spectroscopic component of the survey emphasized obtaining high quality spectra for red galaxies at these redshifts. Very long exposures, using the 'Nod & Shuffle' technique to significantly improve subtraction of the night sky emission lines, yielded high quality spectra from which redshifts could be derived for 308 galaxies to a limit of $I_{\rm Vega}=24.5$ mag. The spectra define a one-in-two sparse sample of the reddest and most luminous galaxies near the $I-K$  vs. $I$  color-magnitude track mapped out by passively evolving galaxies in the redshift interval $0.8<z<1.7$. This sample is augmented by a one-in-seven sparse sample of the remaining high-redshift galaxy population. The spectra go deep enough to allow redshifts to be obtained for $L_\star$ galaxies irrespective of star-formation history at $z\sim 1.5$, and the survey thus targets a mass-limited sample out to this redshift. Because of the importance of cosmic variance, the GDDS fields were carefully chosen to lie in regions of the sky where the number of red galaxies is near the global average (in order to avoid obvious over-densities and obvious voids).

Forty five orbits of imaging observations with the Hubble Space Telescope's Advanced Camera for Surveys were obtained from August 2003 to June 2004. These orbits were distributed over 7 pointings with integration times ranging from 11.7ks to 16.4ks (per pointing). In areas of overlap between pointings (which occur in our SA02 and SA22 fields), the effective integration time can be much larger than this (32.6ks in SA02 and 36.1ks in SA22), albeit over a small area. Our rationale for obtaining relatively long integration times relative to those obtained by surveys such as GOODS and GEMS will be given in the next section. A tabular summary of our observations is presented in Table 1. ACS images of starforming and post-starburst objects from this sample have already been presented in earlier papers in this series , while the sample as a whole is examined in the present paper.

Our imaging data cover 67 square arcmin, or 55% of the total area of the GDDS, but by carefully choosing the locations of the pointings within the GDDS fields, and by varying the number of pointings per field, we were able to obtain ACS images for 63% of the galaxies in our spectroscopic sample. Fully reduced ACS F814W images for each of the four fields are shown in Figure . Our field orientations were defined to produce additional depth for high priority targets within the allocated orbit total. This resulted in an unusual and non-uniform coverage within each field. The objects within our GDDS+ACS sample are representative of the parent distribution in their local densities and distribution on the sky. Our sub-sample of GDDS galaxies imaged with ACS are neither drawn from unusually dense regions nor from low density voids.

```latex
\begin{deluxetable}{cccccc}
\tablecaption{Log of observations\label{tab:obs}}
\tablecolumns{6}
\tablewidth{0pc}
\tabletypesize{\small}
\tablehead{
  \colhead{Pointing} &
  \colhead{RA} &
  \colhead{Dec} &
  \colhead{\# Visits} &
  \colhead{\# Orbits} &
  \colhead{Integration time}\\
  \colhead{} &
  \colhead{(J2000)} &
  \colhead{(J2000)} &
  \colhead{} &
  \colhead{} &
  \colhead{(s)}
}
\startdata
\cutinhead{\em SA02 (2 pointings, 14 orbits, 32676s total integration time, 19.9 arcmin$^2$ area)}
1 & 02:09:43.48 & -04:36:42.0 & 3 & 7 & 16338 \\
2 & 02:09:37.43 & -04:38:34.6 & 3 & 7 & 16338 \vspace{0.5cm} \\
\cutinhead{\em SA12 (1 pointing, 6 orbits, 14640s total integration time, 11.5  arcmin$^2$ area)}
1 & 12:05:26.71 & -07:23:34.2 & 2 & 6 & 14640 \vspace{0.5cm} \\
\cutinhead{\em SA15 (1 pointing, 5 orbits, 12200s total integration time, 11.4  arcmin$^2$ area)}
1 & 15:23:50.38 & -00:04:34.3 & 2 & 5 & 12200 \vspace{0.5cm} \\
\cutinhead{\em SA22 (3 pointings, 5 orbits, 36070s total integration time, 24.0  arcmin$^2$ area)}
1 & 22:17:38.15 & +00:16:35.1 & 2 & 5 & 11670 \\
2 & 22:17:37.71 & +00:14:21.6 & 2 & 5 & 12200 \\
3 & 22:17:45.09 & +00:15:33.2 & 2 & 5 & 12200
\enddata
\end{deluxetable}
```
```latex
\begin{deluxetable}{cccccc}
\tablecaption{Summary of the ACS imaging sample\label{tab:summary}}
\tablecolumns{6}
\tablewidth{0pc}
\tabletypesize{\small}
\tablehead{
  \colhead{Sample} &
  \colhead{SA02} &
  \colhead{SA12} &
  \colhead{SA15} &
  \colhead{SA22} &
  \colhead{All}
}
\startdata
Galaxies in the LCIRS parent sample & 998 & 839 & 748 & 1011& 3596\\
LCIRS galaxies with $18<I<24.0$ mag & 375 & 287 & 315 & 542 & 1519\\
Galaxies in the GDDS sample & 48 & 29 & 26 & 90 & 193\\
GDDS galaxies with $18<I<24.0$ mag & 39 & 24 & 11 & 70 & 144\\
\enddata
\end{deluxetable}
```

Using the methodology described in the next section, reliable morphologies can be obtained for galaxies down to $I_{F814W}=24.0$ mag. Our images contain 3596 galaxies in the LCIRS parent sample, 1519 of which are brighter than our morphological analysis limit. Of these, 144 galaxies are in the GDDS. A detailed breakdown of the numbers of objects in individual fields is given in Table 2.

# METHODOLOGY

The approach to quantitative morphological classification adopted in the present paper is based on an updated version of the now fairly well-established technique of subdividing the galaxy population into classes on the basis of position on an asymmetry vs. concentration diagram. This approach was first used in to analyze the Hubble Deep Field, and variations of it have now been widely adopted . While details of implementation differ amongst authors, the general approach has been shown to work well for subdivision into broad classifications (e.g. early-types vs. spirals vs. peculiars/mergers). Unfortunately the more subtle distinctions between the morphological classes (e.g. elliptical galaxies vs. S0 galaxies) are not captured by the system.

Our analysis in this paper is based on a new publicly-available code, $\tt MORPHEUS$, which produces a large number of measurements which can be used to constrain the morphological properties of galaxies in addition to concentration and asymmetry[^1]. The optimal set of parameters for characterizing galaxy morphology will be explored in Nair et al. 2007 (in preparation), but as will be shown below, for the simple purpose of isolating early-type galaxies from all other galaxy types, a straight-forward diagram based on only two parameters, namely the Gini coefficient and asymmetry, works rather well. The Gini coefficient is fairly new to astronomy (being introduced in and improved in ), but it has been used in econometrics for nearly a century to quantify the inequality of wealth distributions in human populations . When applied to galaxy images, the Gini coefficient provides a quantitative measure of the inequality with which a galaxy's light is distributed amongst its constituent pixels, and it can be used as a sort of generalized concentration index that does not depend on galaxy symmetry. Furthermore, as shown the Appendix A, the Gini coefficient remains a surprisingly robust statistic even in the face of morphological $K$-corrections. We therefore consider classification based on position in the Asymmetry-Gini diagram (referred to as the A-G diagram, or A-G plane) to be an updated and improved version of classification on the basis of the Asymmetry-Concentration diagram . The A-G plane will be the central diagnostic diagram in the present paper for purposes of morphological classification.

As noted earlier, presented a valuable refinement of the original definition of the Gini coefficient given in . computed the Gini coefficient using circular apertures scaled to multiples of the Petrosian radius. In Section  below we will show how this idea can be extended using so-called 'quasi-Petrosian' isophotes, which retain all improvements to the Gini coefficient presented by , and improve the statistic further so it works better for galaxies of arbitrary shape. But before describing our improved statistic, we will describe the importance of having data deep enough to be worth analyzing with these improved tools. Further discussion can be found in Appendix A.

## Required depth

The long integration times obtained in our ACS fields were motivated by our need for reliable morphological classification of early-type galaxies out to $z\sim2$. Morphological $K-$corrections impact early-type galaxies in a qualitatively different manner from how they impact late-type galaxies (see and for a more detailed discussion). Late-type galaxies are dominated by irregular knots of star-formation which become more prominent as the observed wavelength probes further to the blue, typically leading to increased asymmetry. On the other hand, early-type galaxies are (by definition) smooth and rather symmetric, and the changes that occur are more uniform — the central parts of the galaxy remain brightest at all redshifts, and the asymmetry remains low. As is shown in greater detail in Appendix A, morphological classification of early-types from a single band of observation is possible out to high-redshifts, provided the data go deep enough to probe the galaxies out to similar physical radii over the redshift range of interest. Obtaining data of sufficient depth is the crucial ingredient — probably the greatest source of confusion in morphologically classifying early-type galaxies at high redshifts is systematic misclassification of early-intermediate spirals as E/S0 systems, because at high-redshifts $(1+z)^4$ flux diminution lowers the surface brightness of disks below the threshold of visibility, thus increasing the prominence of the central bulge. Our ACS integration times were chosen to be deep enough to avoid this effect.

Figure  shows the signal-to-noise/pixel as a function of age and redshift for HST ACS observations of a projected stellar mass density corresponding to that of the Milky Way at the solar radius. The panel on the left corresponds to an exposure time of 3ks, and the panel on the right corresponds to a 20ks integration. Different lines correspond to observations of galaxies at $z=0.7$, $1.2$, and $1.7$ (the range of redshifts explored in the present paper). The logarithm of signal-to-noise/pixel is shown as a function of the age of the stellar population, assuming the fairly typical stellar population model described in the caption. To account (rather crudely) for the light smoothing and connected-component optimizations done by the pre-processing imaging segmentation software used (discussed further below), we assume an effective pixel scale of 0.1 arcsec/pixel, and that a SNR/pixel greater than 0.5 is detectable[^2]. On this basis, Figure  shows that at $z\sim0.7$ one is able to probe out to large radii in the rest-frame of galaxies even with relatively shallow (e.g. 1 orbit, or 3ks) optical observations obtained with HST. At this redshift, projected mass densities corresponding to the intermediate regions of large disk galaxies are observable for around 60% of the maximum possible age for the galaxy (defined as the age of the Universe at the epoch of observation). However, beyond this redshift biases quickly become rather severe — structural information at optical wavelengths comes only from the densest regions in galaxies (such as bulges), or from the youngest parts of galaxies (such as bright star-formation complexes with ages of less 1 Gyr). By $z=1.7$ it is simply no longer possible to use shallow HST optical data to compare fairly fundamental characteristics, such as the size and morphology of galaxies, with those of local objects. With 20ks integration times, much fairer comparisons can be made — surface mass densities near that of the solar neighborhood with maximal ages can be probed in an unbiased way out to about $z=1.2$, and at $z=1.7$ one is able to probe out to radii comparable to those probed by shallow HST imagery at $z=0.7$. If, as suggested by Bouwens et al. 2005 (see also Iye et al. 2007), significant star-formation activity only begins around $z\sim6$ (when the Universe is already about 1 Gyr old, so that the maximal age of a stellar population at $z=1.7$ is 2.8 Gyr instead of the 3.8 Gyr age of the Universe at that redshift), then Figure  suggests that one would be able to probe maximally old stellar populations at solar-neighborhood mass densities out the limits of our survey with 20ks integrations. Our goal in defining the rather complicated-looking ACS imaging field geometry shown in Figure  was to cover as many GDDS galaxies with known redshifts as possible, subject to the constraint of having at least 12ks of integration everywhere, and up to $33$ks of integration in areas where fields overlap. These areas of overlap were chosen to correspond to regions with many high-redshift galaxies.

Having obtained data of the required depth, the next ingredient needed for reliable morphological classification of early-type galaxies is construction of a morphological catalog whose measurements have been synchronized (as closely as possible) to a common physical radius in the rest-frame of each galaxy. Standard tools can take us part of the way to this goal, and the next stage in our analysis was to create a photometric catalog using `SExtractor` , which constructs a photometric catalog by isolating (or 'segmenting') galaxies from the background sky on the basis of fairly complicated criteria, based on differential thresholding followed by stages of image splitting based on connected-component analysis. Synchronizing measurements to a common physical rest-frame is done by using the `SExtractor` catalog and segmentation maps as the input for our own software (`MORPHEUS`), which measures galaxy structural parameters contained within a 'quasi-Petrosian' isophote, as defined in the next section.

## Definition of the Quasi-Petrosian Isophote

The classic prescription for dealing with limiting isophote mismatches introduced by $(1+z)^4$ surface brightness diminution of galaxies is to measure galaxy properties within a circular aperture whose size is a multiple of a galaxy's Petrosian radius . Our more modern formulation of this basic idea is valid for galaxies of arbitrary shape, and is thus more generally useful for analysis of the very diverse population of galaxies seen in deep HST images.

The 'quasi-Petrosian' isophote is constructed using an algorithm which works for galaxies of arbitrary shape. All pixels in the galaxy image (defined using the `SExtractor` segmentation map) are sorted in *decreasing* order of flux to construct an array, $f_i$, containing the flux in the $i^{\rm th}$ sorted pixel. This array is then summed over to construct a monotonically *increasing* curve of cumulative flux values: $$\mathcal{F}_i=\displaystyle\sum_{j=1}^i f_j.$$ In analogy with the definition of the Petrosian radius for a circular aperture, we calculate the Petrosian isophote by determining the pixel index $i$ which satisfies the following equation: $$f_i = \eta\times \left( \frac{\mathcal{F}_i}{i}\right).
\label{quasiPetroEqn}$$

Note that $\frac{\mathcal{F}_i}{i}$ is the cumulative mean surface brightness in the sorted array. The flux value of the pixel which solves the equation defines the *quasi-Petrosian isophote*. All pixels brighter than $f_i$ are retained, and all pixels fainter than $f_i$ are discarded. The parameter $\eta$ is fixed for all galaxies in the sample, and experimentation has shown us that $\eta=0.2$ is a good choice, probing far enough into the outskirts of nearby galaxies to get outside of regions dominated by nuclear bulges, but not so far out that low and high-redshifts samples cannot be fairly compared. Because the data are discrete, Equation  will rarely be solved exactly, but a perfectly adequate approximation is obtained by simply noting the index of the first zero crossing of $f_i - \eta\times \left( \frac{\mathcal{F}_i}{i}\right)$. A zero crossing is guaranteed to occur at the last pixel index, and when this occurs it indicates that no quasi-Petrosian isophote exists, and the algorithm converges on the standard isophote as the best approximation to the quasi-Petrosian isophote. We consider this a rather graceful failure mode, and when it occurs, `MORPHEUS` simply flags this condition and proceeds with its analysis using the standard isophote.

It is interesting to compare Equation  with the definition of the Petrosian radius adopted by the SDSS collaboration . In this formulation, one starts with $I(r)$, the azimuthally averaged surface brightness profile of the galaxy. For a given profile, the Petrosian radius, $r_p$, is the radius $r$ at which which the following relation holds: $$\frac{\int_{0.8r}^{1.25r} dr^{\prime} 2\pi r^{\prime} I(r^\prime)/[\pi (1.25^2-0.8^2)r^2]}{\int_0^r dr^\prime 2\pi r^\prime I(r^\prime)/(\pi r^2) }=0.2.
\label{realPetroEqn}$$ Thus the Petrosian radius is simply the radius at which the local surface brightness in a circular annulus is equal to 20% of the mean surface brightness within the annulus. Understanding this, we see that while Equation  looks very different from Equation , both operate in a similar way. The factor $\left( \frac{\mathcal{F}_i}{i}\right)$ is simply the mean surface brightness of a galaxy's brightest $i$ pixels, so Equation is essentially comparing the surface brightness at a point to a scaled surface brightness interior to an isophote — the key idea in the standard definition of a Petrosian radius. If a galaxy's light distribution is circularly symmetric and monotonically decreasing from a central pixel, then the positions of the brightest $i$ pixels will closely describe the filling-in of a bounding circle, so in this special case the analogy between Equation  and the standard Petrosian formalism is nearly exact. However, Equation  remains valid for galaxies of arbitrary shape, and is both operationally easier to calculate and more robust than Equation .

Figure  shows the the fraction of each galaxy's pixels above the isophotal threshold defined by solving Equation  for $\eta=0.2$ in our sample. As noted above, data that is too shallow for reliable classification and analysis is flagged by non-convergence of Equation . As shown in Figure , the fraction of each galaxy's pixels above the isophotal threshold is less than unity for all galaxies in our sample — therefore a quasi-Petrosian isophote exists for *all* galaxies in our sample. This is not the case when our analysis includes galaxies fainter than $I_{F814W}\sim24$ mag, and the existence of a quasi-Petrosian isophote can be used as a sensible metric for determining how deep morphological measurements should be pushed to when analyzing a given dataset[^3]. It is interesting to consider how a sample defined by quasi-Petrosian area fraction resembles one based on a signal-to-noise threshold[^4], so the signal-to-noise vs. redshift distribution of the massive galaxy sample considered in the present paper is shown in Figure . (See below for the precise definition of this sample). As noted on the figure, our massive galaxy sample has a mean signal-to-noise ratio of about 320. The subset of objects with $z>1.2$ has a mean signal-to-noise ratio of about 220.

Figure  also illustrates a drawback of the quasi-Petrosian approach. Because only a fraction of each galaxy's pixels are being used in our morphological computations, some information is being lost, albeit the pixels with the lowest signal-to-noise in each galaxy. The median fraction of pixels lost is $\sim$`<!-- -->`{=html}50% for galaxies at , dropping to $<$`<!-- -->`{=html}20% for galaxies at . Throwing data away is never a happy choice to have to make, but because of $(1+z)^4$ cosmological surface-brightness dimming, it seems essential to do this (in a careful way) if fair comparisons of morphology over a range of redshifts are to be undertaken. Typically, only the high surface-brightness portions of nearer galaxies in a sample would remain visible at the highest redshifts probed by the same sample, so excising the low-surface brightness portions of bright objects is needed to harmonize regions of comparison over a broad range of redshifts.

We conclude this section by noting, in passing, that there is a rather pleasing conceptual connection between our definition of the quasi-Petrosian isophote given above, and the definition of the Gini coefficient given in . Both statistics are obtained from simple computations on a ranked pixel list.

# THE MORPHOLOGICAL MIX OF GALAXIES IN THE GDDS FIELDS

Figure  shows small 'postage stamp' images of each GDDS galaxy, color coded by their spectral type, in the A-G plane. Galaxies with purely passive spectral types, identified with red borders, have primarily compact early-type morphologies and lie preferentially in the high Gini-low asymmetry region of Figure . Galaxies with spectral types characteristic of active star formation have primarily disk and late-type morphologies and occupy a large range of the A-G plane, strongly favoring the high asymmetry and and low Gini regions. Galaxies with intermediate or composite spectral types occupy the region of the A-G plane between the passive and star forming galaxies. Figure  clearly shows that a strong correlation between morphology, quantified by the A-G plane, and spectral class is in place at the redshifts spanned by the GDDS. For the early-type galaxies in particular, selection by spectral class or morphology are nearly equivalent, and selection by morphology can be undertaken using simple linear cuts in the A-G plane. Throughout the remainder of this paper, we will define early-type galaxies to be those systems with ${\rm G}>0.5$ and ${\rm A}<0.15$. The choice of ${\rm G}>0.5$ is important, and its rationale is discussed in greater detail in Appendix A. The choice of ${\rm A}<0.15$ is based simply on visual inspection of Figure , but is not particularly fundamental for the limited purposes to which we are presently applying this diagram (namely, for determining the cumulative mass function of massive early-type galaxies). This can be seen directly from Figure , where we have drawn circles around those objects which meet the mass completeness cut used when determining our mass functions (to be described in the next section). In fact, so few high mass systems lie above the asymmetry cut that our main conclusions do not change if no asymmetry cut is imposed at all. Therefore, our classification system for massive early-type galaxies is fundamentally based on the Gini coefficient.

The concordance between morphology and spectral type is shown more clearly in Figure , where we present the individual images of galaxies classed as being early-type using our formalism. Visual inspection of this figure is consistent with all galaxies being early-type systems. Approximately 15% (5/30) of the galaxies do show weak disks, but without spiral structure, and these are probably S0 or S0/a systems. Clearly the A-G diagram does not discriminate between E and S0 galaxies.

# THE EVOLVING MASS-DENSITY FUNCTION OF MASSIVE EARLY-TYPE GALAXIES

In this section we will attempt to synthesize the evolutionary history of massive early-type galaxies by exploring the growth in their cumulative mass density in three broad redshift bins. The mass density functions were computed using the standard $V_{max}$ formalism described in Paper III , to whom the reader is referred for details. For present purposes it suffices to just highlight a few points that are important to bear in mind when interpreting the models.

It is important to note that our models assume a Initial Mass Function (IMF), which has the same high-mass slope as a Salpeter IMF but which has a break at 1 solar mass (providing more realistic $M/L$ values)[^5]. Whenever we compare our results to those in the literature, we always convert to this standard IMF. Typical uncertainties in our model masses are around 0.2 dex in the main $K<20.6$ sample considered in the present paper.

Because the GDDS is a sparse-sampled survey, each galaxy in the survey acts as a proxy for a number of other objects with similar magnitudes and colors, so determining the stellar mass contributed by an individual galaxy is only the first step in computing the mass function. The volume-weighted contribution of this galaxy to the integrated mass density in a redshift bin is computed using the sampling weights tabulated in Paper I. These weights account for the fact that the GDDS is not completely homogeneous, because when designing spectroscopic masks a higher priority was given to red galaxies than to blue galaxies. The sampling weights quantify the selection probability as a function of $I-K$ and $K$, with reference to the full wide-area LCIRS tiles which formed the basis for the GDDS sample (and so also account approximately for the effect of cosmic variance).

For maximum robustness in the present paper we focus our analysis on cumulative mass functions for systems above a mass threshold. We adopt a threshold of $\log_{10}(M/M_\odot)>10.5$. As shown in Figure 1 of Paper III, this is the limit to which the GDDS is mass-complete for $z<1.7$. In other words, red galaxies with stellar masses of $\log_{10}(M/M_\odot)<10.5$ would begin to drop out of our survey at the highest redshifts. Another issue that arises when computing the cumulative mass function is the treatment of objects without redshift information. Because the GDDS has a redshift completeness of over 85 percent in the redshift range explored in this paper, the issue is not of overwhelming importance, and none of the conclusions in this paper change if galaxies without redshifts are simply omitted. However, for the sake of consistency we will treat these objects in the same way as they were treated in Paper III. We therefore assign photometric redshifts (computed for the LCIRS by ) to objects without redshifts, and to objects whose redshift confidence class is $<2$. (See Table 3 of Paper I for a detailed description of these confidence classes).

The cumulative mass density function for systems more massive than $\log_{10}(M/M_\odot)=10.5$ is shown in Figure . The mass density function shown was computed in three redshift bins ($0.8<z<1.1$, $1.1<z<1.4$, and $1.4<z<1.7$). The corresponding error bars were estimated by a bootstrap analysis. Plot symbols in Figure  denote the following subsets of galaxies: (1) Spectroscopically quiescent objects (spectral class 001) shown as diamonds; (2) morphologically selected (on the basis of position in the A-G plane) early-type galaxies shown as circles; and (3) all galaxies shown as squares. At the $z=0$ position we also plot the corresponding local stellar mass densities, based on the analysis of SDSS observations given by and converted to our IMF, and incorporating our mass cut. (Note however that the local early-type point is based on color selection, rather than on morphological classification; this point is discussed further below). The cumulative mass functions for all galaxy types from and are shown in gray.

The most striking aspect of Figure  is that the cumulative mass locked up in morphologically-selected early-type galaxies appears to be increasing with cosmic time substantially more quickly than the global rate. The cumulative stellar mass locked up in massive galaxies as a whole is increasing slowly by comparison, changing by only about 0.3 dex over the redshift range probed, in agreement with the trends shown in Paper III. (This is reassuring, because our ACS imaging observations cover only 55% of the area in the complete GDDS). The cumulative stellar mass in spectroscopically quiescent systems is consistent with being flat, although the error bars are large, and we cannot rule out that the spectroscopically quiescent systems are evolving at a similar rate to that of the total galaxy population.

In our highest redshift bin the fraction of the total stellar mass contained in massive early-type galaxies is similar to that contained by spectroscopically quiescent systems (around 30% of the total). In our lowest redshift bin over twice as much mass is contained in early-type galaxies as is contained in quiescent systems — in fact, early-type systems in our lowest redshift bin contain about 80% of all the stellar mass locked up in galaxies with $\log_{10}(M/M_\odot)>10.5$. This is consistent (within the considerable error bars) to the corresponding value in the local Universe (69%), which can be obtained from Figure  by simply dividing the values shown for the two points at $z=0$. Figure  therefore suggests that over the redshift range probed by the GDDS we are witnessing the formation of early-type galaxies as the dominant members of the high-mass end of the galaxy population, the same position they maintain up to the present day. The result from the mass function is in entirely consistent with the visual impression one obtains by simply plotting the morphologies of massive galaxies in our sample as a function of redshift, as shown in Figure . The postage stamp images in this figure are shown in order of decreasing redshift, with early-type systems (based on our quantitative definition) circled. The steady increase with cosmic epoch in the fraction of early-type systems as a fraction of the massive galaxy population is rather striking. It seems fairly plausible to conclude that at at lowest redshifts probed by the GDDS, early-type galaxies comprise a similar fraction of the massive galaxy population as is seen locally.

# DISCUSSION

In the local Universe early-type galaxies are nearly always associated with quiescent stellar populations, so the steep evolution of early-types in the cumulative mass function shown in Figure  might be viewed as a surprise given the relatively shallow evolution in totally quiescent galaxies. A plausible explanation for this mismatch is offered by the possibility that morphological transformations and stellar mass assembly operate on different time scales. For example, it has long been argued that the bulk of the stars in quiescent early-types galaxies might have formed before these stars were organized into spheroids, in which case the progenitors of such galaxies might be found in other morphological types. On the other hand, it might also be argued that the signatures of star-formation (e.g. blue colors and emission lines) remain in place for a period of time subsequent to the formation of an early-type galaxy, in which case the progenitors of quiescent early-type systems might still resemble early-types, but with blue colors and/or emission lines. We suspect that both scenarios are at play in driving the steep evolution in the cumulative mass function of early-type galaxies shown in Figures  and .

To further explore the link between morphology and star-formation history, Figure  shows the rest-frame $(U-B)$ color of our sample, plotted as a function of redshift. The rest-frame colors of our galaxies were computed using the best-fit spectral energy distribution templates used to construct our mass functions. The line shown near the top of the figure is the evolutionary track of an instantaneous starburst forming all of its stars at $z=3$. Morphologically-classified early-type galaxies are circled. A number of interesting points emerge from this figure. As noted earlier, most morphologically-defined massive early-type galaxies are very red, but the figure shows that a number of massive early-type galaxies with blue colors, probably from young stellar populations (as they do not exhibit AGN features in their spectra). The existence of these objects should come as no surprise, since studies of internal color variations in early type galaxies have shown that a significant fraction of early-type galaxies at $z\sim1$ have blue cores . Furthermore, such systems emerge from any scenario in which early-type galaxies are being built up over the redshift range of our survey with minor bursts of star formation occurring in time-scales longer than the stellar relaxation time. It is interesting to note that at high redshifts the red-end of the galaxy distribution lies consistently to the blue of the passive evolution model, and that at low redshifts most blue early-type systems are not very massive — presumably both these effects are manifestations of cosmic downsizing . We speculate that most of the 'blue' early-type galaxies are ultimately destined to turn into the quiescent early-type galaxies of intermediate mass. We also note that Figures  and both show that the abundance of this class of object would increase significantly if we were less stringent in requiring that early-type galaxies have low asymmetry, since inspection of these figures shows that a number of high Gini systems with high asymmetry have not been included in our sample of early-type galaxies. The asymmetric component of these massive objects is near their nuclei, and we suspect they are late-stage mergers. A number of such systems exhibit quiescent spectra, and these would seem to be be good candidates for "dry merging" , though they may also be systems with high dust contamination. In any case, these objects are heavily outnumbered by star-forming systems. Figure  also shows that a sizeable fraction of galaxies with very red rest-frame colors are *not* early-types. These objects comprise only 15% of the red galaxies at $0.7<z<1.0$, but contamination rises quickly with redshift, and by $z\sim 1.5$ about half the objects with red rest-frame colors are not early-types. While the existence of these objects is not a surprise — a number of recent papers have shown that color selection used to define early-type galaxy samples results in a mixed bag of galaxies — the rapid change in the contamination rate as a function redshift is rather striking.

Since color-selected samples cannot be used to define samples of early-type galaxies without significant contamination, it is interesting to consider whether better samples of early-types might be constructed using spectroscopy. Figure  shows the F814W images of the 21 galaxies classified as purely quiescent (class '001' in the taxonomy of Paper I) in our ACS sample. About 2/3 of the sample (13/21) are early-types using our automated classifier. About half the remainder are objects that would be classified as early-types if our asymmetry cut were slightly less rigorous, and on the whole the sample appears fairly homogeneous. We conclude that a fairly good sample of early-type galaxies could be defined simply by selecting purely quiescent systems. However, Figure  makes it clear that care would have to be taken to exclude objects showing even small amounts of star-formation. This figure shows a montage of the 12 galaxies in our imaging sample with spectral classifications corresponding to a dominant old stellar population contaminated by low-level star formation (class '011' in the taxonomy of Paper I). It is obvious that these objects have a wider range of morphologies than those with the '001' (quiescent) spectral class and a higher fraction of disks, and 2/3 of these objects lie outside the region in the A-G plane used to isolate early-type systems. Approximately 50% of the old + weak/truncated star formation objects are disks and many show prominent HII regions. The remaining objects are compact and have early-type morphologies. We can only speculate on the ultimate destiny of the large disk galaxies in this sample. Several of these objects have prominent bulges, and fading of their disks might bring them rather close to meeting our criterial for early-type galaxies. It is tempting to identify these with fairly recent merger events that will relax to the passive and early-type systems at $z < 1$. Indeed these objects are closely related to the massive post-starburst systems described in (Paper VI). They appear to have undergone significant star formation episodes at $z \ge 1.5$ and, barring further star burst episodes, will appear as passive systems on the red sequence by $z \sim 0.8-1$. (We note that spectroscopy of color-selected samples – – have also revealed luminous disk galaxies with red colors and spectra dominated by old stars.)

Our results paint a picture of the *morphological assembly* of many massive early-type galaxies over the redshift range $1 < z < 2$, but it is important not to take this conclusion too far. Large area surveys (Brown et al. 2006) clearly indicate that the most massive systems have formation redshifts, both stellar and dynamical, well above the redshift limit of our present sample. The age analysis carried out in Paper IV and similar analyses of other samples suggest that these objects formed at $z > 3$ on average and in some cases at considerably higher redshifts. As we will show in a subsequent paper, the rest-frame R-band morphologies of the passive galaxies with $z > 1.3$ are consistent with early dynamical formation as well. These results are another manifestation of the popular down-sizing paradigm in which massive galaxies form early and less massive systems are assembled at later times . At the low-redshift end of our sample, the convergence in the fractional mass density in massive early-type galaxies (relative to the total mass density at the same redshift) to something similar to the value in the SDSS indicates that the epoch of massive early-type formation may be drawing to a close by $z\sim 1$ (a conclusion consistent with the high post-starburst fraction described in Paper VI).

The offset in the mass density contained in the lowest redshift GDDS point in Figure  and the local data point is rather striking, and this *may* indicate that whatever process is driving the process of massive galaxy assembly at $z<1$ is operating in a way which conserves the overall fraction of early-types even as it builds the total stellar mass in the galaxy population from $z=0.7$ to $z=0$. However, we remain a little skeptical about this conclusion. The most robust statements that can be made from Figure  are based on *relative measurements internal to each dataset*. Comparing the high-redshift GDDS points to their low-redshift counterparts in Figure  is dangerous, even though we chosen to plot them together in the same diagram. note that there is an at least $\sim30\%$ systematic uncertainty in the local estimate, and the uncertainty in the high-redshift points is likely to be at least this big. Another source of potential bias is that define their early-type sample on the basis of color, rather than on the basis of morphology. Much of the offset between the cumulative stellar mass locked in early type at $z=0$ and $z>0.7$ may be due to systematic differences in the way samples of high-redshift and low-redshift early-type galaxies are constructed — once again, we emphasize that the trends seen internally to either data set are more reliable.

# CONCLUSION

We have described an improved methodology for morphologically classifying galaxies, based on 'quasi-Petrosian' image segmentation. This results in more robust measurements of galaxy properties at high redshifts. This methodology has been applied to define a sample of early-type galaxies in HST ACS images of the Gemini Deep Deep Survey fields. Using this sample, we computed the cumulative stellar mass functions of morphologically-segregated subsets of galaxies with $\log_{10}(M/M_\odot)>10.5$. Although our error bars are large, we find striking evidence for evolution in the fraction of stellar mass locked up in massive early-type galaxies over the redshift range $0.7<z<1.7$. This redshift range corresponds to that over which massive early-type galaxies morphologically assemble, and over which the strong color-morphology correlations seen in the local Universe begin to fall into place.

This paper is based on observations obtained at the Gemini Observatory, which is operated by the Association of Universities for Research in Astronomy, Inc., under a cooperative agreement with the NSF on behalf of the Gemini partnership: the National Science Foundation (United States), the Particle Physics and Astronomy Research Council (United Kingdom), the National Research Council (Canada), CONICYT (Chile), the Australian Research Council (Australia), CNPq (Brazil) and CONICET (Argentina).

Based on observations made with the NASA/ESA Hubble Space Telescope, obtained at the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-26555. These observations are associated with program \#9760. Support for program \#9760 was provided by NASA through a grant from the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Inc., under NASA contract NAS 5-26555.

RGA thanks NSERC, the Government of Ontario, and the Canada Foundation for Innovation for funding provided by an E. W. R. Steacie Memorial Fellowship. KG & SS acknowledge generous funding from the David and Lucille Packard Foundation. H.-W.C. acknowledges support by NASA through a Hubble Fellowship grant HF-01147.01A from the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Incorporated, under NASA contract NAS5-26555. DLB wishes to thank the Centre National d'Etudes Spatiales for its support.

**Appendices**

# ROBUSTNESS OF THE QUASI-PETROSIAN GINI COEFFICIENT AS A GALAXY CLASSIFIER

In this Appendix we will investigate the robustness of our galaxy classification methodology. As described in Section 4, our classifications are based on a galaxy's position in the Asymmetry vs. Gini diagram. For purposes of computing the mass function of early-type galaxies, we have shown in the text that the Gini coefficient plays a much more significant role than does asymmetry. In fact, the main conclusions of this paper would remain unchanged if asymmetry were neglected completely. Therefore our aim in this appendix is to demonstrate that the Gini coefficient measured in a single red band (F814W) can be used as a simple and very robust classifier of early-type galaxy morphology out to $z\sim2$. We emphasize at the outset that this claim is true *only* when data is deep enough to allow quasi-Petrosian isophotes to be used to calculate the Gini coefficient, as described in the text.

Our analysis of the robustness of the quasi-Petrosian Gini coefficient is based on measurements of this quantity obtained through $u$', $g$', $r$' and $i$' filters for 800 nearby galaxies in the Sloan Digital Sky Survey (SDSS). This is a subset of the morphological sample analyzed by Nair et al. (2007). We refer readers to that paper for additional details. Nair et al. (2007) will also present detailed comparisons of classifications made using quasi-Petrosian Gini coefficients to those made using other methods. Our ACS imaging sample has a signal-to-noise ratio floor of 100 (only a single galaxy in our ACS imaging sample has has a signal-to-noise ratio below this) so our analysis will be restricted to galaxies with a $u$'-band signal-to-noise ratio $>100$.

Figure  shows the Asymmetry vs. Gini coefficient diagram for $g$'-band imaging of our SDSS sample. Galaxies classified visually by one of us (Preethi Nair) as being early-type systems are shown in red. The vertical line denotes the $G=0.5$ cut used to distinguish early-type galaxies from all other systems. It is seen that this simple bifurcation of the A-G plane into two parts does a rather good job of distinguishing early-type galaxies from all other systems. As expected, there is some leakage of visually-classified early-type galaxies to regions of the diagram with $G<0.5$, and some leakage in the other direction (non-early-types into the $G>0.5$). These systems are almost all early-type spirals whose visual classifications are known (based on comparisons of visual classifications between observers, e.g. Naim et al. 1995) to be ambiguous (e.g. Sa vs. S0/a vs. S0 systems).

The $G=0.5$ cut evidently does a good job of distinguishing high signal-to-noise $g$'-band images of SDSS early-type galaxies from the rest of the galaxy population, but how robust is this cut to changes in rest wavelength of observation, and to decreasing signal-to-noise? Figure  is an attempt to address this question. The top row of Figure  shows the Gini coefficients of our SDSS reference sample measured at different wavelengths (using $u$', $g$', and $i$' filters) plotted against the Gini coefficients in $g$'-band. The diagonal line shown in each panel delineates a perfect mapping between the two parameters, *i.e.* no change in Gini as a function of wavelength. The quasi-Petrosian Gini coefficient is seen to be remarkably robust to changes in rest wavelength when measured from data with reasonably high signal-to-noise. The Gini coefficient measured in $g$'-band barely changes when measured in $r$'-band and $i$'-band, and for early-type galaxies in particular the changes are hardly bigger than the random measurement errors (Nair et al. 2007). Measurements of the $u$'-band Gini coefficient probe wavelengths blueward of the 4000Å break, and our naïve expectation was that Gini coefficients *should* be significantly different in $u$'-band when compared with measurements made at wavelengths redward of the break. At first inspection Figure  does seem to show this, in the form of systematic offsets between the $g$'-band and $u$'-band images. However, a more careful inspection shows that the trends seen are almost certainly due to the the low signal-to-noise ratio of the $u$'-band data, instead of being due to systematic differences in the intrinsic $g$'-band and $u$'-band images of galaxies.

Each panel in Figure  records the mean signal-to-noise level of the sample being plotted. It is seen that the SDSS $u$'-band data has a mean signal-to-noise ratio of $\sim 130$, which is a factor two to three lower than the mean signal-to-noise ratios of our ACS images, and about a factor of five lower than the signal-to-noise ratios of the corresponding SDSS $g$', $r$', and $i$' images. It is clear that these differing signal-to-noise ratios need to be accounted for before comparing the $u$'-band Gini coefficients of the data obtained at different wavelengths. This is a crucial point, because the ACS F814W filter begins to probe blueward of the 4000Å  break at $z>1$, where the bulk of our data lies. Since the SDSS $u$'-band filter data would seem to provide the best match to the rest-frame wavelengths being probed by much of our ACS data, understanding the reason why the Gini coefficients of $u$'-band data shown in Figure  appear be systematically lower than those measured at longer wavelengths is of special significance. The columnar base of the 'T' in Figure  is an attempt to understand the $u$'-band data by showing how the Gini coefficient of $g$'-band sample changes when noise is added to the images to lower the mean signal-to-noise ratios of the samples plotted. The mean signal-to-noise ratio of the noise-degraded $g$'-band data in middle panel is similar to the mean signal-to-noise ratio for galaxies at $z>1.2$ in our sample. The mean signal-to-noise ratio of the lowest panel is similar to that of the data in the SDSS $u$'-band sample. The strong resemblance between this panel and the $u$'-band panel at the top left of the Figure suggests that the apparent offset in the Gini coefficients of the high signal-to-noise $g$'-band data and the low signal-to-noise $u$'-band data is mostly due to poor signal in the latter, and not due to morphological K-corrections.

A more explicit comparison of $u$'-band and noise-degraded $g$'-band Gini coefficients of our local calibration sample is shown in Figure . The mean signal-to-noise ratio of the $g$'-band sample has been harmonized to be nearly identical that that of the $u$'-band sample. Within the scatter introduced by random measurement error, Gini coefficient measurements at $g$'-band and $u$'-band are identical, even though these bands straddle the 4000Å break (at which point visual morphologies of galaxies can appear to make large changes). This highlights the strongest benefit of using an abstract quantity like the quasi-Petrosian Gini coefficient as measure of morphology. This is also the essence of our contention, made repeatedly in the main text of this paper, that if quasi-Petrosian Gini coefficients are used to quantify morphology, then a basic 'cure' for the deleterious effects of morphological $K$-corrections is simply to obtain deeper data.

We conclude this appendix with Figure , which shows an object-by-object postage-stamp image montage of galaxies near the $G=0.5$ border of the Gini coefficient vs. redshift diagram. This diagram can be used to inspect the morphologies of objects near the cutoff threshold used to discriminate between early-type galaxies and all other systems in the present paper. Objects in the gray region shown in Figure  shown are of particular interest, because these systems are at redshifts where F814W imaging is probing blueward of the 4000Å break, and also near enough to the $G=0.5$ cutoff that they could conceivably be brought below it at very low signal-to-noise. However, all these objects are seen to be high signal-to-noise systems, and only one object (with a high star-formation rate spectrum) has a visual morphology even remotely consistent with that of an early-type galaxy.

[^1]: `MORPHEUS` can be downloaded from the following web site: http://odysseus.astro.utoronto.ca/$\sim$abraham/Morpheus. Please note that the code base is evolving and the version used in the present paper is the July 2006 release. In addition to incorporating some relatively new parameters (e.g. the Gini coefficient from Abraham et al. 2003 and M20 from Lotz et al. 2004) `MORPHEUS` also incorporates improvements suggested by others for ways to better measure well-established parameters such as asymmetry (e.g. Conselice et al. 2003).

[^2]: This number is somewhat arbitrary, because in reality the limiting isophotal signal-to-noise is dependant on the smoothing parameter and connected-component algorithm (i.e. 4-point vs. 8-point connectivity) adopted by the segmentation software used to separate out a galaxy's pixels from the underlying sky. A value around 0.5 is reasonable assuming fairly heavy smoothing and 4-point connectivity.

[^3]: In other words, if the quasi-Petrosian threshold is not being met for an object, then the data is so shallow that only the inner part of the galaxy is being probed. We thank Edward Taylor at Leiden Observatory for pointing out to us that meeting the quasi-Petrosian threshold condition is a convenient way to determine if data is deep enough for reliable morphological work.

[^4]: There are several different definitions for the signal-to-noise of an image. In the present paper a galaxy's signal-to-noise means the ratio of its background-subtracted flux to the product of the square root of its isophotal area times the standard deviation of the sky noise.

[^5]: The following convenient relationship (accurate to within a few percent independently of the SFH) can be used to convert between mass-to-light ratios measured using our chosen IMF and those determined with a Salpeter IMF: $M/L_K (BG) = 0.55 M/L_K(SP)$.