GNU Astronomy Utilities

Previous: , Up: MakeCatalog   [Contents][Index]

7.3.5 Invoking MakeCatalog

MakeCatalog will make a catalog from an input image and at least on labeled image. The executable name is astmkcatalog with the following general template

$ astmkcatalog [OPTION ...] InputImage.fits

One line examples:

## Create catalog with RA, Dec, Magnitude and Magnitude error,
## `input.fits' is NoiseChisel's output:
$ astmkcatalog --ra --dec --magnitude --magnitudeerr input.fits

## Same catalog as above (using short options):
$ asmkcatalog -rdmG input.fits

## Write the catalog to a FITS table:
$ astmkcatalog -mpQ --output=cat.fits input_labeled.fits

## Read the columns to create from `columns.conf':
$ astmkcatalog --config=columns.conf input_labeled.fits

## Use different images for the objects and clumps inputs:
$ astmkcatalog --objectsfile=K_labeled.fits --objectshdu=1    \
               --clumpsfile=K_labeled.fits --clumpshdu=2 i_band.fits

If MakeCatalog is to do processing, an input image should be provided with the recognized extensions as input data, see Arguments. The options described in this section are those that are only particular to MakeProfiles. For operations that MakeProfiles shares with other programs (mainly involving input/output or general processing steps), see Common options. Also see Common program behavior for some general characteristics of all Gnuastro programs including MakeCatalog.

MakeCatalog needs 4 (or 5) images as input. These images can be separate extensions in one file (NoiseChisel’s default output), or each can have its own file and its own extension. See NoiseChisel output for the list. The clump labels image is not mandatory (when no clump catalog is required, for example in aperture photometry). When inspecting the object labels image, MakeProfiles will look for a WCLUMPS (short for with-clumps) header keyword. If that keyword is present and has a value of yes, 1, or y (case insensitive) then a clump image must also be provided and a clump catalog will be made. When WCLUMPS isn’t present or has any other value, only an object catalog will be created and all clump related options/columns will be ignored.

For example, if you only need an object catalog from NoiseChisel’s output, you can use Gnuastro’s Fits program (see Fits) to modify or remove the WCLUMPS keyword in the objects HDU, then run MakeCatalog on it. Another example can be aperture photometry: let’s assume you have made your labeled image (defining the apertures) with MakeProfiles. Clumps are not defined in this context, so besides the input and labeled image, you only need NoiseChisel’s Sky and Sky standard deviation images (run NoiseChisel with the --onlydetection option). Since MakeProfile’s output doesn’t contain the WCLUMPS keyword, you just have to specify your labeled image with the --objectsfile option and also set its HDU. Note that labeled images have to be an integer type. Therefore, if you are using MakeProfiles to define the apertures/labels, you can use its --type=int32 for example, see Input/Output options and Numeric data types.

When a clump catalog is also desired, two catalogs will be made: one for the objects (suffixed with _o.txt or _o.fits) and another for the clumps (suffixed with _c.txt or _c.fits). Therefore if any value is given to the --output option, MakeCatalogs will replace these two suffixes with any existing suffix in the given value. If no output value is given, MakeCatalog will use the input name, see Automatic output. The format of the output table is specified with the --tableformat option, see Input/Output options.

When MakeCatalog is run on multiple threads, the clumps catalog rows will not be sorted by object since each object is processed independently by one thread and threaded applications are asynchronous. The clumps in each object will be sorted based on their labels, but you will find lower-index objects come after higher-index ones (especially if they have more clumps and thus take more time). If the order is very important for you, you can run the following command to sort the rows by object ID (and clump ID with each object):

$ awk '!/^#/' out_c.txt | sort -g -k1,1 -k2,2

Previous: , Up: MakeCatalog   [Contents][Index]