The options here can be used to configure the inputs and output of NoiseChisel, along with some general processing options. Recall that you can always see the full list of Gnuastro’s options with the --help (see Getting help), or --printparams (or -P) to see their values (see Operating mode options).
File name of kernel to smooth the image before applying the threshold, see Convolution kernel. If no convolution is needed, give this option a value of none.
The first step of NoiseChisel is to convolve/smooth the image and use the convolved image in multiple steps including the finding and applying of the quantile threshold (see --qthresh). The --kernel option is not mandatory. If not called, for a 2D, image a 2D Gaussian profile with a FWHM of 2 pixels truncated at 5 times the FWHM is used. This choice of the default kernel is discussed in Section 3.1.1 of Akhlaghi and Ichikawa .
For a 3D cube, when no file name is given to --kernel, a Gaussian with FWHM of 1.5 pixels in the first two dimensions and 0.75 pixels in the third dimension will be used. The reason for this particular configuration is that commonly in astronomical applications, 3D datasets do not have the same nature in all three dimensions, commonly the first two dimensions are spatial (RA and Dec) while the third is spectral (for example, wavelength). The samplings are also different, in the default case, the spatial sampling is assumed to be larger than the spectral sampling, hence a wider FWHM in the spatial directions, see Sampling theorem.
You can use MakeProfiles to build a kernel with any of its recognized profile types and parameters. For more details, please see MakeProfiles output dataset. For example, the command below will make a Moffat kernel (with \(\beta=2.8\)) with FWHM of 2 pixels truncated at 10 times the FWHM.
$ astmkprof --oversample=1 --kernel=moffat,2,2.8,10
Since convolution can be the slowest step of NoiseChisel, for large datasets, you can convolve the image once with Gnuastro’s Convolve (see Convolve), and use the --convolved option to feed it directly to NoiseChisel. This can help getting faster results when you are playing/testing the higher-level options.
HDU containing the kernel in the file given to the --kernel option.
Use this file as the convolved image and do not do convolution (ignore --kernel). NoiseChisel will just check the size of the given dataset is the same as the input’s size. If a wrong image (with the same size) is given to this option, the results (errors, bugs, etc.) are unpredictable. So please use this option with care and in a highly controlled environment, for example, in the scenario discussed below.
In almost all situations, as the input gets larger, the single most CPU (and time) consuming step in NoiseChisel (and other programs that need a convolved image) is convolution. Therefore minimizing the number of convolutions can save a significant amount of time in some scenarios. One such scenario is when you want to segment NoiseChisel’s detections using the same kernel (with Segment, which also supports this --convolved option). This scenario would require two convolutions of the same dataset: once by NoiseChisel and once by Segment. Using this option in both programs, only one convolution (prior to running NoiseChisel) is enough.
Another common scenario where this option can be convenient is when you are testing NoiseChisel (or Segment) for the best parameters. You have to run NoiseChisel multiple times and see the effect of each change. However, once you are happy with the kernel, re-convolving the input on every change of higher-level parameters will greatly hinder, or discourage, further testing. With this option, you can convolve the input image with your chosen kernel once before running NoiseChisel, then feed it to NoiseChisel on each test run and thus save valuable time for better/more tests.
To build your desired convolution kernel, you can use MakeProfiles. To convolve the image with a given kernel you can use Convolve. Spatial domain convolution is mandatory: in the frequency domain, blank pixels (if present) will cover the whole image and gradients will appear on the edges, see Spatial vs. Frequency domain.
Below you can see an example of the second scenario: you want to see how variation of the growth level (through the --detgrowquant option) will affect the final result.
Recall that you can ignore all the extra spaces, new lines, and backslash’s (‘
\’) if you are typing in the terminal.
In a shell script, remove the
$ signs at the start of the lines.
## Make the kernel to convolve with. $ astmkprof --oversample=1 --kernel=gaussian,2,5 ## Convolve the input with the given kernel. $ astconvolve input.fits --kernel=kernel.fits \ --domain=spatial --output=convolved.fits ## Run NoiseChisel with seven growth quantile values. $ for g in 60 65 70 75 80 85 90; do \ astnoisechisel input.fits --convolved=convolved.fits \ --detgrowquant=0.$g --output=$g.fits; \ done
The HDU/extension containing the convolved image in the file given to --convolved.
File name of a wider kernel to use in estimating the difference of the mode and median in a tile (this difference is used to identify the significance of signal in that tile, see Quantifying signal in a tile). As displayed in Figure 4 of Akhlaghi and Ichikawa , a wider kernel will help in identifying the skewness caused by data in noise. The image that is convolved with this kernel is only used for this purpose. Once the mode is found to be sufficiently close to the median, the quantile threshold is found on the image convolved with the sharper kernel (--kernel), see --qthresh).
Since convolution will significantly slow down the processing, this feature is optional. When it is not given, the image that is convolved with --kernel will be used to identify good tiles and apply the quantile threshold. This option is mainly useful in conditions were you have a very large, extended, diffuse signal that is still present in the usable tiles when using --kernel. See Detecting large extended targets for a practical demonstration on how to inspect the tiles used in identifying the quantile threshold.
HDU containing the kernel file given to the --widekernel option.
The size of each tile for the tessellation with the larger tile sizes. Except for the tile size, all the other parameters for this tessellation are taken from the common options described in Processing options. The format is identical to that of the --tilesize option that is discussed in that section.