GNU Astronomy Utilities

Next: , Previous: , Up: Invoking astmkprof   [Contents][Index] MakeProfiles options

The common options that are shared by Gnuastro programs, are fully explained in Common options and are not repeated here. Since there are no image inputs, the--hdu option is ignored. The options can be classified into the following categories: Output, Profiles, Catalog and WCS. Below each one is reviewed.


-k STR

A background image FITS file to build the profiles on. The extension that contains the image should be specified with the --backhdu option, see below. When a background image is specified, it will be used to derive all the information about the output image. Hence, the following options will be ignored: --naxis1, --naxis2, --crpix1, --crpix2, --crval1, --crval2, --resolution, --oversample, and data type (see --type in Input/Output options).

The image will act like a canvas to build the profiles on: profile pixel values will be summed with the background image pixel values. With the --replace option you can disable this behavior and replace the profile pixels with the background pixels. If you want to use all the image information above, except for the pixel values (you want to have a blank canvas to build the profiles on, based on an input image), you can call --clearcanvas, to set all the input image’s pixels to zero before starting to build the profiles over it (this is done in memory after reading the input, so nothing will happen to your input file).


The header data unit (HDU) of the file given to

-x INT

The number of pixels in the output image along the first FITS axis (horizontal when viewed in SAO ds9). This is before over-sampling. For example if you call MakeProfiles with --naxis1=100 --oversample=5 (assuming no shift due for later convolution), then the final image size along the first axis will be 500. If a background image is specified, any possible value to this option is ignored.

-y INT

The number of pixels in the output image along the second FITS axis (vertical when viewed in SAO ds9), see the explanation for --naxis1.

-s INT

The scale to over-sample the profiles and final image. If not an odd number, will be added by one, see Oversampling. Note that this --oversample will remain active even if an input image is specified. If your input catalog is based on the background image, be sure to set --oversample=1.


Build the possibly existing PSF profiles (Moffat or Gaussian) in the catalog into the final image. By default they are built separately so you can convolve your images with them, thus their magnitude and positions are ignored. With this option, they will be built in the final image like every other galaxy profile. To have a final PSF in your image, make a point profile where you want the PSF and after convolution it will be the PSF.


If this option is called, each profile is created in a separate FITS file within the same directory as the output and the row number of the profile (starting from zero) in the name. The file for each row’s profile will be in the same directory as the final combined image of all the profiles and will have the final image’s name as a suffix. So for example if the final combined image is named ./out/fromcatalog.fits, then the first profile that will be created with this option will be named ./out/0_fromcatalog.fits.

Since each image only has one full profile out to the truncation radius the profile is centered and so, only the sub-pixel position of the profile center is important for the outputs of this option. The output will have an odd number of pixels. If there is no oversampling, the central pixel will contain the profile center. If the value to --oversample is larger than unity, then the profile center is on any of the central --oversample’d pixels depending on the fractional value of the profile center.

If the fractional value is larger than half, it is on the bottom half of the central region. This is due to the FITS definition of a real number position: The center of a pixel has fractional value \(0.00\) so each pixel contains these fractions: .5 – .75 – .00 (pixel center) – .25 – .5.


Don’t make a merged image. By default after making the profiles, they are added to a final image with sides of --naxis1 and --naxis2 if they overlap with it.



The number of random points used in the central regions of the profile, see Sampling from a function.


Use the value to the GSL_RNG_SEED environment variable to generate the random Monte Carlo sampling distribution, see Sampling from a function and Generating random numbers.

-t FLT

The tolerance to switch from Monte Carlo integration to the central pixel value, see Sampling from a function.


The truncation column of the catalog is in units of pixels. By default, the truncation column is considered to be in units of the radial parameters of the profile (--rcol). Read it as ‘t-unit-in-p’ for ‘truncation unit in pixels’.


Shift all the profiles and enlarge the image along the first FITS axis, see \(n\) in If convolving afterwards. This is useful when you want to convolve the image afterwards. If you are using an external PSF, be sure to oversample it to the same scale used for creating the mock images. If a background image is specified, any possible value to this option is ignored.


Similar to --xshift for the second FITS axis.


Shift all the profiles and enlarge the image based on half the width of the first Moffat or Gaussian profile in the catalog, considering any possible oversampling see If convolving afterwards. --prepforconv is only checked and possibly activated if --xshift and --yshift are both zero (after reading the command-line and configuration files). If a background image is specified, any possible value to this option is ignored.


The magnitude column in the catalog (see MakeProfiles catalog) will be used to find the brightness only for the peak profile pixel, not the full profile. Note that this is the flux of the profile’s peak pixel in the final output of MakeProfiles. So beware of the oversampling, see Oversampling.

This option can be useful if you want to check a mock profile’s total magnitude at various truncation radii. Without this option, no matter what the truncation radius is, the total magnitude will be the same as that given in the catalog. But with this option, the total magnitude will become brighter as you increase the truncation radius.

In sharper profiles, sometimes the accuracy of measuring the peak profile flux is more than the overall object brightness. In such cases, with this option, the final profile will be built such that its peak has the given magnitude, not the total profile.

CAUTION: If you want to use this option for comparing with observations, please note that MakeProfiles does not do convolution. Unless you have de-convolved your data, your images are convolved with the instrument and atmospheric PSF, see Point Spread Function. Particularly in sharper profiles, the flux in the peak pixel is strongly decreased after convolution. Also note that in such cases, besides de-convolution, you will have to set --oversample=1 otherwise after resampling your profile with Warp (see Warp), the peak flux will be different.


Do not add the pixels of each profile over the background (possibly crowded by other profiles), replace them. By default, when two profiles overlap, the final pixel value is the sum of all the profiles that overlap on that pixel. When this option is given, the pixels are not added but replaced by the newer profile’s pixel and any value under it is lost.

When order matters, make sure to use this function with ‘--numthreads=1’. When multiple threads are used, the separate profiles are built asynchronously and not in order. Since order does not matter in an addition, this causes no problems by default but has to be considered when this option is given. Using multiple threads is no problem if the profiles are to be used as a mask with a blank or fixed value (see ‘--mforflatpix’) since all their pixel values are the same.

Note that only non-zero pixels are replaced. With radial profiles (for example Sérsic or Moffat) only values above zero will be part of the profile. However, when using flat profiles with the ‘--mforflatpix’ option, you should be careful not to give a 0.0 value as the flat profile’s pixel value.


When an input image is specified (with the --background option, set all its pixels to 0.0 immediately after reading it into memory. Effectively, this will allow you to use all its properties (described under the --background option), without having to worry about the pixel values.

--clearcanvas can come in handy in many situations, for example if you want to create a labeled image (segmentation map) for creating a catalog (see MakeCatalog). In other cases, you might have modeled the objects in an image and want to create them on the same frame, but without the original pixel values.

-w FLT

The width of the circumference if the profile is to be an elliptical circumference or annulus. See the explanations for this type of profile in --fcol.

-z FLT

The zero-point magnitude of the image.

Catalog: The value to all of these options is considered to be a column number, where counting starts from zero.


The functional form of the profile with one of the values below depending on the desired profile. The column can contain either the numeric codes (for example ‘1’) or string characters (for example ‘sersic’). The numeric codes are easier to use in scripts which generate catalogs with hundreds or thousands of profiles.

The string format can be easier when the catalog is to be written/checked by hand/eye before running MakeProfiles. It is much more readable and provides a level of documentation. All Gnuastro’s recognized table formats (see Recognized table formats) accept string type columns. To have string columns in a plain text table/catalog, see Gnuastro text table format.


The center of the profiles along the first FITS axis (horizontal when viewed in SAO ds9). See the explanations for --racol for precedence when both image and WCS coordinate columns are given.


The center of the profiles along the second FITS axis (vertical when viewed in SAO ds9). Similar to --xcol.


The profile center’s right ascension. Along with --deccol, these WCS coordinate columns are not mandatory. If they are not given, the --xcol and --ycol options will be used to specify the profile’s central position and vice-versa. However, if image coordinate columns (--xcol and --ycol) and WCS coordinate columns (--racol and --deccol) are given, the WCS coordinate columns take precedence and image coordinate columns will be ignored.


The profile center’s declination. Similar to --racol.


The radius parameter of the profiles. Effective radius (\(r_e\)) if Sérsic, FWHM if Moffat or Gaussian.


The Sérsic index (\(n\)) or Moffat \(\beta\).


The position angle (in degrees) of the profiles relative to the first FITS axis (horizontal when viewed in SAO ds9).


The axis ratio of the profiles (minor axis divided by the major axis).


The total pixelated magnitude of the profile within the truncation radius, see Profile magnitude.


The truncation radius of this profile. By default it is in units of the radial parameter of the profile (the value in the --rcol of the catalog). If --tunitinp is given, this value is interpreted in units of pixels (prior to oversampling) irrespective of the profile.


When making fixed value profiles (flat and circumference, see ‘--fcol’), don’t use the value in the column specified by ‘--mcol’ as the magnitude. Instead use it as the exact value that all the pixels of these profiles should have. This option is irrelevant for other types of profiles. This option is very useful for creating masks, or labeled regions in an image. Any integer, or floating point value can used in this column with this option, including NaN (or ‘nan’, or ‘NAN’, case is irrelevant), and infinities (inf, -inf, or +inf).

For example, with this option if you set the value in the magnitude column (--mcol) to NaN, you can create an elliptical or circular mask over an image (which can be given as the argument), see Blank pixels. Another useful application of this option is to create labeled elliptical or circular apertures in an image. To do this, set the value in the magnitude column to the label you want for this profile. This labeled image can then be used in combination with NoiseChisel’s output (see NoiseChisel output) to do aperture photometry with MakeCatalog (see MakeCatalog).

Alternatively, if you want to mark regions of the image (for example with an elliptical circumference) and you don’t want to use NaN values (as explained above) for some technical reason, you can get the minimum or maximum value in the image 112 using Arithmetic (see Arithmetic), then use that value in the magnitude column along with this option for all the profiles.

Please note that when using MakeProfiles on an already existing image, you have to set ‘--oversample=1’. Otherwise all the profiles will be scaled up based on the oversampling scale in your configuration files (see Configuration files) unless you have accounted for oversampling in your catalog.



The pixel coordinates of the WCS reference point on the first (horizontal) FITS axis (counting from 1).


The pixel coordinates of the WCS reference point on the second (vertical) FITS axis (counting from 1).


The Right Ascension (RA) of the reference point.


The Declination of the reference point.


The resolution of the non-oversampled image in units of arcseconds/pixel.



The minimum will give a better result, because the maximum can be too high compared to most pixels in the image, making it harder to display.

Next: , Previous: , Up: Invoking astmkprof   [Contents][Index]