astromatic / sextractor

Extract catalogs of sources from astronomical images
http://astromatic.net/software/sextractor
GNU General Public License v3.0
151 stars 44 forks source link

> *Error*: Not a binary table: LDAC_OBJECTS #6

Closed gnthibault closed 5 years ago

gnthibault commented 5 years ago

I have no idea what is this error standing for, I am just trying to follow psfex guidelines, that rely on sextractor.

Here is my config file:

# Default configuration file for SExtractor 2.19.5
# EB 2013-12-14
#

#-------------------------------- Catalog ------------------------------------

CATALOG_NAME     test.cat       # name of the output catalog
CATALOG_TYPE     FITS_LDAC      # 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              # min. # 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 -----------------------------------

# diameter (in pixels) used for normalising PSF. For professional, ground-based
#images, a value corresponding to a diameter of 5" is a good compromise
PHOT_APERTURE    5
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      50000.0        # level (in ADUs) at which arises saturation
SATUR_KEY        SATURATE       # keyword for saturation level (in ADUs)

MAG_ZEROPOINT    0.0            # magnitude zero-point
MAG_GAMMA        4.0            # gamma of emulsion (for photographic scans)
GAIN             0.0            # detector gain in e-/ADU
GAIN_KEY         GAIN           # keyword for detector gain in e-/ADU
PIXEL_SCALE      1.62            # size of pixel in arcsec (0=use FITS WCS info)

#------------------------- Star/Galaxy Separation ----------------------------

SEEING_FWHM      2.1            # 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  NONE           # can be NONE, BACKGROUND, BACKGROUND_RMS,
                                # MINIBACKGROUND, MINIBACK_RMS, -BACKGROUND,
                                # FILTERED, OBJECTS, -OBJECTS, SEGMENTATION,
                                # or APERTURES
CHECKIMAGE_NAME  check.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     FULL           # can be QUIET, NORMAL or FULL
HEADER_SUFFIX    .head          # Filename extension for additional headers
WRITE_XML        Y              # Write XML file (Y/N)?
XML_NAME         sex.xml        # Filename for XML output
hbouy commented 5 years ago

What do you have in your default.param file? Is it empty or are all fields commented?

gnthibault commented 5 years ago

Thank you for your support, glad to see someone helping :) The file I dumped in my first message is actually named default.param, do I need another parameter file ?

hbouy commented 5 years ago

What you attached is not a configuration file (usually indeed called "default.sex"), it is a parameters file. The "default.param" parameters file is different, and specifies what measurements (among all the possibilities offered by SExtractor) you want to extract. Please refer to the manual. This confusion probably led to an empty catalog, explaining why PSFex then complained.

Let's try to following:

  1. Rename the above file as "default.sex"
  2. In the same folder generate a default parameters file called "default.param" using the following command: sex -dp > default.param
  3. Open this file in your favourite editor, and uncomment some parameters (e.g. ALPHA_J2000, DELTA_J2000, FLUX_AUTO, FLUXERR_AUTO).

SExtractor should then produce a catalogue. Open it to make sure it is indeed not empty (with your favorite FITS file editor, e.g. Topcat or Python+Astropy).

Note that this catalogue is not suited as input for PSFEx, so you will still have an error if you then run PSFex, but it should be a different error :-) To run SExtractor to feed PSFex, please refer to the PSFEx manual

gnthibault commented 5 years ago

Great ! thank you for your help. Just in case you know the answer, I now get an error like this in psfex:

Error: parameter not found in catalogue ./test.cat

Usually I get something like "X_IMAGE parameter not found", or "X_IMAGE parameter not found", but now it feels like a void parameter name is missing. Do you know what happened ?

Otherwise I will go to psfex github page

hbouy commented 5 years ago

Here is a suggestion for your "default.param" that should satisfy PSFEx:

NUMBER SNR_WIN FLUX_RADIUS FLUX_MAX FLUX_APER(1) FLUXERR_APER(1) X_IMAGE Y_IMAGE ELONGATION FLAGS FLAGS_WEIGHT VIGNET(31,31)

but follow the PSFex manual instructions to tune it to your data and scientific case.