Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova...

46
Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures given at the “V Escola Avancada de Astrofisica” in Aguas de Sao Pedro, Brazil, in 1989, by Peter B. Stetson, the maestro virtuoso of technique of stellar photometry on digital images, whose work has made the job of a

Transcript of Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova...

Page 1: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Stellar Photometry Techniques

Giampaolo Piotto

Dipartimento di Astronomia Universita’ di Padova

These lectures have been inspired by a set of lectures given at the “V Escola Avancada de Astrofisica” in Aguas de Sao Pedro, Brazil, in 1989, by Peter B. Stetson, the maestro virtuoso of technique of stellar photometry on digital images, whose work has made the job of a generation of astronomers so much more pleasant and productive.

Page 2: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Why do we need accuratestellar photometry?

Page 3: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Color-magnitude diagrams:

We need to measure fluxes(and colors)

Evolutionary sequences

Comparison with themodels. Age

17 mag range!

Page 4: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Bedin, Piotto et al. 2004, ApJL, 605, L125

The problem of the double MS and ofthe multiple SGBs and TO in Omega Centauri

Sometimes accurate photometryis of fundamental importance…

Page 5: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Luminosity functions

Evolutionary clock

Mass functions

We need to count stars

Page 6: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

We need tomeasure stellarpositions

NGC6121=M4

Astrometry

…to determinemembership.

Page 7: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

(U,V,W)LSR = ( 53+- 3, -202+-20, 0+- 4)Km/s

, LSR = ( 54+- 3, 16+-20, 0+- 4)Km/s

M4:

…to meausure Absolute propermotions

Page 8: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

INTERNAL DYNAMICS

(Bedin et al. 2003)

Page 9: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Astronomersdo notlike easyjobs!

It is the abilityto count stars,measure fluxes,and positions incrowded environmentswhich makesstellar photometryan art!

Page 10: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Stellar Photometry Packages

RICHFILD Tody 1981 KPNOROMAFOT Buonanno et al. 1983 A&A, 126, 278WOLF Lupton, Gunn 1986 AJ, 91, 317STARMAN Penny, Dickens 1986 MNRAS, 220, 845DAOPHOT Stetson 1987 PASP, 99, 191ALLSTAR Stetson 1994 PASP, 106, 250 ALLFRAME Stetson 1994 PASP, 106, 250LUND Linde 1989 1st ESO/ECF data analysis WS

DoPHOT Schechter,Mateo 1993 PASP 105, 1342 SharaePSF Anderson, King 2000 PASP, 112, 1360

Plus a number of generic photometry softwares (INVENTORY,SEXTRACTOR, etc.)

DAOPHOT

Page 11: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Fundamental tasks for stellar photometry (*)

FIND crude estimate of star postion and brightness

PSF determine stellar profile (point spread function)

FIT fit the PSF to multiple, overlapping stellar images (and sky)

SUBTRACT subtract stellar images from the frame

ADD add artificial stellar images to the frame

(*) accurate stellar photometry needs accurate astrometry.

Page 12: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Before starting…..

There are at least five things you should tell to your computerbefore starting:

1. Read out noise;

2. Conversion factor (electrons to ADU);

3. Maximum linear signal (physical or electronic saturation level);

4. Map of bad pixels, rows, columns;

5. Size of typical stellar images (seeing, FWHM in pixels)

Page 13: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

FIND (1)

First you must FIND the stellar-appearing objects in the frame.Each program has its own method - sometimes several methods – of performing this, but the basic idea is to produce an initial list

of approximate centroid positions for all stars that can be distinguished in the two dimensional data array.

The star finder must have at least some ability to tell the difference between a single star, a blended clump of stars,

a galaxy (or extended object), and a noise spike in the data. Second, for the following steps one needs a crude estimate of each

star's apparent brightness at the same time, e.g. withsome simple aperture PHOTOMETRY algorithm.

Note: From here on, I will indicate DAOPHOT commands using upper case MAGENTA color

Page 14: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

FIND (2)

Basic idea: A star is brighter than its sorrounding;

Simple method: set a brightness threshold at somelevel above the sky brightness level;

Complications: 1. The sky brightness might vary across the frame

2. Blended objects, extended objects, artifacts, cosmic rays must be recognized.

Page 15: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

A possible solution: Once given a numerical value for the FWHM, DAOPHOT's FIND routine then assumes that the stellar profile is a circular Gaussian function with that full-width at half-maximum, and just goes through the entire picture fitting Gaussian profiles to a small region around every single pixel (excluding a narrow border around the frame).For each pixel (i0, j0) it performs the following fit, with D(i,j) thecounts on the pixel:

where

with

It is a least square solution, so:

Page 16: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

C

(a) A star image(b) Blended pair(c) Galaxy(d) Cosmic ray hit(e) Low value bad

pixel

Note:1) The broad galaxy is suppressed by the convolution;2) The background value of C is 0 even if originally the background is nonzero and sloping;3) The blended pair is better separated;

Example of a gaussian fit to theoriginal data.

Note that the stellar images are critically sampled (FWHM=2.4),i..e. it is hard to distinguish a starfrom a cosmic ray.

Page 17: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Two parameters to help eliminating non-stellar objects:

SHARPNESS

di0,j0 = Di0,j0 /<Di,j >, with (i,j) near (i0,j0), but different from (i0,j0)

SHARP=d i0,j0/Ci0,j0

ROUNDNESS

ROUND=2*(Cx-Cy)/(Cx+Cy)

Cx from the monodimensionalGaussian fit along the x directionCy from the monodimensionalGaussian fit along the y direction

Page 18: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Aperture Photometry

•It is the most accurate flux measurement, for non-crowded images;

•Simply integrate counts within a given aperture (possibly circular), and subtract the background counts estimated in a nearby region;

•The crucial (and most delicate problem) is the estimate of the sky background.

Page 19: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Background evaluationThe background measurement can be rather tricky (because ofthe crowding)A good estimate of the local sky brightness is the mode of the distribution of the pixel counts in an annular aperture around the stars.Poisson errors make the peak of the histogram rather messy.

A good guess of the background level is:

mode=3x(median)-2x(mean)

(which is striclty true fora gaussian distribution)

NOTE: this background estimate is rather important,as it is the only backgroundmeasurement in DAOPHOT

Page 20: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The stellar profile model: the PSF

Ideally, the model stellar profile should come from: 1. The BEST, most luminous, most isolated stars 2. NUMEROUS stars (to reduce noise), well spread within the frame (to measure PSF spatial variations).

When the PSF is fitted to some arbitrary stars in the digital image,the uncertainty of the fit will be dominated by the quality of the data for the program star, not by the quality of the model profile.

In order to construct a model profile from the average of several stars, the observed data for those stars must be registered to the same centroid and to a constant background level and peak intensity.

Page 21: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Well sampled stars: ideal case

Badly undersampled. Star profilestrongly depends on the position ofthe center within the central pixel.The problem is worsened by the intra-pixel sensibility variation.

Page 22: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

In the case of badlyundersampled stars the PSFdetermination becomes very difficult.Still, an appropriate PSFis crucial, expecially forastrometry.For a detailed descriptionof the problem, and fora possible solution, seeAnderson and King (2000, PASP, 112, 1360).A&K solution is optimized for veryaccurate astrometry.

Page 23: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The stellar profile model: the PSF

The detailed shape of the average stellar profile in a digital framemust be encoded and stored in a format the computer can read anduse for the subsequent fitting operations.

There are two possible approaches:

1. The analytic PSF. E.g. a gaussian, or, better a Moffat function:

2. The empirical PSF. i.e. a matrix of numbers representing the stellar profile.

Page 24: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The analytic PSFAdvantages:1. Once the parameters of the analytic function are known, the profile fitting is quick and accurate;2. The PSF can be integrated over finite pixels in undersampled (FWHM < 2.5 pixels) images;3. Multiple PSF stars automatically registered and scaled.Problems: 1. Not very flexible: has difficulty modelling complexprofiles caused by optical aberrations or tracking errors 2. If one tries to include too many parameters in the model, convergence of the model may prove difficult.

This is the approach of ROMAFOT and STARMAN

Page 25: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The Empirical PSF

Advantages: 1. It is able of encoding arbitrarely complex stellar profiles.Problems: 1. Relies on numerical interpolation techniques may loses accuracy (*) in undersampled images (but see ePSF). 2. Requires accurate registration and scaling beforeaveraging multiple PSF stars.

(*) Application of the empirical PSF requires 2 interpolations in matching the model stars to the program stars : i) The stars defining the PSF must be interpolated to a common pixel grid before they can be averaged; ii) the model PSF must be interpolated to the program star pixel grid for the fitting to take place;This is the approach of RICHFLD, WOLF, ePSF

Page 26: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The Hybrid PSF

1. First, fit the best possible analytic profile to the PSF stars;

2. Then subtract these best analytic profiles from the images of the PSF stars

3. Register and scale the array of the residuals remaining after these subtractions, and average them together to form an empirical look-up table of corrections from the analytic profile to the

BEST PSF

Page 27: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The Hybrid PSF

Advantages:

1. The experience teaches that the analytic profile contains ~97% of the information in the stellar profile (i.e. image anomalies due to aberrations and tracking errors represent only about 3% of the stellar flux);2. The analytic profile can be integrated over finite pixels: it is not very sensitive to undersampling;3. The empirical look-up table of corrections is still subject to interpolation errors, but these now amount to a small fraction of ~3% of the stellar profile. Problems:1. It is a little more work (for the computer!), but it is worth it!

This is the approach of DAOPHOT

Page 28: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Variable PSF

Especially with large, modern CCDs, optical aberrations in the telescope can cause the shape of the stellar profile to change with position in the field. What to do?

If there is a sufficent number of PSF stars well distributed inthe field, we can use roboust least-squares techniques to replace each element of the look-up table of corrections witha function (most easily, a polynomial) of the star positionwithin the field:

ai,j = (ai,j + bi,jXk + ci,jYk +…) ,

where (Xk,Yk) is the position of the star k in the frame.

Page 29: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

And now…the real stuff…:INPUT PARAMETERS: GENERAL

INPUT PARAMETERS: APERTURE PHOTOMETRY

Page 30: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The PSF stars must be BRIGHT and CLEANED

Contaminatingstars must be removed

This shows therelevance of theSUBTRACTroutine

Page 31: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The PSF determination is an iterative process!

The PSF model after three iterations

Page 32: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

After the starting guesses of the centroids (FIND) and brightness (PHOTOMETRY) are measured, and the PSF model determined (PSF), the PSF is first shifted and scaled to the position and brightness of each star, and each profile is subtracted, out to the profile radius, from the original image. This results in an array of residuals containing the sky brightness, random noise, and systematic errors due to inaccuracies in the estimate of the stellar parameters. From the PSF we know the first derivatives of the model profile with respect to the (x,y)-centroid, and knowing the star brightness, first order corrections to the stellar parameters are computed by least square solutions of the system of equations:

Page 33: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Example of a crowded image in the outkirts of a globular cluster

Page 34: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The same image after the file fitting and subtraction routines to the originalstar list. Many secondary components and blended doubles are present

Page 35: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The same image after two passes through the find-fit-subtract loop

Page 36: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Improving our photometry

DAOPHOT fits multiple stars with partially overlapping profiles(distances smaller than 1 PSF radius+1fitting radius).An improvement of the original program is in ALLSTAR, which performs the simultaneous determination of position and brightnessestimate for every star in a digital image. In other words, ALLSTARcalculates the first order incremental correction to each star estimatedposition and brightness. The huge 3Nx3N matrix is inverted piecewise:The order in which stars are considered is sorted so that the matrix is block diagonal only stars which actually have pixels in common within their fitting regions are treated in the same submatrix inversion.Having calculated the new incremental correction, ALLSTAR goes backto the original image and subtracts the stars with the improved valuesof position and brightness. ITERATE!When positional and brightness corrections become negligible, the staris permanently subtracted from the original image, and the parametersstored in a file.

Page 37: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Matching stars between different digital images

Important astronomical information is often extracted from multipleimages of the program object(s). These images could be taken with different pointings, orientations, filters, and even at different telescopes.

Once a list of common stars is constructed, the determination of thegeometrical transformation parameters is a simple least-square problem.

The real problem is to find an efficent way to match many thousandsof stars located in dozens of images.

Page 38: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The triangle method

The basic idea is that any translation, rotation, scale change, or flip is not going to change the basic shape of a triangle, although of course it will change the size and orientation. The method, then, is to take the stars in each star list in groups of threes, and intercompare the shapes of the triangles that result.

When you allow for the fact that there may be arbitrary translations, rotations, scale changes, or flips of the positional coordinate system, each triangle contains two independent, invariant shape parameters. There are a number of ways that these parameters could be defined. One possibility is to choose: parameter 1 as the ratio of the length of the triangle's intermediate side to its longest side, b/a, and parameter 2 as the ratio of the shortest side to the longest side, c/a.

Page 39: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

By definition:

Given some triangle defined by three arbitrary points in some (x, y)space, that triangle can be represented by a point in two-dimensional (b/a, c/a)space. Because of the obvious definitions just given, not all parts of (b/a, c/a)-space can be occupied, but the same three stars - no matter how you shift, rotate, expand, contract, or flip the coordinate system - will always be projected to the same point in (b/a, c/a) space. One starts by sorting in magnitude the star lists. He chooses the threebrightest stars and check whether they form a similar triangle. Then he keeps adding stars, till a sufficent number of similar triangles (I.e. matches) are found. This method is used by DAOMATCH (P. Stetson).

Which implies also:

Page 40: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

The final list of starsOnce a provisional list of common stars is identified, it can be used toobtain a provisional geometric transformation matrix. The program starts off by considering the first input list as a "master" list. Taking each star in turn from the second input list, it applies the provisional transformations derived to determine the star's position in the coordinate system of the master list. It then goes through the master list, looking for that star which lies closest to the transformed position of the star from list 2. If it does find a star in the master list which is within some critical distance of the transformed position (initially several pixels)the star from list 2 is provisionally identified with that star in the master list. If that star in the master list had already been provisionally identified with some other star from list 2, whichever star has a transformed position closer to the "master" position will remain provisionally identified with it; the other gets "bumped" and must go off looking for some other star in the master list that it can be identified with. Then, ITERATE (reducing the critical distance parameter) to improve geometric transformation.An efficent program which does the job is DAOMASTER (P. Stetson).

Page 41: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Once we have the final geometric transformation we…are ready to start it all over, if we are really interested to reach the limiting magnitude of our data set and measure the faintest objects in our images!!

The idea is very simple. We use ALL OF THE IMAGES of the same field, independently from the pointing and filter; we use the geometric transformation obtained from the cross-correlation of the star lists from our fitting photometry software (ALLSTAR for the aficionados) in order to align all images to the same reference system, and sum them, in order to obtain the highest S/N image (use MONTAGE2, by P. Stetson!).

We then run FIND, and impose the new starlist (properly tranformed to the appropriate reference frame) to our preferred fitting photometry software. ALLSTAR, if you like it. Or even better….

Going deeper….!

Page 42: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

Further improvements

I think ALLSTAR produces results which approach the best one can do using only the information available in a single digital image.

However, we already realized that most of the important problems in stellar photometry require combining information from multiple images (colors, variability, etc.).Usually, every single image is reduced independently from the others.This might not be the best solution. A typical PSF core radius(fitting radius) of 2 pixels gives 12 pixels to estimate 3 parameters: the (x,y)position of the centroid and the brightness. If we impose to any given starto be in the same position in two frames (registered to the same referencesystem), we will have to estimate four parameters (instead of six) from24 data points: the best average (x,y) centroid position and the magnitudesfor the two epochs.

ALLFRAME allows simultaneous reduction of multiple images

Page 43: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

In itself, transforming the two frame example from one with 18independent degrees of freedom to one with 20 degrees of freedom is nota major improvement. But there are many other advantages:1. In crowded fields there will not be 12 independent pixels per stars: star profiles partially overlap, and some pixels will be held in common.

2. Simultaneous reduction allows to impose a self-consistent star list on all the images since the beginning of the reduction process, and the decision whether to retain or reject marginal detections need no longer to be made independently for each image: a blended double can be reducedas a blended double in all the images!

3. It is no longer necessary that each detection be statistically significantin every frame for every frame data to be used.

4. Simultaneous reduction allows to lower the weight of pixels affectedby cosmic ray hits.

Advantages of ALLFRAME

Page 44: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

ALLFRAME

1. ALLFRAME uses a separate appropriate PSF model, read out noise,gain, and fitting radius for each image.

2. ALLFRAME periodically determines (as ALLSTAR) a new estimate of the underlying diffuse sky background for each star, from the median distribution of the counts in a region at and around the star location after all the stars have been provisionally subtracted from the image.

3. ALLFRAME includes as an option the possibility of making modestcorrections of the input geometric transformation equations from all thestellar centroids.

4. ALLFRAME abandones the concept of stellar groups (not all the starsin a group are necessarely within all the frames). The least-square matrixis completely diagonalized and inverted. More computer time, but sameaccuracy, and it easier to assign a sky level to each star.

Page 45: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

And now let’s see what we have done

Once our measurements are done, we need to know how accurate our magnitudes, color, positions, and counts are. It is the time for. artificial star experiments. We can use the routine ADD to add to the original image a bounce of new stars, and see how good we are to recover them, with the appropriate magnitudeand position.

Input stars Output CMD Original CMD

Photometric errors

There is a systematictendency to measurebrighter magnitudes

Page 46: Stellar Photometry Techniques Giampaolo Piotto Dipartimento di Astronomia Universita’ di Padova These lectures have been inspired by a set of lectures.

We can also estimate the completeness C of our star counts:

C=(found stars)/(added stars)

This is very important forthe determination of theluminosity functions.

NOTE: pay attention alsoto themagnitudemigration,

NOTE: do notapply compl.correctionsgreater than 2!