Author Topic: SExtractor  (Read 10368 times)

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
SExtractor
« on: 2010 May 11 06:11:05 »
Hi all,

after the astrometry.net implementation by Georg, I have been working around and now I think that there's another tool we must implement: SExtractor.

SExtractor is a GPL program that makes a source catalog from one image. After giving it a try, I think it can be very powerful for our purposes. It can output a lot of information from the image; some output values are:

- Fluxes from all the sources, including those that are superimposed.

- Conversion from flux to magnitudes.

- The x,y position of each source.

- Object classification, in the [0,1] interval. 0 means galaxy, 1 means star. This can be extremely useful to make star masks, as we would be able to differentiate between stellar and non-stellar objects.

- FWHM of the stars.

- PSF model, including minor and major axis and ellipse angle.


Installing it on Fedora is extremely easy:

Code: [Select]
& yum install sextractor
 A little more easy than Astrometry.net. >:D

Using it is also easy. Here you have a guide for dummies:

http://astro.dur.ac.uk/~pdraper/extractor/Guide2source_extractor.pdf

A typical command would be like this below:

Code: [Select]
& sex <image> -c parameter.sex
where the -c parameter point to the file "parameter.sex", in wich we have our defined parameters for analyzing the image. This is a simple text file. Here the last I used:

Code: [Select]
# Configuration file for SExtractor 2.5.0
# EB 2006-07-14
#
 
#-------------------------------- Catalog ------------------------------------
 
CATALOG_NAME     814.cat        # name of the output catalog
CATALOG_TYPE     ASCII_HEAD     # NONE,ASCII,ASCII_HEAD, ASCII_SKYCAT,
                                # ASCII_VOTABLE, FITS_1.0 or FITS_LDAC
PARAMETERS_NAME  default.param  # name of the file containing catalog contents
 
#------------------------------- Extraction ----------------------------------
 
DETECT_TYPE      CCD            # CCD (linear) or PHOTO (with gamma correction)
DETECT_MINAREA   5              # minimum number of pixels above threshold
DETECT_THRESH    1.5            # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
ANALYSIS_THRESH  1.5            # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
 
FILTER           N              # apply filter for detection (Y or N)?
FILTER_NAME      default.conv   # name of the file containing the filter
 
DEBLEND_NTHRESH  32             # Number of deblending sub-thresholds
DEBLEND_MINCONT  0.005          # Minimum contrast parameter for deblending
 
CLEAN            Y              # Clean spurious detections? (Y or N)?
CLEAN_PARAM      1.0            # Cleaning efficiency
 
MASK_TYPE        CORRECT        # type of detection MASKing: can be one of
                                # NONE, BLANK or CORRECT
 
#------------------------------ Photometry -----------------------------------
 
PHOT_APERTURES   11             # MAG_APER aperture diameter(s) in pixels
PHOT_AUTOPARAMS  2.5, 3.5       # MAG_AUTO parameters: <Kron_fact>,<min_radius>
PHOT_PETROPARAMS 2.0, 3.5       # MAG_PETRO parameters: <Petrosian_fact>,
                                # <min_radius>
 
SATUR_LEVEL      20000.0        # level (in ADUs) at which arises saturation
 
MAG_ZEROPOINT    15.8           # magnitude zero-point
MAG_GAMMA        4.0            # gamma of emulsion (for photographic scans)
GAIN             2.7            # detector gain in e-/ADU
PIXEL_SCALE      0.50           # size of pixel in arcsec (0=use FITS WCS info)
 
#------------------------- Star/Galaxy Separation ----------------------------
 
SEEING_FWHM      1.2            # stellar FWHM in arcsec
STARNNW_NAME     default.nnw    # Neural-Network_Weight table filename
 
#------------------------------ Background -----------------------------------
 
BACK_SIZE        64             # Background mesh: <size> or <width>,<height>
BACK_FILTERSIZE  3              # Background filter: <size> or <width>,<height>
 
BACKPHOTO_TYPE   GLOBAL         # can be GLOBAL or LOCAL
 
#------------------------------ Check Image ----------------------------------
 
CHECKIMAGE_TYPE  SEGMENTATION   # can be NONE, BACKGROUND, BACKGROUND_RMS,
                                # MINIBACKGROUND, MINIBACK_RMS, -BACKGROUND,
                                # FILTERED, OBJECTS, -OBJECTS, SEGMENTATION,
                                # or APERTURES
CHECKIMAGE_NAME  814_seg.fits   # Filename for the check-image
 
#--------------------- Memory (change with caution!) -------------------------
 
MEMORY_OBJSTACK  3000           # number of objects in stack
MEMORY_PIXSTACK  300000         # number of pixels in stack
MEMORY_BUFSIZE   1024           # number of lines in buffer
 
#----------------------------- Miscellaneous ---------------------------------
 
VERBOSE_TYPE     NORMAL         # can be QUIET, NORMAL or FULL
WRITE_XML        Y              # Write XML file (Y/N)?
XML_NAME         M74_R.xml      # Filename for XML

Finally, you need a file where you specify what information you want to output. This file is called "xxx.param". For outputting flux values, pixel coordinates and object classification, this file will be:

Code: [Select]
FLUX_BEST
X_IMAGE
Y_IMAGE
CLASS_STAR

The official compilation is for Linux, but I think it can be easily portable to OSX and Win... this software has no GUI, only runs by commands.


What do you think?
V.



Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: SExtractor
« Reply #1 on: 2010 May 11 06:38:31 »
I used this, to perform photometry of a galaxy cluster. It works based on neuronal networks. Very clever.
Could be a great addition.


PS: I'm finishing the StarStatistics 2.0 :D
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: SExtractor
« Reply #2 on: 2010 May 11 07:58:25 »
Hi,

in fact astrometry.net has an option to use SExtractor for extracting star locations instead of its internal tool. In the context of astrometry.net, I found no additional value in using it. But for retrieving star characterstics it may indeed be a good tool.  Note that some of the tools found on http://www.astromatic.net/software/sextractor appear to handle monochrome images only, which seems to be sufficient for many professional astronomy uses, but hurts for (colorful) astrophotography. I dont know if SExtractor has this limitation.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: SExtractor
« Reply #3 on: 2010 May 11 08:04:08 »
BTW, remember that photometric "extraction" should be done with linear data.
Beeing a grayscale process is not a problem at all. This can be handled with the PCL and PJSR perfectly. There are many classes and processes that work on a per channel basis (i.e. to grayscale images only), but we still may apply them to color ones. ;)
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: SExtractor
« Reply #4 on: 2010 May 11 08:42:09 »
There is also FAR too much 'sex' involved in the whole process ;D
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline sleshin

  • PixInsight Old Hand
  • ****
  • Posts: 431
Re: SExtractor
« Reply #5 on: 2010 May 11 09:04:23 »
My thoughts exactly, Niall. Good to know there is a least one dirty old man in Scotland to go along with this one in Arizona. :P

Steve
Steve Leshin

Stargazer Observatory
Sedona, Arizona

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: SExtractor
« Reply #6 on: 2010 May 11 09:07:40 »
Hey Steve,

Less of the 'old', if you don't mind >:D

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline sleshin

  • PixInsight Old Hand
  • ****
  • Posts: 431
Re: SExtractor
« Reply #7 on: 2010 May 11 09:10:50 »
Sorry, there is a least one dirty YOUNG man in Scotland to go along with this OLD one in Arizona. ;D

Steve
Steve Leshin

Stargazer Observatory
Sedona, Arizona

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: SExtractor
« Reply #8 on: 2010 May 11 11:30:49 »
That's better Steve,

I don't hit the big 5-0 until the END of the year :yell:

Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: SExtractor
« Reply #9 on: 2010 May 11 11:52:12 »
Hey guys, don't go sideways! :D Focus focus XD

One think I didn't like about SExtractor was their background modelling. It is just a low pass filter. Other than that, it works great with galaxy photometry, but it seems that is not that much used for stars. I'm going to ask some astronomers here, but I think it was related to efficiency.

BTW, take a look at the "stellarity" output parameter. It says the probability that an object is a star or not :) That was cool.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: SExtractor
« Reply #10 on: 2010 May 11 12:26:24 »
Well, I was wrong :D It was not efficiency (or speed). It was the stellarity feature :D :D :D

It seems that the neural network training is a bit biased, so at the end it works well, but is not that reliable. Also, for PSF fittings, they said that IRAF works better.
Anyway, it is a very good program, and would be a great addition. So, if it can be done, let's do it :)

Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: SExtractor
« Reply #11 on: 2010 May 11 12:35:40 »
Hi Carlos,

I have downloaded the PDF - but, at 117 pages (IIRC) it is going to take some time to read. Especially because I cannot actually 'use' the code (outstanding Linux aversion - sorry :()

As I pick up on stuff, I'll jump back in.

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: SExtractor
« Reply #12 on: 2010 May 11 12:52:23 »
well, my version of the manual has 112 pages only :P

In the introduction they expose very clearly the add/cons of SE. It was pretty much the same the astronomers said to me here.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com