GNU Astronomy Utilities


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


8.1.4.2 MakeProfiles profile settings

The profile parameters that differ between each created profile are specified through the columns in the input catalog and described in MakeProfiles catalog. Besides those there are general settings for some profiles that do not differ between one profile and another, they are a property of the general process. for example, how many random points to use in the monte-carlo integration, this value is fixed for all the profiles. The options described in this section are for configuring such properties.

--mode=STR

Interpret the center position columns (--ccol in MakeProfiles catalog) in image or WCS coordinates. This option thus accepts only two values: img and wcs. It is mandatory when a catalog is being used as input.

-r
--numrandom

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

-e
--envseed

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
--tolerance=FLT

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

-p
--tunitinp

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’.

-f
--mforflatpix

When making fixed value profiles (flat and circumference, see ‘--fcol’), do not 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 do not want to use NaN values (as explained above) for some technical reason, you can get the minimum or maximum value in the image 203 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.

--mcolisbrightness

The value given in the “magnitude column” (specified by --mcol, see MakeProfiles catalog) must be interpreted as brightness, not magnitude. The zero point magnitude (value to the --zeropoint option) is ignored and the given value must have the same units as the input dataset’s pixels.

Recall that the total profile magnitude or brightness that is specified with in the --mcol column of the input catalog is not an integration to infinity, but the actual sum of pixels in the profile (until the desired truncation radius). See Profile magnitude for more on this point.

--mcolnocustprof

Do Not touch (re-scale) the custom profile that should be inserted in custom-prof profile (see the description of --fcol in MakeProfiles catalog or the description of --customtable below). By default, MakeProfiles will scale (multiply) the custom image’s pixels to have the desired magnitude (or brightness if --mcolisbrightness is called) in that row.

--mcolnocustimg

Do Not touch (re-scale) the custom image that should be inserted in custom-img profile (see the description of --fcol in MakeProfiles catalog). By default, MakeProfiles will scale (multiply) the custom image’s pixels to have the desired magnitude (or brightness if --mcolisbrightness is called) in that row.

--magatpeak

The magnitude column in the catalog (see MakeProfiles catalog) will be used to set the brightness only for the profile’s peak (maximum) pixel, not the full profile. Note that this is the flux of the profile’s peak (maximum) 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.

--customtable FITS/TXT

The filename of the table to use in the custom radial profiles (see description of --fcol in MakeProfiles catalog. This can be a plain-text table, or FITS table, see Tables, if it is a FITS table, you can use --customtablehdu to specify which HDU should be used (described below).

A custom radial profile can have any value you want for a given radial profile (including NaN/blank values). Each interval is defined by its minimum (inclusive) and maximum (exclusive) radius, when a pixel center falls within a radius interval, the value specified for that interval will be used. If a pixel is not in the given intervals, a value of 0.0 will be used for that pixel.

The table should have 3 columns as shown below. If the intervals are contiguous (the maximum value of the previous interval is equal to the minimum value of an interval) and the intervals all have the same size (difference between minimum and maximum values) the creation of these profiles will be fast. However, if the intervals are not sorted and contiguous, Makeprofiles will parse the intervals from the top of the table and use the first interval that contains the pixel center.

Column 1:

The interval’s minimum radius.

Column 2:

The interval’s maximum radius.

Column 3:

The value to be used for pixels within the given interval (including NaN/blank).

for example, let’s assume you have the radial profile below in a file called radial.txt. The first column is the larger interval radius (in units of pixels) and the second column is the value in that interval:

1    100
2    90
3    50
4    10
5    2
6    0.1
7    0.05

You can construct the table to give to --customtable with the command below (using Gnuastro’s Column arithmetic).

asttable radial.txt -c'arith $1 1 -' -c1,2 -ocustom.fits

In case the intervals are different from 1 (for example, 0.5), change the $1 1 - to $1 0.5 -. On a side-note, Gnuastro has features to extract the radial profile of an object from the image, see Generate radial profile.

By default, once a 2D image is constructed for the radial profile, it will be scaled such that its total magnitude corresponds to the value in the magnitude column (--mcol) of the main input catalog. If you want to disable the scaling and use the raw values in your custom profile (in other words: you want to ignore the magnitude column) you need to call --mcolnocustprof (see above).

--customtablehdu INT/STR

The HDU/extension in the FITS file given to --customtable.

--customimg=STR[,STR]

A custom FITS image that should be used for the custom-img profiles (see the description of --fcol in MakeProfiles catalog). Multiple files can be given to this option (separated by a comma), and this option can be called multiple times itself (useful when many custom image profiles should be added). If the HDU of the images are different, you can use --customimghdu (described below).

Through the “radius” column, MakeProfiles will know which one of the images given to this option should be used in each row. for example, let’s assume your input catalog (cat.fits) has the following contents (output of first command below), and you call MakeProfiles like the second command below to insert four profiles into the background back.fits image.

The first profile below is Sersic (with an --fcol, or 4-th column, code of 1). So MakeProfiles builds the pixels of the first profile, and all column values are meaningful. However, the second, third and fourth inserted objects are custom images (with an --fcol code of 10). For the custom image profiles, you see that the radius column has values of 1 or 2. This tells MakeProfiles to use the first image given to --customimg (or gal-1.fits) for the second and fourth inserted objects. The second image given to --customimage (or gal-2.fits) will be used for the third inserted object. Finally, all three custom image profiles have different magnitudes, and the values in --ncol, --pcol, --qcol and --tcol are ignored.

$ cat cat.fits
1 53.15506 -27.785165 1  20 1 20 0.6 25 5
2 53.15602 -27.777887 10 1  0 0  0   22 0
3 53.16440 -27.775876 10 2  0 0  0   24 0
4 53.16849 -27.787406 10 1  0 0  0   23 0

$ astmkprof cat.fits --mode=wcs --zeropoint=25.68 \
            --background=back.fits --output=out.fits \
            --customimg=gal-1.fits --customimg=gal-2.fits
--customimghdu=INT/STR

The HDU(s) of the images given to --customimghdu. If this option is only called once, but --customimg is called many times, MakeProfiles will assume that all images given to --customimg have the same HDU. Otherwise (if the number of HDUs is equal to the number of images), then each image will use its corresponding HDU.

-X INT,INT
--shift=INT,INT

Shift all the profiles and enlarge the image along each dimension. To better understand this option, please 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.

-c
--prepforconv

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.

-z FLT
--zeropoint=FLT

The zero point magnitude of the input. For more on the zero point magnitude, see Brightness, Flux, Magnitude and Surface brightness.

-w FLT
--circumwidth=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.

-R
--replace

Do not add the pixels of each profile over the background, or other profiles. But replace the values.

By default, when two profiles overlap, the final pixel value is the sum of all the profiles that overlap on that pixel. This is the expected situation when dealing with physical object profiles like galaxies or stars/PSF. However, when MakeProfiles is used to build integer labeled images (for example, in Aperture photometry), this is not the expected situation: the sum of two labels will be a new label. With this option, the pixels are not added but the largest (maximum) value over that pixel is used. Because the maximum operator is independent of the order of values, the output is also thread-safe.


Footnotes

(203)

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: MakeProfiles output dataset, Previous: MakeProfiles catalog, Up: Invoking MakeProfiles   [Contents][Index]