Running psphot on the William Herschel Deep field

These are my (Nigel Metcalfe) experiences of attempting to run psphot (2.5.1, as set up at Durham by Paul Price) on the original R-band image of the William Herschel Deep field. This is an 8-hour stack of CCD images taken, unsuprisingly, on the WHT. The original photometry is described in this paper. It has a scale of 0.42"/pixel and the seeing is around 1.5" FWHM. A 3 sigma detection (inside 1.5" radius) is R_vega=26.3.

In what follows I am not attempting to be deliberately critical - I merely report what happened. Many of the problems encountered may simply be due to the lack of a manual for psphot (that is a critcism!), and not reflect the true abilities of the software. I also make the assumption that my original reductions are the 'truth' - this may not be so, of course''

Problem 1: this scuppered me for several days! It appears that psphot needs to know the s/n on the frame before it can do anything properly - even background fitting. As I do not have a weight map, I had imagined that it would measure the s/n off the frame. It doesn't - except in the sense that it uses sqrt(n) for each pixel. Unfortunately my frame is background subtracted ... So, to solve this I had to measure the s/n in a different package, and add an appropriate artifical sky level to the frame to get sqrt(n) to be roughly correct. Then things started to work! Note: it looks like psphot clips the background at zero (i.e. it will not measure negative values).

Problem 2: Not really a problem as such, but psphot doesn't realise when objects are near the edge of the frame, and goes ahead and tries to do the photometry anyway. This can produce odd results, so I had to define a smaller region to actually perform the photometry over (XMIN XMAX YMIN YMAX command-line parameters).

Problem 3: Saturation - I think that there is a saturation level sepcified in the camera set-up files (SIMPLE camera in this case). This isn't much use for a stacked image. In the end I had to rescale the frame so that psphot didn't think everything was saturated.

OK, lets go:

psphot -file /cos/h/nm/herschel/fits/rband2test.fits test -Df XMIN 10.0 -Df XMAX 960 -Df YMIN 10 -Df YMAX 950

Problem 4: initial sky mean reported by psphot (the sky should be 400 by the way)

  • SAMPLE_MEAN 476
  • SAMPLE_MEDIAN 407
  • CLIPPED_MEAN 406
  • ROBUST_MEDIAN 405
  • ROBUST_QUARTILE 407
  • FITTED_MEAN 403
  • FITTED_MEAN_V4 403

My suspicion is that even the FITTED_MEANs are biased slightly too high. However, this may not matter too much as a local sky is evaluated for each image when the photometry is done. If it gets it very high then lots of warnings about 'negative flux in aperture' appear.

psphot -file /cos/h/nm/herschel/fits/rband2test.fits test -Df XMIN 10.0 -Df XMAX 960 -Df YMIN 10 -Df YMAX 950 -D SKY_STAT FITTED_MEAN_V4

Problem 5: The PSF. The default fit for this setup appears to be PS_MODEL_GAUSS. This insists that 98% of the objects are stars, and have a FWHM of ~1.7 (units - are these arcsecs or pixels???). Uses 41psf stars and finds 43 extended objects (out of 1952). PS_MODEL_QGAUSS finds 42psf objects and 54 extended (out of 1769), so not much better.

Problem 6: PS_MODEL_GAUSS gives RAW magnitudes offset by 0.05 from PS_MODEL_QGAUSS. The latter appears to be correct (see figures below).

Psphot1.jpgPsphot2.jpg

14/8/08 - the above figures have now been generated using the correct zero-point (32.68) for the pshot photometry. The left hand-figure uses -PSF_MODEL PS_MODEL_QGAUSS, the right-hand -PSF_MODEL PS_MODEL_GAUSS

26/8/08 - the above results are essentially the same for ipp 2.6.1

The above (left hand) figure summarizes where I am now. The blue points are stars (as originally classified from the WHDF), psphot mags are MAG_RAW. The solid red points are galaxies from the WHDF which psphot also thinks are extended objects. psphot mags here are MAG_GAL. The open red circles are galaxies which pshot thinks are unresolved - psphot mags revert to MAG_RAW for these. The smaller black circles are objects unclassified (i.e. too faint for reliable s/g separation) on the WHDF which psphot thinks are unresolved - again pshpot magsd are MAG_RAW. The green stars are objects classified as stars by me, but as extended by psphot (there only seem to be two - one is near another bright star, so might be understandable, the other is quite isolated and quite clearly a star).

Psphot3.jpgPsphot4.jpg

The image on the left uses the PSF_INST_MAG values from OUTPUT.FORMAT PS1_DEV_1 and ipp 2.6.1. Blue are stars from WHDF and red are galaxies. Black points are too faint to be classified (assumed to be galaxies). On the right we use the psphot Petrosian magnitudes (from the extended source analysis) - otherwise the same simulation as on the left.

I guess from this we deduce:

  • MAG_RAW does OK for stellar images (until saturation kicks in around ~17).
  • There are a few worrying stellar outliers which are a magnitude or more too bright on psphot.
  • MAG_GAL is slightly offset from the MAG_RAW stellar locus (as I don't know how MAG_GAL or MAG_RAW are actually measured, then this may or may not be significant).
  • s/g separation fails at around ~20 for psphot, whereas it should be possible to reach ~22.
  • MAG_RAW for extended objects is awful (too bright).
  • The faintest objects have an offset of ~0.2 (they are brighter) from the brighest ones.

Gals.jpg

This figure shows the images flagged as extended sources by psphot. As far as they go (about 20mag in real terms) this isn't too bad. The next stage would be to switch on the extended source photometry, but we really need to get the galaxies fainter that 20 flagged as extended first.