the geneva reduction and analysis pipeline for high...

8
Mon. Not. R. Astron. Soc. 000, 1–8 (2014) Printed 30 November 2014 (MN L A T E X style file v2.2) The Geneva Reduction and Analysis Pipeline for High-contrast Imaging of planetary Companions J. Hagelberg 1? , D. S´ egransan 1 , S. Udry 1 , and F. Wildi 1 1 Observatoire de Gen` eve, Universit´ e de Gen` eve, 51 Chemin des Maillettes, 1290, Versoix, Switzerland Accepted 1988 December 15. Received 1988 December 14; in original form 1988 October 11 ABSTRACT We present an new angular differential imaging (ADI) reduction pipeline where all geometric image operations are based on Fourier transforms. To achieve this goal the entire pipeline is parallelised making it possible to reduce large amounts of observation data without the need to bin the data. The specific rotation and shift algorithms based on Fourier transforms are de- scribed and performance comparison with conventional interpolation algorithm are given. The test using fake companions injected in real science frames demonstrate the significant gain ob- tained by using geometric operations based on Fourier transforms compared to conventional interpolation. This also translates in a better point spread function and speckle subtraction in with respect to conventional reduction pipelines. Flux conservation of the companions is also demonstrated. This pipeline is currently able to reduce science data produced by VLT/NaCo, Gemini/NICI, VLT/SPHERE, and Subaru/SCExAO. Key words: methods: data analysis – techniques: image processing – stars: planetary systems 1 INTRODUCTION Eighteen years after the first discovery of an exoplanet around a sun-like star (Mayor & Queloz 1995) and the unambiguous detec- tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al. 1995; Rebolo, Osorio & Mart´ ın 1995), more than 900 exoplanets and nearly 1300 brown dwarfs have been discovered, and about 3000 candidates from the Kepler space mission are waiting to be confirmed. These numbers are growing ever faster as the pace of new detections is increasing, thanks to newly built instruments pur- posely designed to search for sub-stellar objects, but also to the optimisation of data analysis techniques. The vast majority of exoplanets are currently detected with the radial velocity or transit techniques. However, orbital periods longer than the time-span of the observations will hardly be de- tected by these two techniques, inducing a sharp decrease in de- tectability beyond 5 AU and leaving unprobed a large area in the mass-separation parameter space. Direct imaging on the opposite probes the outer orbital regions not accessible with the two pre- vious techniques, but the high contrast at small separation which needs to be reached turns it into one of the most challenging ex- oplanet detection techniques. The main hurdle to detect compan- ions by high contrast imaging is to remove the stellar point spread function (PSF) without diminishing the signal from the faint com- panion. This can be achieved through instrumental improvements or by improving the observing and data reduction techniques, with efforts focusing on these two fronts concurrently. Since the first planets around stars have been directly imaged ? E-mail: [email protected] (Marois et al. 2008; Lagrange et al. 2009), the rate of exoplanets detected by direct imaging is steadily increasing thanks to progress to overcome the many technical challenges and careful selection of the target samples. But the small number of detections in total contrasts with the many direct imaging surveys which generated only few or no detection at all (e.g., Masciadri et al. 2005; Biller et al. 2007; Lafreni` ere et al. 2007a; Chauvin et al. 2010; Heinze et al. 2010; Vigan et al. 2012; Bowler et al. 2012; Nielsen et al. 2013; Wahhaj et al. 2013; Janson et al. 2013; Crepp et al. 2012). The technical challenge of subtracting the host star PSF is cur- rently based on two complementary differential imaging methods, with the same core idea of generating a PSF as similar as possible to the one which should be subtracted, but without having any po- tential companion signal in it. The difficulty being that the speckle structure of the PSF evolves in time, with many speckles in the stellar halo having a similar shape and intensity to what would be expected from a companion. The first method, called Simultaneous Differential Imaging (SDI), is based on simultaneous observations in multiple bands taking advantage of the chromaticity of the speck- les, in other words the speckle pattern scales with the wavelength but the potential companion stays on the same spot (Racine et al. 1999; Lenzen et al. 2004). The other method known as Angular Differential Imaging (ADI) is based on the rotation of the field (Liu 2004; Marois et al. 2006), and has proven to be currently the most efficient method for PSF subtraction. These two methods do not re- quire the use of a coronograph even though their use can increase the detection limits in certain cases. Finally, the two methods can be combined by letting the field rotate while observing simultaneously in multiple bands. Nearly every survey developed its own reduction pipeline most often based on either the Locally Optimized Combi- c 2014 RAS

Upload: others

Post on 11-Mar-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Geneva Reduction and Analysis Pipeline for High ...obswildif/publications/001_GRAPHIC_pipeline_b.pdf · tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al. 1995; Rebolo,

Mon. Not. R. Astron. Soc. 000, 1–8 (2014) Printed 30 November 2014 (MN LATEX style file v2.2)

The Geneva Reduction and Analysis Pipeline for High-contrastImaging of planetary Companions

J. Hagelberg1?, D. Segransan1, S. Udry1, and F. Wildi11Observatoire de Geneve, Universite de Geneve, 51 Chemin des Maillettes, 1290, Versoix, Switzerland

Accepted 1988 December 15. Received 1988 December 14; in original form 1988 October 11

ABSTRACTWe present an new angular differential imaging (ADI) reduction pipeline where all geometricimage operations are based on Fourier transforms. To achieve this goal the entire pipeline isparallelised making it possible to reduce large amounts of observation data without the needto bin the data. The specific rotation and shift algorithms based on Fourier transforms are de-scribed and performance comparison with conventional interpolation algorithm are given. Thetest using fake companions injected in real science frames demonstrate the significant gain ob-tained by using geometric operations based on Fourier transforms compared to conventionalinterpolation. This also translates in a better point spread function and speckle subtraction inwith respect to conventional reduction pipelines. Flux conservation of the companions is alsodemonstrated. This pipeline is currently able to reduce science data produced by VLT/NaCo,Gemini/NICI, VLT/SPHERE, and Subaru/SCExAO.

Key words: methods: data analysis – techniques: image processing – stars: planetary systems

1 INTRODUCTION

Eighteen years after the first discovery of an exoplanet around asun-like star (Mayor & Queloz 1995) and the unambiguous detec-tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al.1995; Rebolo, Osorio & Martın 1995), more than 900 exoplanetsand nearly 1300 brown dwarfs have been discovered, and about3000 candidates from the Kepler space mission are waiting to beconfirmed. These numbers are growing ever faster as the pace ofnew detections is increasing, thanks to newly built instruments pur-posely designed to search for sub-stellar objects, but also to theoptimisation of data analysis techniques.

The vast majority of exoplanets are currently detected withthe radial velocity or transit techniques. However, orbital periodslonger than the time-span of the observations will hardly be de-tected by these two techniques, inducing a sharp decrease in de-tectability beyond≈ 5 AU and leaving unprobed a large area in themass-separation parameter space. Direct imaging on the oppositeprobes the outer orbital regions not accessible with the two pre-vious techniques, but the high contrast at small separation whichneeds to be reached turns it into one of the most challenging ex-oplanet detection techniques. The main hurdle to detect compan-ions by high contrast imaging is to remove the stellar point spreadfunction (PSF) without diminishing the signal from the faint com-panion. This can be achieved through instrumental improvementsor by improving the observing and data reduction techniques, withefforts focusing on these two fronts concurrently.

Since the first planets around stars have been directly imaged

? E-mail: [email protected]

(Marois et al. 2008; Lagrange et al. 2009), the rate of exoplanetsdetected by direct imaging is steadily increasing thanks to progressto overcome the many technical challenges and careful selectionof the target samples. But the small number of detections in totalcontrasts with the many direct imaging surveys which generatedonly few or no detection at all (e.g., Masciadri et al. 2005; Billeret al. 2007; Lafreniere et al. 2007a; Chauvin et al. 2010; Heinzeet al. 2010; Vigan et al. 2012; Bowler et al. 2012; Nielsen et al.2013; Wahhaj et al. 2013; Janson et al. 2013; Crepp et al. 2012).

The technical challenge of subtracting the host star PSF is cur-rently based on two complementary differential imaging methods,with the same core idea of generating a PSF as similar as possibleto the one which should be subtracted, but without having any po-tential companion signal in it. The difficulty being that the specklestructure of the PSF evolves in time, with many speckles in thestellar halo having a similar shape and intensity to what would beexpected from a companion. The first method, called SimultaneousDifferential Imaging (SDI), is based on simultaneous observationsin multiple bands taking advantage of the chromaticity of the speck-les, in other words the speckle pattern scales with the wavelengthbut the potential companion stays on the same spot (Racine et al.1999; Lenzen et al. 2004). The other method known as AngularDifferential Imaging (ADI) is based on the rotation of the field (Liu2004; Marois et al. 2006), and has proven to be currently the mostefficient method for PSF subtraction. These two methods do not re-quire the use of a coronograph even though their use can increasethe detection limits in certain cases. Finally, the two methods can becombined by letting the field rotate while observing simultaneouslyin multiple bands. Nearly every survey developed its own reductionpipeline most often based on either the Locally Optimized Combi-

c© 2014 RAS

Page 2: The Geneva Reduction and Analysis Pipeline for High ...obswildif/publications/001_GRAPHIC_pipeline_b.pdf · tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al. 1995; Rebolo,

2 J. Hagelberg, D. Segransan, S. Udry, and F. Wildi

nation of Images (LOCI) (Lafreniere et al. 2007b) or more recentlyPrincipal Component Analysis (PCA) (Soummer, Pueyo & Larkin2012; Amara & Quanz 2012).

Here we present the Geneva Reduction and Analysis Pipelinefor High-contrast Imaging of planetary Companions based on ADIfor PSF subtraction, which makes intensive use of Fourier analysis.It was specifically developed for the Geneva high-contrast imag-ing search of companions revealed by radial velocity trends in theHARPS and Coralie surveys.

2 THE GENEVA HIGH-CONTRAST IMAGING SEARCHOF COMPANIONS REVEALED BY RADIALVELOCITY TRENDS IN THE HARPS AND CORALIESURVEYS

Our campaign aims at detecting with direct imaging companionsrevealed by the RV trend they are causing, based on data from ourtwo CORALIE and HARPS RV planet-search surveys. The radialvelocity data spans over more than a decade with a precision reach-ing below 1 m/s in the case of HARPS so that trends induced bysub-stellar companions on wide orbits can readily be detected. Theselected targets are observed using VLT/NaCo and the angular dif-ferential imaging technique with deep observations of up to fourhours on target in order to reach the faint companions which hadtime to cool down. Our targets are all bright which results in inte-gration times below one second to reach saturation, and in order notto resort to frame binning we are using the cube mode offered byNaCo where frames are stacked into a data cube. Each cube con-taining hundreds of frames is then saved into a single fits file withthe benefit of reducing readout overheads during observations.

2.1 Parallelisation

The four hours of observation on NaCo used in our campaign leadto roughly 100GB of data and 100’000 frames. A straight forwardsingle core reduction would take an extremely long time and wouldrun out of memory before finishing, due to the many complex oper-ations involved in the data reduction mostly based on Fast FourierTransforms (FFT). The most widely used and easiest solution tothis large data handling issue would be to average bin the data.

By suitably binning the frames, one can decrease the totalamount of data to a quantity which fits the hardware limitations.The drawback is that valuable information gets lost in the binningprocess. First of all, the characteristics of atmospheric turbulenceare not constant in time so is also the quality of the adaptive op-tics turbulence correction. The Strehl ratio for binned frames is themean ratio of the frames in the bin, so that if half of the frames havepoor adaptive optics (AO) correction of the final binned frame willalso have below average Strehl, even though the other half of theframes had good Strehl. Furthermore, binning frames before recen-tring and correcting for the field rotation smears out the companionpoint spread function which in turn decreases its signal in the finalproduct.

The different algorithms of the pipeline fit very well to a dataparallelism scheme, which focuses on distributing the data acrossdifferent parallel computing nodes. A master node shares the databetween the slave nodes, which in turn only have a fraction of thedata to process. Once the slaves have finished, the data is gatheredby the master and reassembled. Two different types of parallelisa-tion are used, which differ on the way the data is shared between thenodes. If the operations are pixel based, the spatial parallelisation

scheme is used. In this scheme the datacube is cut in pieces alongthe time axis, which means that each node receives one specific re-gion of all the frames (see Figure 1a). The other scheme, temporalparallelisation, is used when the whole frame is needed for a spe-cific operation. This is for example the case for shifts and rotations.The datacube is then separated in frame packages, and each nodereceives a different package containing full frames (see Figure 1b).

The pipeline is implemented in python using C and Fortranlibraries for the calculation intensive parts. The parallelisation isachieved using the Open Message Passing Interface (OpenMPIGabriel et al. (2004)). Parallelisation can be distributed transpar-ently among many different nodes, independently of their archi-tecture. The interface between the python code and OpenMPI ishandled by the mpi4py module (Dalcın et al. 2008). All the datareduction steps given in this chapter are parallelised, and based onthe specificity of the process either in spatial or time parallelisation.

3 ADI DATA REDUCTION

The pipeline was initially developed to reduce non-coronographicsaturated ADI observations in L’ band (3.8µm) from the CONICA1024x1024 InSb Aladdin 3 detector which is part of the NaCoinstrument at VLT (Lenzen et al. 2003). It was later extendedto process coronographic data from NaCo and GEMINI/NICIin any band. Current work is ongoing to adapt the pipeline toVLT/SPHERE and Subaru/SCExAO.

The philosophy of this pipeline is to preserve the companionphotometry by relying on techniques which have the least impacton the signal. Conservation of the noise structure is also a priority inorder to achieve an efficient noise subtraction. This is achieved byapplying the geometric transformations for centering and rotationin Fourier space. Another important aspect of the pipeline is thescalable parallelisation, which makes it possible to run it on any-thing from a cluster for high performance computing (HPC) downto any modern laptop.

The reduction procedure can be partitioned in four sections:

(i) registration 3.1(ii) cosmetics 3.2(iii) psf subtraction 3.3(iv) derotation 3.4

3.1 Registration

The very first step of the reduction process is the registration. Everydata frame is analysed and a table is generated containing for everyframe the time of exposure, the parallactic angle, the star centre andother point spread function characteristics needed for the differentreduction steps. Even though the data-cubes are not modified at thisstep, it is a key element of the reduction as any error on the angleor star centre determination smears out the companion signal.

The registration process is also used to assess the quality ofthe adaptive optics correction for every single frame. This qualityestimate is than later used to keep only the best frames in a kind oflucky adaptive optics.

3.1.1 Parallactic angle

The parallactic angle varies in time as the star moves in the sky, andits hour angle changes. Based on the “Local Sidereal Time” (LST)

c© 2014 RAS, MNRAS 000, 1–8

Page 3: The Geneva Reduction and Analysis Pipeline for High ...obswildif/publications/001_GRAPHIC_pipeline_b.pdf · tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al. 1995; Rebolo,

GRAPHIC 3

Time1 2 3 4

Nodes:

(a) Spatial parallelisation

Node 1

Node 2

Node 3Node 4

(b) Time parallelisation

Figure 1. The two different data parallelism schemes used by the pipeline. In spatial parallelism (a), the observation frames are cut along the time axis. Eachnode one a different region of the frame. In time parallelisation (b), the frames are distributed among the nodes. Each node processes a different frame, orrather frame group.

given in seconds in the FITS header, and the right ascension α ofthe star (given in degrees), the hour angle h is given by:

h =15 ·LST

3600−α

When observing with NACO in cube mode the frames arestored in data-cubes of 30 to more than 500 frames, with only onesingle header. This implies that the hour angle for each single framecannot directly be derived from the header, since solely one LSTvalue is given. Thus the observing time for every single frame hasto be interpolated in order to get the correct parallactic angles.

Frame loss can be as high as 39% when using sub-second in-tegration times on NACO, which in turn induces errors on the inter-polated individual frame hour angles. These errors eventually yieldwrong parallactic angles, which have two adverse effects on thepossible companion. First the companion signal gets smeared, thuslowering the signal to noise ratio, and second the companion self-subtraction risk is higher as non-optimal point spread functions areused for subtraction (see 3.3).

3.1.2 Star point spread function registration

The determination of the star centre position is a complex taskparticularly in the case of saturated point spread function and/orcoronographic imaging because the information at the core of thepoint spread function is often lost. The determination of the cen-tring method accuracy is also limited by the fact that the exactpoint spread function centre is unknown. In order to make thepoint spread function registration work on any combination of sat-urated/unsaturated, full/coronographic, and AO/non-AO modes thealgorithm is split in a two stage process. First a basic centroidsearch is done, and once the centroid is found a two-dimensionalfunction is fitted to the point spread function, which takes into ac-count possible coronographic or saturated cores by masking outpixels. This method also works if there is more than one star in the

field of view, as long as no other star has exactly the same flux asthe target.

The first step which is the centroiding algorithm searches fora patch of contiguous pixels above a given threshold value. If thepatch size is within the range given by the user, the centre-of-massof the patch is calculated. These values are then fed into the pointspread function fitting algorithm as initial values.

The Moffat (1969) function was initially derived from the con-volution of a Gaussian function with an aperture diffraction func-tion and a scattering function of the photographic emulsion, to de-scribe the instrumental response when observing with photographicplates through atmospheric turbulence. This function later turnedout to be also well adapted to CCD imaging on very good seeingconditions (Bendinelli, Zavatti & Parmeggiani (1988)), and evenfor diffraction limited observations (Trujillo et al. (2001)). Thepipeline uses the following form of the Moffat function to fit thepoint spread function centered on x0,y0:

I(x,y,α,β ) = I0 ·β −1πα2 ·

(1+

(x0− x)2 +(y0− y)2

α2

)−β

+Bg

The full width at half maximum (FWHM) of the point spreadfunction is then given by the two fitting variables α and β :

FWHM(α,β ) = 2α

√21/β −1

The Moffat fitting on the point spead function is achievedusing lmdif’s modified Levenberg-Marquardt algorithm which ispart of the Fortran MINPACK library (More, Garbow & Hillstrom1980).

3.1.3 Frame selection

In order to increase the signal to noise ratio of the companion, wekeep only the frames with good adaptive optics correction. A firstrough selection is based on the centroiding algorithm, by simplydiscarding frames where no centroid has been found.

c© 2014 RAS, MNRAS 000, 1–8

Page 4: The Geneva Reduction and Analysis Pipeline for High ...obswildif/publications/001_GRAPHIC_pipeline_b.pdf · tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al. 1995; Rebolo,

4 J. Hagelberg, D. Segransan, S. Udry, and F. Wildi

Figure 2. Typical pattern induced by the Gibbs phenomenon.

The second step is based on the point spread function geome-try. When the detector integration time is more than a few secondsit can happen that bad tip-tilt correction create a sharp elongatedpoint spread function specially when in coronographic mode. Sim-ple selection on maximum signal strength hardly detects this kindof frames, even though the point spread function shape is asymmet-ric. Using the values of the point spread function fitting has shownto be a robust way to verify the quality of the adaptive optics cor-rection.

Furthermore, by using individual frame point spread functionfitting instead of the widely used cross-correlation method, we canascertain that only good and optimally centred frames are used. Theindependent centring also ensures that poor centring on one framewill not affect centring on the other frames.

Once the frame selection has been done an optional quick-look algorithm can be run which bins the recentred good framesto decrease the total number of frames to process in the followingsteps.

3.2 Cosmetics

Cosmetics play a key role when using Fourier transforms, becauseof the Gibbs (1898) phenomenon. This phenomenon causes a che-querboard pattern to appear with pixels alternately overshootingin the positive and negative values around an image discontinuity,such as bad pixels, saturated point spread function or sharp im-age borders. The reason for these oscillations is that a discontinuitywould need infinite Fourier series to be correctly characterised, butsince we are dealing with finite discrete Fourier transforms the dis-continuity is not well approximated.

The frame preparation is thus a key step in order to useFourier-based operations, where no deviant pixel should be left out.The two key steps for the cosmetics preparation are the sky gener-ation and subtraction and the bad pixel correction.

3.2.1 Master sky

The sky background varies very rapidly when observing in the nearinfrared especially in L’ band. Observations are done in ditheringmode in order to directly use the science frames to determine thesky background. To decrease the effect of the star point spread func-tion on the sky determination, a mask is applied on the region con-taining the star. A median of N time-contiguous cubes with N dif-

ferent masked dithering positions is then calculated. As ditheringpositions change every one or two seconds, and we are using fourto five dithering positions, a sky frame is produced for every five toten seconds of observation. Using this method we manage to havea median sky as close as possible to the sky background of the sci-ence frames. Once the master skies have been generated, they aresubtracted on each frame, using each time the master sky frameclosest in time.

3.2.2 Bad pixel correction

First a bad pixel map is generated using either a master dark or amaster sky. A simple sigma clipping routine flags the deviant pix-els, where bad pixels are defined as a pixels which values variesmore than C ·σ from the median value of the frame. By changingthe value of the C coefficient the selection criteria can be adaptedto ensure that all bad pixels are cleaned.

Since each bad pixel will be spread over many pixels as a con-sequence of the sub-pixel re-centring and the derotation process,it is not possible to simply keep a bad pixel map to mask out thepixels. Furthermore the discontinuities induced by bad pixels in-duce Gibbs overshooting when doing Fourier transforms (Fig. 2).To clean the bad pixels, they are all first set to NaN. The bad pixelvalues are then replaced by the median of the neighbours, ignoringany NaN pixels. This ensures that bad pixel clumps are correctlyflattened.

3.3 Point spread function subtraction

The “psf subtraction” is the core of the reduction process. It is basedon the well established ADI algorithm which aims at subtractingthe stellar point spread function and speckles by using the fieldrotation in order to increase the sensitivity to surrounding pointsources (Marois et al. (2006)). We are generating a specific pointspread function for every single frame, in a similar way to LOCI(Lafreniere et al. (2007b)) but without using any combination co-efficients in an effort to preserve the flux.

For an observing sequence composed of C datacubes contain-ing each N frames. The total number of frames is then T = C ·N.The frame fi = (c j;nk) will have a parallactic angle αi given by

αi = arctan(

cosφ sinhi

cosδ sinφ − sinδ cosφ coshi

)with φ the observatory latitude, δ the target declination, and hi thehour angle at observing time ti.

A point spread function is generated for frame fi using theframes fx fulfilling the conditions on maximum time separationtmax

|tk− ti|< tmax

and minimum field rotation αmin such that

|αk−αi|> αmin = 2 · sin(

nFWHM · FWHM

2 · rmin

)where rmin is the minimum radius in pixels to consider,

FWHM is the point spread function full width at half maxi-mum from the fitting (3.1), and nFWHM is the minimum numberof point spread function displacements to prevent companion self-subtraction.

c© 2014 RAS, MNRAS 000, 1–8

Page 5: The Geneva Reduction and Analysis Pipeline for High ...obswildif/publications/001_GRAPHIC_pipeline_b.pdf · tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al. 1995; Rebolo,

GRAPHIC 5

3.3.1 Fourier shift

All the geometric operations on the image are based on one andtwo dimensional Fourier transforms. As a short reminder, we givethe definition of Fourier transforms in two dimensions of a functionf (x,y):

f (νx,νy) =∫∫

−∞

f (x,y) · e−i2π(νxx+νyy)dxdy

and its inverse Fourier transform:

f (x,y) = f (νx,νy)∨ =

∫∫∞

−∞

f (νx,νy) · ei2π(νxx+νyy)dνxdνy

The one dimensional case is a trivial simplification of the 2Dcase, and the notation for a one dimensional Fourier transformalong the x axis will be noted by f (νx,y), similarly the transformalong the y axis will be noted f (x,νy).

To perform a shift of the image we use the translation propertyof Fourier transforms. If f (ν) is the Fourier transform of the onedimensional function f (x), then the Fourier transform of f (x+ a)is exp(−i2πνa) f (ν). Thus a spatial shift is equivalent to multiplythe Fourier transform f (ν) by a phasor e−i2πνa. A shift along the xaxis in the two dimensional case can thus be expressed as

fx(x+a,y) =∫

−∞

e−i2πνxa f (νx,y)ei2π(νxx)dνx

and the more general case of a shift a in x and b in y is thenobtained by a multiplication by a phasor e−i2π(νxa+νyb):

f (x+a,y+b) =∫∫

−∞

e−i2π(νxa+νyb) f (νx,νy) ·ei2π(νxx+νyy)dνxdνy

The frames we are recentring are defined on a finite area,whereas the shift property holds for infinite domains. We cannonetheless apply this operation to the frames provided we intro-duce a zero-padding which also prevents apparition of Gibbs oscil-lations at the borders, but this implies that the operations have to beapplied on at least double sized frames.

The frames are finally median combined which has shown tobe less sensitive to the typical speckles noise at small separation(Brandt et al. 2013).

3.4 Derotation

The final step of the ADI processing is to correct each frame forthe field rotation and merge all the frames. In order to preserve thecompanion signal, and also to keep the noise structure unchangedwe perform the rotation using Fourier transforms.

The rotation algorithm we are using is implemented by ap-plying to Fourier transforms the property that a rotation matrixcan be decomposed in three shear matrices (Unser, Thevenaz &Yaroslavsky 1995; Eddyy, Fitzgerald & Noll 1996; Larkin, Old-field & Klemm 1997; Yoon, Weinberg & Katz 2011; Welling, Eddy& Young 2006). This method is largely used in satellite imageryof Earth and medical imaging. The galaxy image decompositiontool GALPHAT is an example of its previous use in astronomicalimaging (Yoon, Weinberg & Katz 2011). We will only give a briefdescription of the method based on the detailed description of thealgorithm given by Larkin, Oldfield & Klemm (1997).

Any rotation matrix Rθ of a given angle θ can be expressed asthe product of three shear matrices:

(cosθ −sinθ

sinθ cosθ

)︸ ︷︷ ︸

=

(1 − tan θ

20 1

)︸ ︷︷ ︸

Sx

(1 0

sinθ 1

)︸ ︷︷ ︸

Sy

(1 − tan θ

20 1

)︸ ︷︷ ︸

Sx

where Sx and Sy are shear matrices on the x axis and y axisrespectively.

To shear by a factor a = tan θ

2 in the x direction an im-age described by the function f (x,y) we apply the transformationsx(x,y) = f (x + ay,y), which can be readily adapted to Fouriertransforms using their shift property. The shear matrix Sx applied tothe image f (x,y) can then be expressed in terms of Fourier trans-forms as the function sx

sx(x,y) =∫

−∞

e−i2πνxay f (νx,y) · ei2πνxxdνx

the product SySx becomes by noting b =−sinθ

syx(x,y) =∫

−∞

e−i2πνybxsx(x,νy) · ei2πνyydνy

and the rotation SxSySx

sxyx(x,y) =∫

−∞

e−i2πνxaysyx(νx,y) · ei2πνxxdνx

Similar to the shift case, the frames need to be padded. Thisimplies that in order to rotate one frame 6 FFT have to be applied ona double sized frame, resulting in a significant increase of compu-tation time compared to standard interpolation methods. This rota-tion technique can only be applied to such a large amount of framesthanks to parallelisation.

4 PIPELINE PERFORMANCE

Contrast curves obtained for HD142527 observations withNICI/GEMINI, using GRAPHIC and principal component analy-sis (PCA) are displayed in figure 6. At small separation we reacha higher contrast than PCA, while the low-pass filtering from in-terpolation results in better contrasts at higher separation where thenoise is mainly gaussian.

To test the pipeline performance we developed an algorithmto inject fake companions. These companions are generated by firstincluding their signal into a plane wavefront which is then con-voluted with a pupil based on the main optical characteristic ofthe used telescope. Using this technique we have a precise controlon the companion flux, and furthermore the point spread functionscales precisely with wavelength. Poisson noise is finally added tothese nearly perfect point spread functions before adding them tothe real science frame.

4.1 Performance of geometric transformations

To characterise the performance of the shift and rotation algo-rithms, we generated a test image with fake companions. This im-age is composed of an L’ short-exposure image with a saturatedpoint spread function, which has been sky-subtracted, cleaned frombad pixels, and median-filtered. To this image we added fake com-panions with magnitudes differences to the star reaching step-wisefrom 1 to 8 and with separations from 0.5 to 6.5 arcseconds witharcseconds steps, and Poisson noise was included in the process.

To then test the performance of the shift algorithm, we shiftedthe original image in a ∆x,∆y direction and then shifted it back

c© 2014 RAS, MNRAS 000, 1–8

Page 6: The Geneva Reduction and Analysis Pipeline for High ...obswildif/publications/001_GRAPHIC_pipeline_b.pdf · tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al. 1995; Rebolo,

6 J. Hagelberg, D. Segransan, S. Udry, and F. Wildi

0.0 0.5 1.0 1.5 2.0 2.5 3.0

Separation [arcsecond]

100

101

102

103

104

Standarddeviation

Figure 3. Root mean square representing the noise caused by the shift al-gorithms. As a reference the root mean square of the original image as afunction of separation to the center is given by the black dotted line. To testthe algorithms we shift an image first by ∆x = 3.5,∆y = 2.7 pixels and thenback. The difference between the original image and the one shifted backto the initial position is then plotted for the interpolation and Fourier shift,blue dashed and red solid lines respectively.

in the opposite direction (−∆x,−∆y). This double shifted imagecan then be compared with the original non-shifted image. By sub-tracting the original image from the double-shifted, the effects in-duced by the different shifting algorithms become visible. The dot-ted black line in figure 3 shows the normalised root mean squareof the original test frame, calculated in concentric annuli. The in-jected fake companions are causing the peaks at 0.5, 1.5, and 2.5arcseconds. The two additional lines show the root mean squareof the original test frame where the double shifted frames havebeen subtracted, where the interpolation and Fourier shift are rep-resented by the blue dashed and red solid lines respectively. Thesetwo lines would be flat with no root mean square if the shift algo-rithms were perfect. For the spline interpolation this is clearly notthe case, where the curve reflects two phenomenons in and out ofthe peaks which are both caused by the fact that interpolations inimage space act as an uncontrolled low-pass filter. When the imageis interpolated, the structure of the noise is modified so that the highfrequency noise is not removed by the subtraction, as it is missingfrom the double shifted frame. This effect leaves an overall noisecontinuum. The effect on the peaks comes from the fact that thefake companions are flattened by the interpolation, so that part ofthe fake companion signal is not removed.

For the rotation algorithm we applied a similar test. We firstrotated a test image by an angle α = 11.3 followed by a rotation byan angle −α . Ideally such a double rotation should return the orig-inal image. Changes in the image structure induced by the rotationcan be found by subtracting the original image from the double ro-tated one. The root mean square as a function of separation to thecentral point spread function of the original image is plotted on fig-ure 5 with a black dotted line, and the subtracted rotations usinginterpolation and Fourier shears are represented on the same figureby the blue dashed and red solid lines respectively.

The images from the rotation test are represented on figure 4,where 4a is the original image, 4b and 4c are the resulting imagefrom the rotation followed by an inverse rotation using interpola-tion and the 3-shear algorithm respectively. The most striking dif-ference between the two rotated images is the residual noise struc-

0.0 0.5 1.0 1.5 2.0 2.5 3.0

Separation [arcsecond]

10−1

100

101

102

103

104

Standard

deviation

Figure 5. Root mean square representing the noise caused by the rotationalgorithms. As a reference the root mean square of the original image asa function of separation to the center is given by the black dotted line. Totest the algorithms we rotate the image first by an angle α = 11.3 and thenback. The difference between the original image and the one rotated back tothe initial position is then plotted for the interpolation and Fourier rotation,blue dashed and red solid lines respectively.

Figure 6. ADI detection limits for NICI/Gemini data in CH4-K5%S band,using a 0.22′′ semi-transparent coronographic mask with ≈ 40 degrees offield rotation. GRAPHIC raw and GRAPHIC corrected are the 5-σ detec-tion limits of this pipeline where corrected takes into account the flux loss.PCA is 5-σ detection limit for a principal component analysis taken fromCasassus et al. (2013).

ture, the 3-shear algorithm preserving the noise structure while theinterpolation algorithm acts as an uncontrolled low-pass filter.

The different effects of the two rotation algorithms is evenmore evident when the original image is subtracted from the ro-tated images, as can be seen on figure 4d for the interpolation andfigure 4e for the 3-shear algorithm. In the case of interpolation, thecompanions become dark blue points surrounded by signal whichmeans that the companion point spread function is spread, with sig-nal being transferred from the centre of the point spread functioninto the wings. The 3-shear residuals show no structure, indicatingthat the star and companion signals are not altered by the rotation.Some numerical noise can be noted, but due to its very high fre-quency it is not altering much the image.

c© 2014 RAS, MNRAS 000, 1–8

Page 7: The Geneva Reduction and Analysis Pipeline for High ...obswildif/publications/001_GRAPHIC_pipeline_b.pdf · tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al. 1995; Rebolo,

GRAPHIC 7

a

I0 (x,y)

Interpolation

FFT

b

I2 =Rot(Rot(I0 ,α),−α) residuals =I2−I0

c

d

100

80

60

40

20

0

20

40

60

80

100

Inte

nsity

[AD

U]

e

5

4

3

2

1

0

1

2

3

4

5

Inte

nsity

[AD

U]

Figure 4. The original non-rotated test image is given in figure (a). The result of two consecutive 11.3 and -11.3 degree rotations of the original figure (a),using a third order spline interpolation figure (b), and the 3 shear algorithm fig (c). The residuals are computed by subtracting the original image from theinterpolation rotated (d), and three-shear rotated (e) images. All figures have the same intensity scale, except for figure (e) where we reduced the cuts by afactor 20 to reveal some of the induced noise.

4.2 Photometric accuracy

Test data-sets are created by injecting fake companions into all theraw frames with an angle following the field rotation. By inject-ing the companions into the raw frames we are able to take intoaccount nearly all the steps of the reduction, namely cosmetics,recentring, point spread function subtracting, derotating, and finalcollapse. Centre and parallactic angle determination are the onlytwo operations we cannot test with this method, as the companioninjection already relies on these two parameters.

The flux loss induced by the pipeline has to be well charac-terised, in order to have accurate photometry of the companions.Using our fake planet injection algorithm we measured the flux lossas a function of initial flux and separation. We determined an uncer-tainty on the companion flux of 4% independent of the separationas long as the flux is above the detection limit. The goal to createan efficient pipeline with high photometric accuracy has thus beenreached.

5 CONCLUSIONS

We presented a new pipeline for angular differential imagingwhich, to our knowledge, is the first to have all image process-ing only relying on Fourier transforms. The gain in performancedelivered by the use of Fourier transforms for shifts and rotationshas been demonstrated through various comparisons tests. Contrastcurves obtained on the same data with different pipelines were alsopresented for comparison. Conservation of the companion photo-metric signal has also been demonstrated using fake companionsinjected in the raw data.

GRAPHIC is able to process up to 100’000 frames with nobinning thanks to massive parallelism. This parallelisation of thepipeline makes it also possible to implement further computation-ally demanding algorithms . Further development is planned in or-der to use graphics processing units (GPU) for a gain in processingtime and wavelet filtering. GRAPHIC has also very recently beenadapted to process VLT/SPHERE and Subaru/SCExAO data.

GRAPHIC has also been applied on an extended source withresults published in Casassus et al. (2013) under the developmentname PADIP.

c© 2014 RAS, MNRAS 000, 1–8

Page 8: The Geneva Reduction and Analysis Pipeline for High ...obswildif/publications/001_GRAPHIC_pipeline_b.pdf · tion of three brown dwarfs (Basri & Marcy 1995; Nakajima et al. 1995; Rebolo,

8 J. Hagelberg, D. Segransan, S. Udry, and F. Wildi

ACKNOWLEDGEMENTS

To develop the pipeline the author also made use of SciPy (Joneset al. 2001), Numpy (Oliphant 2007), Astropy (Astropy Collabora-tion et al. 2013), Botteleneck, ipython (Perez & Granger 2007), andMatplotlib (Hunter 2007).

REFERENCES

Amara A., Quanz S. P., 2012, MNRAS, 427, 948Astropy Collaboration et al., 2013, Astronomy and Astrophysics,

558, 33Basri G., Marcy G. W., 1995, The Astronomical Journal, 109, 762Bendinelli O., Zavatti F., Parmeggiani G., 1988, Journal of Astro-

physics and Astronomy, 9, 17Biller B. A. et al., 2007, The Astrophysical Journal Supplement

Series, 173, 143Bowler B. P., Liu M. C., Shkolnik E. L., Dupuy T. J., Cieza L. A.,

Kraus A. L., Tamura M., 2012, The Astrophysical Journal, 753,142

Brandt T. D. et al., 2013, The Astrophysical Journal, 764, 183Casassus S. et al., 2013, Nature, 493, 191Chauvin G. et al., 2010, Astronomy and Astrophysics, 509, 52Crepp J. R. et al., 2012, The Astrophysical Journal, 761, 39Dalcın L., Paz R., Storti M., D’Elıa J., 2008, Journal of Parallel

and Distributed Computing, 68, 655Eddyy W. F., Fitzgerald M., Noll D. C., 1996, Magnetic Reso-

nance in Medicine, 36, 923–931Gabriel E. et al., 2004, in Recent Advances in Parallel Virtual Ma-

chine and Message Passing Interface, Springer, p. 97–104Gibbs J. W., 1898, Nature, 59, 200Heinze A. N., Hinz P. M., Kenworthy M., Meyer M., Sivanandam

S., Miller D., 2010, The Astrophysical Journal, 714, 1570Hunter J. D., 2007, Computing in Science & Engineering, 9, 90Janson M. et al., 2013, The Astrophysical Journal, 773, 73Jones E., Oliphant T., Peterson P., et al., 2001, SciPy: Open source

scientific tools for PythonLafreniere D. et al., 2007a, The Astrophysical Journal, 670, 1367Lafreniere D., Marois C., Doyon R., Nadeau D., Artigau E.,

2007b, The Astrophysical Journal, 660, 770Lagrange A.-M. et al., 2009, Astronomy and Astrophysics, 493,

L21Larkin K. G., Oldfield M. A., Klemm H., 1997, Optics Commu-

nications, 139, 99Lenzen R., Close L., Brandner W., Biller B., Hartung M., 2004, in

, pp. 970–977Lenzen R. et al., 2003, in , pp. 944–952Liu M. C., 2004, Science, 305, 1442Marois C., Lafreniere D., Doyon R., Macintosh B., Nadeau D.,

2006, The Astrophysical Journal, 641, 556Marois C., Macintosh B., Barman T., Zuckerman B., Song I., Pa-

tience J., Lafreniere D., Doyon R., 2008, Science, 322, 1348Masciadri E., Mundt R., Henning T., Alvarez C., Barrado y

Navascues D., 2005, The Astrophysical Journal, 625, 1004Mayor M., Queloz D., 1995, Nature, 378, 355Moffat A. F. J., 1969, Astronomy and Astrophysics, 3, 455More J. J., Garbow B. S., Hillstrom K. E., 1980, User guide for

MINPACK-1Nakajima T., Oppenheimer B. R., Kulkarni S. R., Golimowski

D. A., Matthews K., Durrance S. T., 1995, Nature, 378, 463Nielsen E. L. et al., 2013, The Astrophysical Journal, 776, 4

Oliphant T. E., 2007, Computing in Science & Engineering, 9, 10Perez F., Granger B. E., 2007, Computing in Science & Engineer-

ing, 9, 21Racine R., Walker G. A. H., Nadeau D., Doyon R., Marois C.,

1999, Publications of the Astronomical Society of the Pacific,111, 587, ArticleType: research-article / Full publication date:May 1999 / Copyright c© 1999 The University of Chicago Press

Rebolo R., Osorio M. R. Z., Martın E. L., 1995, Nature, 377, 129Soummer R., Pueyo L., Larkin J., 2012, The Astrophysical Jour-

nal Letters, 755, L28Trujillo I., Aguerri J. A. L., Cepa J., Gutierrez C. M., 2001,

Monthly Notices of the Royal Astronomical Society, 328, 977Unser M., Thevenaz P., Yaroslavsky L., 1995, IEEE Transactions

on Image Processing, 4, 1371Vigan A. et al., 2012, Astronomy and Astrophysics, 544, 9Wahhaj Z. et al., 2013, The Astrophysical Journal, 773, 179Welling J. S., Eddy W. F., Young T. K., 2006, Graphical Models,

68, 356Yoon I., Weinberg M. D., Katz N., 2011, Monthly Notices of the

Royal Astronomical Society, 414, 1625–1655

c© 2014 RAS, MNRAS 000, 1–8