wiki:SourceExtractionTools

SSB jwst trac wiki home

This aspect is to replace things like digiphot, but also encompass things like SExtractor and perhaps new techniques.

It is not likely we would try to replace SExtractor. It is a well supported project in its own right. Ideally it would be broken up into callable routines better suited to use with Python (there was talk of doing that before, and an aborted attempt years ago). Perhaps effort can go there, but at the very least, this means folding in existing wrappers for calling it from Python (and making any necessary improvements) and tools for using SExtractor.

[NOTE: daophot performs photometry using PSF-fitting, which I'm not working on. PSF-fitting tools will soon be available in the `photutils` packages.]

As far as daophot goes, the version in IRAF is old, but accessible (i.e. the code from a licensing point of view). As far as I can tell, even though Stetson maintains it at some level, it is not really freely available (or even publicly versioned). We should start by asking the author for the rights to the source code. Even with that there is a good chance we will need to do a reimplementation at some level.

[NOTE: The tools I describe below should encompass most apphot functionality]

Likewise for apphot. The question is what the priorities are for these three tools should be. apphot is likely the easiest, and probably the one we can show the fastest progress. In addition, developing should generate basic tools useful in other contexts (e.g., the defining and use of spatial apertures). There is currently much interest in astropy on developing this functionality, so some shared effort there may be possible.

initial iteration

1) develop fundamentals for developing apphot functionality

a) adapt existing python implementation of daaofind

b) generalized aperture definition scheme

c) implementation of centering algorithms

d) data centered around astropy ndimage (merged with aspects of our data model scheme)

2) investigate long-term plan to replicate DAOPHOT (reuse or reimplement) (NOTE: PSF-fitting soon to be added to photutils)

Level 5 Proposed Requirements

DAOFIND-like tool

  • The DAOFIND-like tool shall be able to identify and centroid stars in a 2D image.
  • The DAOFIND-like tool shall allow the user to define a generalized (e.g. non-circular, rotated) 2D Gaussian kernel as a representation of the PSF.
  • The DAOFIND-like tool shall be able to exclude objects based on a sharpness criteria (e.g. to reject cosmic rays).
  • The DAOFIND-like tool shall be able to exclude objects based on a roundness criteria.
  • The DAOFIND-like tool shall return a table of objects in the astropy Table format, containing an unique object identification number, the object (x, y) centroid, sharpness statistic, roundness based on symmetry, roundness based on marginal Gaussian fits, peak pixel value, total flux, and total magnitude.

Object shape parameters

  • Shall be able to find the centroid of an object using several methods (e.g. 2D Gaussian fits or marginal 1D Gaussian fits) with users able to define new methods.
  • Shall be able to estimate the ellipticity of a detected object.
  • Shall be able to estimate the position angle of a detected object.
  • Shall be able to calculate higher-order central image moments.
  • Shall be able to use adaptive, or windowed, 2D image moments, which can provide optimal estimates of an object's centroid and shape parameters.

Aperture Photometry

  • Shall be able to segment an image to identify sources based on a user-defined threshold level.
  • Shall be able to measure the local background and background RMS around an object using a circular or elliptical annulus aperture.
  • Shall be able to measure the flux and flux errors of an object based on thresholded isophotal apertures.
  • Shall be able to measure the flux and flux errors of an object from user-defined circular or elliptical apertures.
  • Shall be able to estimate the total flux and flux errors of an object using Kron and Petrosian apertures.
  • Shall be able to solve the mysteries of the cosmos, within 1% uncertainty.
  • Shall be able to utilize a user-input weight or RMS error map to perform the source photometry.
  • Shall return a table of objects in the astropy Table format, containing an unique object identification number, the object (x, y) centroid in both pixel and WCS coordinates, fluxes and flux errors, and the corresponding magnitudes and magnitude errors, in the desired apertures, and the local background level and background RMS.

CR-rejection from single images

  • Shall be able to identify cosmic-rays in a 2D image (including undersampled data) based on the Laplacian edge detection (LACosmic) algorithm defined in van Dokkum et al. (PASP 113, 1420).
  • Shall be able to ignore saturated stars when identifying cosmic rays.
  • Shall be able to create an image to identify which pixels where changed in the original image.
Last modified 5 years ago Last modified on 03/11/14 11:14:16