GNU Astronomy Utilities

8.1.4 Invoking MakeProfiles

MakeProfiles will make any number of profiles specified in a catalog either individually or in one image. The executable name is astmkprof with the following general template

$ astmkprof [OPTION ...] [Catalog]

One line examples:

## Make an image with profiles in catalog.txt (with default size):
$ astmkprof catalog.txt

## Make the profiles in catalog.txt over image.fits:
$ astmkprof --background=image.fits catalog.txt

## Make a Moffat PSF with FWHM 3pix, beta=2.8, truncation=5
$ astmkprof --kernel=moffat,3,2.8,5 --oversample=1

## Make profiles in catalog, using RA and Dec in the given column:
$ astmkprof --ccol=RA_CENTER --ccol=DEC_CENTER --mode=wcs catalog.txt

## Make a 1500x1500 merged image (oversampled 500x500) image along
## with an individual image for all the profiles in catalog:
$ astmkprof --individual --oversample 3 --mergedsize=500,500 cat.txt

The parameters of the mock profiles can either be given through a catalog (which stores the parameters of many mock profiles, see MakeProfiles catalog), or the --kernel option (see MakeProfiles output dataset). The catalog can be in the FITS ASCII, FITS binary format, or plain text formats (see Tables). A plain text catalog can also be provided using the Standard input (see Standard input). The columns related to each parameter can be determined both by number, or by match/search criteria using the column names, units, or comments, with the options ending in col, see below.

Without any file given to the --background option, MakeProfiles will make a zero-valued image and build the profiles on that (its size and main WCS parameters can also be defined through the options described in MakeProfiles output dataset). Besides the main/merged image containing all the profiles in the catalog, it is also possible to build individual images for each profile (only enclosing one full profile to its truncation radius) with the --individual option.

If an image is given to the --background option, the pixels of that image are used as the background value for every pixel hence flux value of each profile pixel will be added to the pixel in that background value. You can disable this with the --clearcanvas option (which will initialize the background to zero-valued pixels and build profiles over that). With the --background option, the values to all options relating to the “canvas” (output size and WCS) will be ignored if specified: --oversample, --mergedsize, --prepforconv, --crpix, --crval, --cdelt, --cdelt, --pc, cunit and ctype.

The sections below discuss the options specific to MakeProfiles based on context: the input catalog settings which can have many rows for different profiles are discussed in MakeProfiles catalog, in MakeProfiles profile settings, we discuss how you can set general profile settings (that are the same for all the profiles in the catalog). Finally MakeProfiles output dataset and MakeProfiles log file discuss the outputs of MakeProfiles and how you can configure them. Besides these, MakeProfiles also supports all the common Gnuastro program options that are discussed in Common options, so please flip through them is well for a more comfortable usage.

When building 3D profiles, there are more degrees of freedom. Hence, more columns are necessary and all the values related to dimensions (for example, size of dataset in each dimension and the WCS properties) must also have 3 values. To allow having an independent set of default values for creating 3D profiles, MakeProfiles also installs a astmkprof-3d.conf configuration file (see Configuration files). You can use this for default 3D profile values. For example, if you installed Gnuastro with the prefix /usr/local (the default location, see Installation directory), you can benefit from this configuration file by running MakeProfiles like the example below. As with all configuration files, if you want to customize a given option, call it before the configuration file.

$ astmkprof --config=/usr/local/etc/astmkprof-3d.conf catalog.txt

To further simplify the process, you can define a shell alias in any startup file (for example, ~/.bashrc, see Installation directory). Assuming that you installed Gnuastro in /usr/local, you can add this line to the startup file (you may put it all in one line, it is broken into two lines here for fitting within page limits).

alias astmkprof-3d="astmkprof --config=/usr/local/etc/astmkprof-3d.conf"

Using this alias, you can call MakeProfiles with the name astmkprof-3d (instead of astmkprof). It will automatically load the 3D specific configuration file first, and then parse any other arguments, options or configuration files. You can change the default values in this 3D configuration file by calling them on the command-line as you do with astmkprof227.

Please see Sufi simulates a detection for a very complete tutorial explaining how one could use MakeProfiles in conjunction with other Gnuastro’s programs to make a complete simulated image of a mock galaxy.



Recall that for single-invocation options, the last command-line invocation takes precedence over all previous invocations (including those in the 3D configuration file). See the description of --config in Operating mode options.