, r. ali vanderveld arxiv:1008.4112v1 [astro-ph.im] 24...

10
arXiv:1008.4112v1 [astro-ph.IM] 24 Aug 2010 Astronomical image simulation for telescope and survey development Benjamin M. Dobke 1 , David E. Johnston 2 , Richard Massey 3 , F. William High 4 , Matt Ferry 5 , Jason Rhodes 1,5 , R. Ali Vanderveld 1,5 ABSTRACT We present the simage software suite for the simulation of artificial extragalactic images, based empir- ically around real observations of the Hubble Ultra Deep Field (UDF). The simulations reproduce galaxies with realistic and complex morphologies via the modeling of UDF galaxies as shapelets. Images can be created in the B, V, i and z bands for both space- and ground-based telescopes and instruments. The sim- ulated images can be produced for any required field size, exposure time, Point Spread Function (PSF), telescope mirror size, pixel resolution, field star density, and a variety of detector noise sources. It has the capability to create images with both a pre-determined number of galaxies or one calibrated to the number counts of pre-existing data sets such as the HST COSMOS survey. In addition, simple options are included to add a known weak gravitational lensing (both shear and flexion) to the simulated images. The software is available in Interactive Data Language (IDL) and can be freely downloaded for scientific, developmental and teaching purposes. Subject headings: Simulations – Cosmology: weak lensing – Galaxies: Surveys 1. Introduction In the next decade, the quantity of data available to cosmology will rapidly increase. New telescopes, both on the ground and in space, promise to image many thousands of square degrees. The cosmology commu- nity is now tasked with developing methods to analyze such data, and to extract as much information from various astronomical phenomena. These methods need to achieve unprecedented precision if the promise (and potential statistical power) of future surveys are to be fully exploited. Developing image analysis tools requires realis- tic mock data, containing as many instrumental ef- fects as possible, plus a known, underlying cosmo- logical signal, against which measurements can be 1 Jet Propulsion Laboratory, California Institute of Technology 4800 Oak Grove Drive, Pasadena, CA 91109, United States 2 Northwestern University, Department of Physics and Astron- omy 2145 Sheridan Rd, Evanston, IL 60208, United States 3 Institute for Astronomy, University of Edinburgh, Royal Obser- vatory Blackford Hill, Edinburgh, EH9 3HJ, United Kingdom 4 Harvard University, Department of Physics, 17 Oxford St. Cambridge, MA 02138, United States 5 California Institute of Technology, 1201 E. California Blvd. Pasadena, CA 91125, United States judged. To generate galaxy shapes in simulated ground-based images, Skymaker (Erben et al. 2001) uses a simple physical model of concentric isophotes with a de Vaucouleurs profile for elliptical galaxies, and an additional, exponential component for spirals. By varying the model parameters, one can generate an unlimited number of unique simulated galaxies. However, deep field images from space-based tele- scopes contain galaxies with features more complex than these smooth analytical models can reproduce. Here we present the full simage pipeline (as grad- ually developed in Massey et al. 2004, Massey et al. 2007b and Ferry et al. 2008), which empirically mim- ics the complex morphologies of galaxies seen in real data, such as the Hubble Ultra Deep Field (UDF: Beckwith et al. 2006) or Hubble Space Telescope (HST) COSMOS survey (Scoville et al. 2007). The galaxy morphologies are captured via a shapelet de- composition (Refregier et al. 2003; Refregier & Bacon 2003; Bernstein & Jarvis 2002; Massey & Refregier 2005; Massey et al. 2007a), which also makes it easy to introduce a specified weak gravitational lensing sig- nal, useful to hone shear measurement methods. The simage code is written in the Interactive Data Language (IDL) and can be downloaded from 1

Upload: dangnhu

Post on 28-Aug-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

arX

iv:1

008.

4112

v1 [

astr

o-ph

.IM]

24 A

ug 2

010

Astronomical image simulation for telescope and survey development

Benjamin M. Dobke1, David E. Johnston2, Richard Massey3, F. William High 4, Matt Ferry5,Jason Rhodes1,5, R. Ali Vanderveld1,5

ABSTRACTWe present thesimagesoftware suite for the simulation of artificial extragalactic images, based empir-

ically around real observations of the Hubble Ultra Deep Field (UDF). The simulations reproduce galaxieswith realistic and complex morphologies via the modeling ofUDF galaxies asshapelets. Images can becreated in theB, V, i andz bands for both space- and ground-based telescopes and instruments. The sim-ulated images can be produced for any required field size, exposure time, Point Spread Function (PSF),telescope mirror size, pixel resolution, field star density, and a variety of detector noise sources. It hasthe capability to create images with both a pre-determined number of galaxies or one calibrated to thenumber counts of pre-existing data sets such as the HST COSMOS survey. In addition, simple optionsare included to add a known weak gravitational lensing (bothshear and flexion) to the simulated images.The software is available in Interactive Data Language (IDL) and can be freely downloaded for scientific,developmental and teaching purposes.

Subject headings:Simulations – Cosmology: weak lensing – Galaxies: Surveys

1. Introduction

In the next decade, the quantity of data available tocosmology will rapidly increase. New telescopes, bothon the ground and in space, promise to image manythousands of square degrees. The cosmology commu-nity is now tasked with developing methods to analyzesuch data, and to extract as much information fromvarious astronomical phenomena. These methods needto achieve unprecedented precision if the promise (andpotential statistical power) of future surveys are to befully exploited.

Developing image analysis tools requires realis-tic mock data, containing as many instrumental ef-fects as possible, plus a known, underlying cosmo-logical signal, against which measurements can be

1Jet Propulsion Laboratory, California Institute of Technology4800 Oak Grove Drive, Pasadena, CA 91109, United States

2Northwestern University, Department of Physics and Astron-omy 2145 Sheridan Rd, Evanston, IL 60208, United States

3Institute for Astronomy, University of Edinburgh, Royal Obser-vatory Blackford Hill, Edinburgh, EH9 3HJ, United Kingdom

4Harvard University, Department of Physics, 17 Oxford St.Cambridge, MA 02138, United States

5California Institute of Technology, 1201 E. California Blvd.Pasadena, CA 91125, United States

judged. To generate galaxy shapes in simulatedground-based images,Skymaker(Erben et al. 2001)uses a simple physical model of concentric isophoteswith a de Vaucouleurs profile for elliptical galaxies,and an additional, exponential component for spirals.By varying the model parameters, one can generatean unlimited number of unique simulated galaxies.However, deep field images from space-based tele-scopes contain galaxies with features more complexthan these smooth analytical models can reproduce.Here we present the fullsimagepipeline (as grad-ually developed in Massey et al. 2004, Massey et al.2007b and Ferry et al. 2008), which empirically mim-ics the complex morphologies of galaxies seen in realdata, such as the Hubble Ultra Deep Field (UDF:Beckwith et al. 2006) or Hubble Space Telescope(HST) COSMOS survey (Scoville et al. 2007). Thegalaxy morphologies are captured via ashapeletde-composition (Refregier et al. 2003; Refregier & Bacon2003; Bernstein & Jarvis 2002; Massey & Refregier2005; Massey et al. 2007a), which also makes it easyto introduce a specified weak gravitational lensing sig-nal, useful to hone shear measurement methods.

The simage code is written in the InteractiveData Language (IDL) and can be downloaded from

1

http://www.astro.caltech.edu/ ˜ rjm/shapelets .It also requires the coreshapeletspackage, avail-able from the same location, and certain routinesfrom the NASA Goddard Space Flight Center (GSFC)IDL astronomy user’s library. Those required rou-tines are bundled in thesimagedownload, but up-dated versions may be periodically available fromhttp://idlastro.gsfc.nasa.gov/ . In ad-dition, exploiting the full potential of some sec-tions of simage require SExtractor, available fromhttp://astromatic.iap.fr/software/sextractor/ .

This paper highlights the full capabilities of thecode, its general structure, and the a number of pos-sible uses. In section 2, we briefly detail previous ap-plications and associated results, plus the strengths andweaknesses of the utilized shapelet formalism. In sec-tion 3, we describe the structure of the software pack-age, and discuss the main modules of the software andtheir uses. In section 4, we exploit the software to in-vestigate telescope survey depth. We conclude in sec-tion 5.

2. Capabilities and applications of‘simage’

At the heart ofsimageis the ability of theshapeletsmethod to efficiently and flexibly reconstruct com-plex galaxy morphologies. Shapelets are a complete,orthogonal set of basis functions, and a weighted lin-ear combination of these can represent any localisedimage (Refregier et al. 2003; Bernstein & Jarvis 2002(BJ02); Massey & Refregier 2005). This is analo-gous to a Fourier transform, where weighted com-binations of sines and cosines can be used to recon-struct non-localised images. The mathematical prop-erties of the shapelet basis set make it particularlyconvenient for astronomical image processing, includ-ing quick convolutions with Point Spread Functions(PSF), pixillation, and operations such as transla-tions, rotations, magnifications and shears, that canbe used to add a known signal into a simulated image(Refregier & Bacon 2003; Massey et al. 2007a). Theability to represent shears in a simple manner, allowsfor the inclusion of distorting shears produced by boththe telescope’s optical systems and weak gravitationallensing within galaxy clusters. While a Gaussian-based shapelet representation of a galaxy with a par-ticularly strong central peak, or extended wings, is notideal due to the difficulty reproducing such featureswith Gaussian forms, a number of tests to reproduceexponential radial profiles with shapelet basis func-

Fig. 1.— An example of a spiral galaxy (fromthe Hubble Deep Field) modeled using shapelets(Massey & Refregier 2005).

tions have show good reproduction of the majorityof galaxy shapes with very little bias (Massey et al.2007b).

The simulated images are capable of being pro-duced in theB, V, iandzbands, since they are based ona galaxy morphology catalog pre-constructed from theHubble UDF. Hence, the available passbands allowedby the F485W, F606W, F7775W, and F850LP filters ofthe HST.

For a more in depth description of the method, in-cluding a general mathematical introduction to its ap-plication to image simulation, the reader is directedto the aforementioned references and Appendix A. Inthis section, we shall highlight the capabilities such ashapelet formalism provides, along with associated ap-plications and results.

2.1. Prior applications: Shear studies, data codec,and mission development

Previous applications of the shapelets image simu-lation, in it’s simageincarnation as presented here, orin other forms, have ranged from direct image creationfor community shear-analysis studies, data compres-sion investigations, and telescope/instrumental devel-opment. We will briefly detail these below.

The Shear TEsting Program (STEP) was a collab-orative project which aimed to improve the accuracyand reliability of all weak gravitational lensing mea-surements in preparation for the next generation ofwide-field surveys. STEP was launched in order to testand improve the accuracy and reliability of all thesemethods through the rigorous testing of shear mea-surement pipelines, the exchange of data and the shar-ing of technical and theoretical knowledge within the

2

Fig. 2.— Left: Plot of neff galaxy counts vs. exposure time at a pixel scale of 0.1 arcseconds. Theneff quantity inthis context is the number of galaxies within a given survey area that meet a particular desired size and signal-to-noiseratio. Right: Plot of neff galaxy counts vs. pixel scale at an exposure time of 400 seconds. These particular plots weregenerated from images created in thei-band (band 2 insimage) for a mock-up telescope 1.2m diameter mirror over a6 arcminute2 area of the sky - see Table 1.

weak lensing community (Massey et al. 2007b). Here,the shapelets basedsimagecode was used to createimage data with incorporated shear fields for analy-sis in the testing program. Subroutines of the codewere also used in the analysis of the resultant data.(Schrabback et al. 2009) used images with simulatedshear produced by this software to verify and vali-date their weak lensing code, which they then usedto provide the first direct detection of dark energy us-ing weak lensing tomography. Opening up the is-sue to wider participation, particularly computer scien-tists, the GRavitational lEnsing Accuracy Testing 2008(GREAT08; Bridle et al. 2008; Bridle et al. 2009), andagain allowed for the application ofsimage’s imagesimulation capabilities.

In Vanderveld et al. (2010),simagewas utilised totest compression-decompression (codec) algorithmsand methods for future visible survey telescopes. Thisis of vital importance given the vast quantities of databoth space- and ground-based survey telescopes arepredicted to produce in the coming years ( 10s ofpetabytes; e.g. LSST; Ivezic 2007). The roll ofsim-agehere was to create batches of simulated image datathat recreated sizes, morphology, fluxes, and shapesthat accurately mimic those we might expect from avisible survey telescope in both orbit and on Earth.

Specific mission development has also been an

application of thesimage routines. In particular,the simulation pipeline has been a critical opti-mization tool in the optical design and observationstrategy for ESA’s cosmic visions candidate Euclid(Refregier et al. 2010), Nasa/DOE Joint Dark EnergyMission (JDEM) concepts (e.g. SNAP; Jelinsky 2006;High et al. 2007), and the weak lensing balloon mis-sions.

2.2. Example application

As a demonstration of one ofsimage’s potentialuses, we present an example investigation intended toexplore telescope survey depth, specifically the rela-tion between the effective number of galaxies observedin a survey sample,neff , vs. pixel scale and expo-sure time for a mock-up space telescope design (theneff quantity in this context is the number of galaxieswithin a given survey area that meet a particular de-sired size and signal-to-noise ratio). A list of possibleinput telescope and instrument parameters are shownin Table 1. We generate images according to these in-puts using a varying the pixel scale between 0.05 and0.40 arcseconds/pixel (with constant exposure = 400s),and the exposure time between 100-800 seconds (withconstant pixel scale = 0.1”/pixel). An example of theoutput as created from a set of images simulated fromsimageis shown in Fig. 2

3

Table 1: Demonstration inputs withintelescope.paramfor a mock-up telescope design

Parameter file input: Value:throughput ratio [0.0, 0.0, 1.2, 0.0, 0.0, 0.0]pixel scale [0.0, 0.0, 0.1, 0.0, 0.0, 0.0] arcsec./pixelread noise 5 electronscollecting area 1.13 m2

band begin 2band end 2exposure time 100 secondsarea 6.0 square arcminutesn star 1000n gal Defaultee50 0.15 arcseconds

3. The simulation pipeline

This section will detail the critical internal routinesof simage, and describe the flow of the simulated im-age creation.

3.1. Module overview

The routinesimage.prois the primary program; itutilizes various routines within the pipeline to manu-facture a simulated image. Keywords listed in Table 2can be used to specify the desired telescope and surveycharacteristics. By default, the image will be producedin theB, V, i andz bands, based on a galaxy morphol-ogy catalog pre-constructed from the Hubble UDF.More permanent changes to the telescope and surveycharacteristics can be fixed in thetelescope.paramfile.

Figure 3 details the pipeline’s main processes in theform of a flow chart. We note from the chart thatthere are three main stages to the pipeline; the multi-wavelength catalog generation, the repopulation of thecatalog images into a field/resolution governed by thedesired telescope parameters, and finally the additionof the various noise components. Other important rou-tines in the pipeline are,

• simagemake shapeletobject.pro: Generatesa pixellated image of one simulated galaxy froma given a set of shapelet coefficients.

• simagemake analytic object.pro: Generatesan object for the image simulations, using an an-alytic profile. The size, magnitude and elliptic-ity are drawn from a real UDF galaxy template.

• num counts frac.pro Calculates the galaxymagnitude distributions normalized to the COS-

MOS survey data at mid magnitudes (Leauthaud et al.2007), and to a compilation of other surveys atlow and high magnitudes (Metcalfe et al. 2001;see§3.2.2 for discussion.)

• get telescopepsf*: Reads in the desired PSFfits file before converting it into shapelet space(* ‘telescope’ represents a variety of telescopeor survey names included in the pipeline e.g.get udf psf, etc.). The PSF is an array of odddimensions and be in logarithmic units, by con-vention.

The desired size of the PSF is quantified in twoways: via the energy that encloses 50% of the PSFenergy (EE50), or the Full-Width at Half Maximum(FWHM). The EE50 term is more commonly usedin optical engineering, whereas FWHM is more com-monly used in science applications. Both are avail-able as user inputs and both have particular advantageswhen creating simulated images. For example, whencomparing the EE50 to that of the FWHM, the formeris more affected by the tail’s profile. For this reason,EE50 is a better measure of how compact something isif you only have one number to describe an object. Asa comparison, a Gaussian with a FWHM of 1.77 pix-els, would have an EE50 of 0.885 pixels, while a typ-ical PSF with the same FWHM of 1.77 pixels, wouldhave an EE50 of 1.21 pixels.

3.1.1. Input catalogue generation

As described in Ferry et al. (2008), the first taskis to generate a catalog of galaxy morphologies fromreal data. Note that galaxy morphologies are alreadyprovided from the UDF and, until better data becomeavailable, this time-consuming section of the pipelineneed not be re-run. However, If desired it is possibleto regenerate the UDF catalogue, or indeed to generateadditional catalogues.

The simulated images are based on UDF data, withphotometric redshifts from Coe et al. (2006). The pro-cess of getting from real data to simulated images, us-ing modules included in the simulation pipeline soft-ware package, is as follows. First, objects in the realdata are detected and cataloged using theSExtractorroutine on the image using a specified configurationfile, config.sexan example of which can be found intheanalysisdirectory of thesimagepackage. The cat-aloged objects are then decomposed into shapelets byrunning shex.pro. This program takes the real im-age, theSExtractorcatalog, and the desirednmax as

4

Table 2: Descriptions of the user inputs fortele-scope.param. These parameter inputs govern tele-scope design and in turn the resultant output im-ages. Some parameter inputs are degenerate, e.g. ifa throughputratio is entered, thefilter filespath is ig-nored.

Parameter file input: Description:throughput ratio Total system throughputs relative to UDFsky level Skylevel for each band (counts/s/arcsec2)zeropoint Chosen zeropoint for the images in each bandpixel scale The instrument pixel scale in arcsecond/pixelpsf type Selects which PSF to usepsf path Path to the user’s chosen PSF .fits fileread noise CCD read noise in number of electronsbackground 0 = background subtracted, 1 = addedcollecting area The mirror collecting area in m2

band begin The band on which to start the simulationsband end The band on which to end the simulationsexposure time Exposure time in secondsarea The area on the sky to simulate in sq. arcminsrandom seed A random seed for all random selectionsgamma The user specified weak lensing shearoutput file pref Selection of output image file namesn star Number of field stars to be addedn gal Number of field galaxiesfilter files Path to user’s transition filter filesee50 The half light radius of the PSFfwhm The full-width at half-maximum of the PSF

Table 3: Meaning of flags output fromshex.prodetail-ing to the user how well a given object was modeledwith shapelets. A 0 value implies a successful decom-position, while a 10 signals failure. A FWHM of 0implies a profile fit to the object failed.

Flag: Status:0 OK1 Nearby object2 Severe overlapping with nearby object3 Object is near a saturated pixel4 Object is near a masked region5 Object is near the edge of the image6 Object is itself masked out7 Object has 0 FWHM8 Too few background pixels around object9 Object entirely overlapped by neighbors10 Routine sexcat2pstamp crashed

inputs, and outputs a catalog of shapelet coefficientsfor the objects in theSExtractorcatalog. We chosenmax = 20 for the optical band - which is sufficient tomodel the HST PSF.shex.proalso uses the shapeletsfocus suite of routines to optimize thenmax, β, andcentroid parameters. The program also outputs flags,from 0 to 10, to tell the user how well a given objectwas modeled with shapelets, 0 being good and 10 sig-naling failure. A list of the flags and their correspond-ing criteria is shown in Table 3. There is also an op-tion in shex.pro to remove a specified constant PSF,which can be modeled from the stars in the image.The PSF removal from the UDF catalog is a three stepprocess. Firstly, the HST PSF is modeled by select-ing stars in the UDF images and decomposing theminto a sum of shapelet basis functions. These starsare the best representation of the PSF contained withinthe image. Secondly, the galaxy objects of an image,once also decomposed into shapelet space, have thestar/PSF shapelets subtracted, thus leaving a catalogof galaxies with the HST PSF removed. The stars inthe newly created catalog are then discarded, since anyPSF model that will be introduced will be formed fromnew simulated stellar images.

Galaxies then have to be cross-matched acrossbands of data. This is done usingsrcor.pro, in theIDL Astronomy Library, to a tolerance of 1 arcsecond.Some galaxies will appear in all bands and some willappear in a subset, but each galaxy is given an ID num-ber and then a master catalog is created that containsthe information for each unique galaxy ID, includingits position, redshift, and shapelet coefficients in eachband. For the UDF, this catalog is stored as a struc-ture calledshapecattotal trim.sav, which should belocated in the specifieddata directory alongside thenecessarypsf folder. Thesimageprogram then ran-domly draws galaxies (in the form of their decom-posed shapelet coefficients) from this catalog whenproducing simulated images.

3.1.2. Noiseless image simulation

The pipeline would then proceed as follows: Thesimulated image is scaled according to the instrumentand filter throughput. These are defined by parametersthroughputratio andfilter files. The first specifies thethroughput ratio for each band compared to that of theHST-Advanced Camera for Surveys (ACS), should italready known by the user. The second option allowsyou to calculate thisthroughputratio array by speci-fying an arbitrary filter curve. Thisfilter files lists the

5

total desired instrumental throughput for each band, inthe format of wavelength (A) vs. throughput, where1.0 represents 100% transmission. The filter curve isthen integrated and compared against the HST/ACSfilter curve to generate the correctly normalized arraythroughputratio. In this way, it is possible to use UDFimages but normalized for the throughput of any giventelescope design. However, note that while the inte-gral of the throughput is considered, its shape is not.For example, the shape of galaxies is therefore notchanged by a transmission curve that peaks redwardof the HST/ACS filters and should therefore enhancethe bulges of galaxies. The pipeline then reads in thespecified PSF file, which remains constant throughoutthe simulation.

Thesimageroutine will then pass tosimageassembleimagewhich reads in the UDF shapelet catalog and

populates the image with eithern galnumber of galax-ies, or a pre-defined default that is calibrated to ex-isting observational data (the HST Cosmos survey;Scoville et al. 2007). At this point any specified weaklensing shear, represented by the 2D array [γ1,γ2],is added to each galaxy, i.e a constant value acrossthe field (see§3.4). The pixel scale of the shapeletcatalog galaxies are adjusted to the specified value atthis stage. A similar process is performed to pop-ulate the image with field stars, each of which arerepresented by the PSF. Here the subroutinesim-agestar magnitudedistribution generates a randomflux level for stars in the image. The stars follow thestellar luminosity function measured at the galacticpoles and tabulated in Allen (2000).

We note that the pipeline also has the ability to cre-ate a simulated image containing objects with analytic(e.g. de Vaucouleurs) profiles with the same size, mag-nitude and ellipticity distributions as the UDF shapeletcatalog. The shapelet coefficients are not used for anypurpose other than the determination of these distribu-tions. Hence the pipeline can also use a non-shapeletmethod to create simulations, which can themselves beused to test shapelet based shape-measurement tech-niques if desired.

The output noiseless image is written in units ofphotons or counts per second, along with a mockSEx-tractor output file with the all the objects’ knowninput positions, sizes, magnitudes, ellipticities andstar/galaxy classifications. All files are output to theDatadirectory.

Although the galaxy catalogues are created fromthe UDF, the magnitude distribution of the resultant

Fig. 3.— Flow chart of the simulation pipeline’s keyprocesses beginning with the initial input UDF imagesto the final output. fits images.

6

Fig. 4.— A comparison of galaxy number density vs.galaxy size for both real HST-COSMOS survey data(solid line; Leauthaud et al. 2007) andsimagesimu-lated COSMOS data (dashed line). The galaxy size ismeasured via the SExtractorFWHM IMAGE. The x-axis scale is the FWHM cut size - i.e. galaxies thathave a given size and above. Simulated data usedCOSMOS survey parameters of 0.03 arcseconds/pixeland an exposure time of 2000 seconds.

simulated images is normalized to a variety of exist-ing galaxy surveys (described below) rather than justdrawing randomly from the UDF galaxy magnitudes.Since the decomposed shapelet objects have color rep-resentative of real galaxies, this approach can apply toall bands available to the simulation pipeline (i.e.B, V,i andz). The routinenum counts frac.pro utilizes thefollowing number (N) counts relation;

N = B ∗ 10(A∗m) (1)

whereA andB are normalization factors, andm is thegalaxy magnitude. The form of this expression and thevalues of the normalization factors A and B are takenfrom existing COSMOS survey analysis between mag-nitudes 21 and 26 (Leauthaud et al. 2007). COSMOSis the widest HST survey and as such is least affectedby cosmic variance/sample size. It is also the closestdata to the future space surveys thatsimageaims tomodel. Below magnitude 21 and above magnitude 26the the number counts are fit to various survey sourcesas compiled in Metcalfe et al. (2001). The form is con-

tinuous at these transition points and results in a real-istic number count relation for the simulated images atlow, mid, and high magnitudes.

In figure 4 we display a comparison of galaxy sizesin the HST-COSMOS survey and those from ansimagesimulated COSMOS field. We see that the normal-ization of simageto the COSMOS counts discussedabove allows the pipeline to obtain a very similar sizesdistribution. We note that there are differences at thelower size limit due tosimagereproducing fewer verysmall galaxies in the simulation. This is because thepipeline does not decompose the smallest galaxies intoshapelets since some of them are noise (or noisy) andas such do not end up in the shapelets catalog.

3.1.3. Addition of noise

The routinesimageadd noise.proreads in the. fitsformat noise-free image, and writes out a noisy im-age, plus an inverse variance weight map. This is veryfast to run, and is intentionally kept separate from theprevious sections because a common task is to inves-tigate the effect of changing the survey exposure time.In this case, the same noise-free image can be used,andsimageadd noise.pro run multiple times in iso-lation, with different input parameters. Specific noisefeatures and detector effects that can be added to animage post-creation, e.g. dark current, are includedwithin thesimageadd noise.proroutine itself and areactivated by selecting the corresponding flags when theroutine is initially called.

Noise is then added to the image. For convenience,the noise model is calculated in two separate compo-nents: shot noise on astrophysical sources, and on thesky background. In both cases, a random distributionof uncorrelated pixel values is drawn from a Gaussianwith width equal to the square root of the counts ineach pixel. The sky background level is estimated bydefault from that in the UDF, but can also be specifiedin telescope.param, in units of counts/second/arcsec2.By default, the constant sky background level is thensubtracted, although this behavior can be turned off viathe BACKGROUND keyword.

Additional options include the ability to add readnoise, to correlate the background noise to cheaplymimic the effects of DRIZZLE, to truncate satu-rated pixels, and to truncate at zero any non-physical,slightly negative pixel values (arising from noise ormodeling problems in the original UDF). None ofthese are enabled by default. To mimic the effects

7

of DRIZZLE, the image is convolved with a kernelsimilar to the drizzle drop kernel and the original pixelsquare. This has the effect of correlating adjacentpixels in the image, and is most noticeable in the back-ground noise in blank areas well away from sources.

4. Summary

We have introduced an IDL simulation pipeline,simage, that creates mock deep field survey images bydrawing from a catalog of Hubble Ultra Deep Fieldgalaxies. Each galaxy in the catalog is decomposedinto a set of analytic shapelet basis functions which cancompletely describe their morphological properties ina simple manner. We have shown how this catalog canthen be used to populate a field of any given size andresolution depending on the user’s requirements. Thepipeline allows the user complete control over parame-ters such as exposure time, PSF type, mirror size, pixelscale, field star density, and noise, and simulates fieldsin theB, V, i andzbands.

The code also has the ability to introduce a weaklensing signal into the data, allowing the output tobe used for studies into weak lensing reconstruc-tion analysis. It is envisioned that the code willbe used as a tool for research, instrumental de-velopment, and teaching. It is available to down-load as a self contained package of IDL modules atwww.astro.caltech.edu/∼rjm/shapelets.

Acknowledgments

Thanks to Molly Peeples and Banaby Rowe. BMDand JR acknowledges financial support through theNASA-JPL Award/Project”Weak Gravitational Lens-ing: The Ideal Probe of Dark Matter and Dark En-ergy”. RJM acknowledges financial support throughEuropean Union grant MIRG-CT-208994 and STFCAdvanced Fellowship PP/E006450/1. The work ofBMD, JR, and AV were carried out at the Jet Propul-sion Laboratory, California Institute of Technology,under contract with the National Aeronautics andSpace Administration (NASA).

Appendix A: Shapelets formalism

Shapelets come in two flavors: Cartesian shapeletsare separable inx andy, and polar shapelets inr andθ. There is a one-to-one mapping between the two, sowithout loss of generality, we shall adopt whichever

has the more convenient symmetries for the task athand. The polar shapelet basis functions

χn,m(r, θ;β) =(−1)

n−|m|2

β|m|+1

(n−|m|

2

)!

π(

n+|m|2

)!

1

2

×

r|m|L|m|n−|m|

2

(r2

β2

)e

−r2

2β2 e−imθ, (2)

whereLqp(x) are the Laguerre polynomials, have an

overall scale sizeβ and are parameterized by two in-tegers,n and m, which are the number of oscilla-tions in the radial and tangential directions. The ba-sis functions are calculated usingshapeletschi.pro.Using shapeletsdecomp.pro, a galaxy (or star) im-ageI(r, θ) can then be decomposed into (complex)“shapelet coefficients”fn,m

fn,m =

∫∫

R

I(r, θ) χn,m(r, θ;β) r drdθ , (3)

so that the (wholly real) image can be reconstructed,usingshapeletsrecomp.pro as

I(r, θ) =

∞∑

n=0

n∑

m=−n

fn,mχn,m(r, θ;β) . (4)

In practice, it is necessary to truncate the expansionat some maximum value ofn. Figure 1 shows an ex-ample galaxy image and its reconstructed counterpartusing shapelets up to ordernmax = 20. It can be seenthat the model easily captures the major features of theoriginal galaxy.

In shapelet representation, convolution betweentwo images (such as a galaxy and a telescope’s PointSpread Function) is simply a matrix multiplication oftheirfn,m coefficient arrays (Refregier et al. 2003). Inthe code, this is implemented viashapeletsconvolve.pro.It is also possible to perform a deconvolution by in-verting the PSF matrix; this is incorporated withinshapeletsdecomp.pro.

While previous operations were performed in po-lar shapelets since the functions are separable inrand θ (rendering many operations more intuitive),pixillation can be performed most easily by switch-ing to Cartesian shapelets, then switching back. Aclosed form for the integrals of Cartesian shapelet ba-sis functions over rectangular pixels is given in§4.3 of

8

Massey & Refregier (2005), and is enabled by defaultin shapeletschi.pro.

We shall use several transformations of the galaxyimages, first to randomize their appearance in the finalsimulation, and then to impose a gravitational lensingsignal. In shapelet space, galaxies can be easily rotatedby adjusting the phase of their (complex) coefficientsfn,m, or reflected in thex-axis by taking their complexconjugates. A weak gravitational lensing shear signalγ can be applied to first order by mixing adjacent co-efficients according to the mixing matrix

1 + S(γ) : fn,m → f ′n,m = fn,m (5)

4

{√(n+m)(n+m− 2) fn−2,m−2

−√(n−m+ 2)(n−m+ 4) fn+2,m−2

}

+γ∗

4

{√(n−m)(n−m− 2) fn−2,m+2

−√(n+m+ 2)(n+m+ 4) fn+2,m+2

}

as described in§2.3 of Massey et al. (2007a), whichalso provides similar operations for flexion. In theabove,1 corresponds to the identity operator, whileS corresponds the to shear operator. Routines to im-plement such operations in practice are located in theshapelets/operations/subdirectory.

The above prescription for shear is only accurateto orderγ. This will be insufficiently accurate forvery high precision work, or if the gravitational lens-ing signal is particularly large. A new innovation forsimageis that this transformation can now be general-ized to include higher orderγ2, γ3, etc. terms. This isachieved mathematically by exponentiating the opera-tion (Bernstein & Jarvis 2002). For a practical imple-mentation to fourth order, note that the first four termsin an exponential expansion

1 + S +S2

2!+

S3

3!+

S4

4!=

3

8+

1 + S

3+

(1 + S)2

4+

(1 + S)4

24(6)

whereS here is the shear operator but could equally bereplaced by any other. To perform this on a shapeletmodel we simply need to apply the linear mapping (5)four times, recording the new coefficientsf ′

n,m at eachstage, and add them to the original coefficients in the

ratio 38 : 1

3 : 14 : 0 : 1

24 . This behavior is controlledvia the ORDER keyword inshapeletsshear.pro, andis set to 4 by default.

Note that, as discussed in BJ02, there is a some-what arbitrary choice for these higher order terms,which can be changed depending on the required def-inition of shear. The expansion above changes an in-trinsically circular source into an ellipse with majorand minor axesa and b via a distortionδ ≡ (a2 −

b2)/(a2 + b2). A “conformal shear”,ν = arctanh(δ),produces a slightly different ratio of major and minoraxes, but can be achieved by simply adjusting the in-put shear. A fourth-order implementation of a confor-mal shear in shapelet space perfectly matches the real-space transformation of highly oversampled imageswithin a computer’s numerical precision (B. Rowe,priv. comm. 2008). It is therefore not just faster, butshould be accurate within 1% for shears up toγ ≈ 0.47(Massey & Goldberg 2008). For a typical cosmologi-cal gravitational lensing signal of a few percent, ap-plying only a first order shapelet-based shear yieldspixel values in the final image that are incorrect at alevel of approximately one part in10−3, and chang-ing from δ to ν yields differences of around one partin 10−5. Because of this, thesimagepipeline routinessuchsimagemake analytic object.pro, uses the con-formal shear,ν, when called to include a shear signal.

REFERENCES

Allen, 2000, “Allen’s Astrophysical Quantities”, CoxA. (Ed), The Athlone Press, London, U.K., 4th Edi-tion

Beckwith S. V. W. et al., 2006, AJ, 132, 1729

Bernstein G., & Jarvis M., 2002, AJ, 123, 583

Bridle S., et al., 2009, arXiv:0908.0945

Bridle S., et al., 2008, AnApS, 3, 6

Coe D., Bentez N., Sanchez S., Jee M.,Bouwens R., Ford H., 2006, AJ, 132, 926.http://adcam.pha.jhu.edu/∼coe/UDF/

Erben T., van Waerbeke L., Bertin E., Mellier Y.,Schneider P., 2001, A&A, 366, 717

Ferry M., Rhodes J., Massey R., White M., Coe D.,Mobasher B., 2008, APh, 30, 65

High F. W., Rhodes J., Massey R., Ellis R., 2007,PASP, 119, 1295

9

Ivezic Z., 2007, AAS, 210, 6605

Jelinsky P., 2006, AAS, 209, 9809

Leauthaud A., et al., 2007, ApJS, 172, 219

Refregier A., 2003, MNRAS, 338,35

Refregier A., & Bacon D., 2003, MNRAS, 338, 48

Refregier A., & The Euclid Imaging Consortium, etal., 2010, arXiv:1001.0061

Metcalfe N., Shanks T., Campos A., McCracken H. J.,& Fong R., 2001, MNRAS, 323, 795.

Massey R., Refregier A., Conselice C., Bacon D.,2004, MNRAS, 348, 214

Massey R., & Refregier A., 2005, MNRAS, 363, 197

Massey R., Rowe B., Refregier A., Bacon D., Berge J.,2007a, MNRAS, 380, 229

Massey R., et al., 2007b, MNRAS, 376, 13

Massey R., & Goldberg D., 2008, ApJL, 673, 111

Schrabback T., et al., 2009, arXiv:0911.0053

Scoville N., et al., 2007, ApJS, 172, 1

Vanderveld R. A., et al., 2010, in prep.

This 2-column preprint was prepared with the AAS LATEX macrosv5.2.

10