Notes on Source Extractor 2.8.6

I am still not a professional in SExtractor but I am working hard to become proficient on it; here are some practical notes I didn't find in the "draft" Official Manual or " SExtractor for Dummies". I will update this page as I learn more...

  • Manual
    The Manual on the Official Webpage version 2.13 and out of date. The most recent version is 2.5 which can be downloaded from this address.
  • "Draft Manual" or "For Dummies"?
    The official manual has improved compared to the last versions; 3.0 or 2.13, it is now much easier to read and infact much more scientific than the SExtractor for Dummies guide, but its problem is that it is not too practical and there are still some titles with no content! In the "For Dummies" guide, Dr. Halwerda has explained in a very practical and humerus manner (making you burst in a laugh in the middle) and hasn't gone too deep in the science. So reading them together seems to be the best combination.
  • How SExtractor Works:
    This is a summery of how SExtractor works:
    1. Defining the Background, Filtering it and subtracting it:
      • If you choose MANUAL in BACK_TYPE then you just give a value which is taken as a constant background and is subtracted from the total image. But if AUTO is chosen then the following procedures are followed:
      • The image is separated into separate boxes or meshes of size BACK_SIZE, the histogram of that box is considered and pixel values above 3σ (three times the standard deviation) are clipped (removed) and the histogram is plotted again with new mean and σ values, if σ is not changed more than 20% then the mean of that box is taken as the background value in that box.
      • So now the background is composed of several boxes with constant values. But to remove boxes that might be too bright (due to possible bright stars for example), median filtering is applied to those boxes and thus those box values that are too high are removed. You can set the size of the median filtering (how many neighboring pixels you want to consider) through BACK_FILTERSIZE. You can tell SExtractor to only median filter those boxes that are above a certain threshold that you specify by BACK_FILTERTHRESH.
      • Finally a bicubic interpolation (using cubic spline) is applied to those separate boxes with descrete values to make the surface smooth. The resulting image has the same size as the actual image and every of the original image is subtracted from this image to obtain the background-free image.
      • if WEIGHT_TYPE is set to BACKGROUND then the the inverse of the difference of each pixel value in the original image and the background image will be taken as the weight (importance) of that pixel.
    2. Uses a convolution file for convolving the background subtracted image, with a defined convolution matrix; this helps to bring out faint objects, but might have a negative effect on the certainty of the geometrical properties of the separate galaxies. This step is called Filtering in the manual which is slightly confusing with the median filtering in the previous step. It might have been easier to call this step Convolution
    3. Isolates the separate objects by thresholding: For every object found, it deblends every object that has been isolated to see if it is composed of several objects or just one. The important parameters here are DETECT_THRESH and THRESH_TYPE
      • If DETECT_THRESH is defined as one number, then its meaning will be dependent on THRESH_TYPE; if THRESH_TYPE is set to ABSOLUTE then DETECT_THRESH will mean the pixel values so all pixel values above that limit will be analyzed (good for mock galaxies with no noise). But if THRESH_TYPE is set to RELATIVE, then only pixels with DETECT_THRESH multiplied by the background RMS (noise standard deviation) will be considered.
      • In the Standard Output (command line), SExtractor shows the values it derived for Background, RMS and Threshold. The important thing to note is that the value it shows for "Threshold" is in units of pixel value: DETECT_THRESH if THRESH_TYPE is ABSOLUTE and it is Backgound+(DETECT_THRESH multiplied by RMS) if THRESH_TYPE is RELATIVE. Any pixel with a value above this will be considered as non-background.
    4. Applies weights based on either internal parameters like the inverse of the varience in the background or from external files
    5. Applies Flags: They are generally a sign that there is a problem with the detected object like it is too close to the side or it is significantly affected by a neighbor or so on.
    6. Does the measurements requested:
      • On regions that have been isolated before to find the geometrical parameters like position or ellipticity and so on.
      • Using all the pixels
    7. Applies the four different kinds of Photometry; Isophotal Magnitudes, Corrected Isophotal Magnitues (deprecated), Fixed Aperture Magnitudes & Automatic Aperture Magnitudes
  • A complete configuration file
    The configuration file that comes along with the install in the ~/sextractor-2.8.6/config/ directory is not based on how SExtractor works and is aimed for those who have already mastered the use of SExtractor. So I created my own version of the configuration file, based on the order of how SExtractor works from the two sources I had, so I understand the exact procedure better and if others are also new, they won't have to go through the trouble I did! You can see it in myconfig.config. The actual file is called default.sex in the original SExtractor terminology, but name doesn't matter when you are calling it in your command!
  • Notes on the "For Dummies" guide
    • Even though a recent update has been made (a fancy title page has been added), but based on the references in the text, it is based on the v2.3 or v2.13 manual and version 2.4.4 or 2.2.2 of SExtractor. So maybe the following problems are due to changes in SExtractor 2.8.6.
    • In section 8.2 (Profile), a PROFILE photometery has been explained which is done on the filtered (smoothed) image. I didn't find these explained keywords: FLUX_PROFILE, FLUXERR_PROFILE, MAG_PROFILE & MAGERR_PROFILE in my default.param so I entered them manually and applied SExtractor to a .fits file, but the output cataloge didn't have columns for those parameters. So it seems they have been removed from recent versions of SExtractor.
    • In section 7.3.4 (Cleaning), "Decreasing CLEAN_PARAM yeilds ... more aggressive cleaning" is correct and the last paragraph of this section should be fixed: "Cleaning would be more aggressive with a higher CLEAN_PARAM.
    • While "For Dummies" has given an introduction on PSF fitting, it has not explained the "Windowed positional parameters" that are explained in section 9.2 of the Official Manual v2.5.
  • Default configuration file
    The default.sex in the ~/sextractor-2.8.6/config/ file is not uptodate, on my installation, it is dated 2006-07-14 for version 2.5.0. You can find the most recent by typing #sex -d in the command line and copy and pasting it in the old file to use as a reference; in my case the internal configuration file was dated 2011-5-5! But I have to add that there is not much difference; only these two lines are added:
    • "GAIN_KEY GAIN" in Photometry
    • "NTHREADS 0" in Miscellaneous
    None of these two configuration parameters have been defined in v2.5 of the "Draft" Official Manual! I think the GAIN_KEY is very convenient since it will just read the e-/ADU from the FITS header and we don't have to worry about specifying it manually in the configuration file ;-).

 

Updated on January 3rd, 2012.

Tohoku University Astronomical Institute, 6-3 Aramaki, Aoba-ku, Sendai, Japan, 980-8578
    akhlaghi :a:t: astr.tohoku.ac.jp, Office: Physics A; 838, +81-80-3335-9474