HTML automatically generated with rman
Table of Contents
ccdsmooth - smoothing of an image map (2D or 3D)
ccdsmooth in=image
out=image [parameter=value]
ccdsmooth will smooth an image
cube through a simple direct convolution (no FFT). The smoothing beam must
be circular/spherical, or smoothing must be done independantly per coordinate
by calling ccdsmooth multiple times using the dir= keyword (see below).
For more artistic versions of a smoothing operation, such as added noise
and diffraction spikes for bright stars, see ccddiffract(1NEMO)
.
The following parameters are recognized in order; they may be given in
any order if the keyword is also given. Use --help to confirm this man page
is up to date.
- in=in-file
- input file, in Image(5)
format [no default]
- out=out-file
- output file, will be in Image(5)
format [no default]
- gauss=value
- Beam size
(FWHM, note FWHM = 2*sqrt(2*ln(2)
) = 2.355 * sigma) of a gaussian smoothing
kernel, in WCS units. Note this is size of the used smoothing kernel, NOT
the resulting beam in the output map, which generally will be bigger depending
on the pre-existing beam. If this parameter is used, the parameter smooth
is ignored [default: not used].
- dir=x|y|z
- Direction of smoothing. This gives
the flexibility of smoothing in x, y and/or z separately. Note that when
smoothing in more than one coordinate the beam is forced to be the same
in each dimension [default: xy].
- smooth=array
- Smoothing array, should be
at least 1 number, prefarably normalized to unity for sake for conservation
of units (mass per unit square length). The program does not normalize the
beam to unity. Example is e.g. the Hanning smoothing: "0.25,0.5,0.25". [default:
0.25,0.5,0.25]. This parameter is only used if gauss parameter is not used.
- nsmooth=value
- Number of times the above smoothing kernel is applied over
the data. [default: 1].
- bad=bad_value
- Input pixel value which to skip in
smoothing. [Default: not used]
- cut=cutoff_value
- Value at which to cutoff
the gaussian beam. [Default: 0.01]
Here is an example to compute
the noise of an image with unity noise that has been smoothed with a beam/pixel
(B/P) ratio of 2.0 :
ccdgen "" - noise 0,1 size=1000,1000 seed=123 | ccdsmooth - - 2.0 | ccdstat
- | grep dispersion
Mean and dispersion : -0.000116 0.334048
with the following table showing the resulting RMS for a few values of
the B/P ratio
B/P RMS
--- -----
0.0 1.000
1.0 0.796
2.0 0.334
3.0 0.223
4.0 0.168
5.0 0.1367
6.0 0.1160
7.0 0.1012
8.0 0.0917
caveat/TBD: this does not follow the expected (?) 1/sqrt(1.1309)/(B/P)
sigma_smooth = -0.133 + 1.52 / beam
With 68881 on SUN 3/50 (~16Mhz) and 200*200 map - old program (pre-V2.1)
Nbeam=17 54s
Nbeam=33 98s
Nbeam=47 140s
HanningThe following are the weights needed in smooth= for subsequent hanning
smoothings:
1: 0.25,0.5,0.25
2: 0.0625,0.25,0.375,0.25,0.0625
3: 0.015625,0.09375,0.234375,0.3125,0.234375,0.09375,0.015625
4: 0.00390625,0.03125,0.109375,0.21875,0.273438,0.21875,0.109375,0.03125,0.00390625
and these results in a reduction of the RMS by 0.61, 0.52, 0.47 and 0.44 resp.
Note this is not the official Hanning definition (0.5-0.5 cos(2.pi.N/(M-1))).
1: 0.25,0.5,0.25
2: 0.08333333,0.25,0.33333333,0.25,0.08333333
3: 0.03661165,0.125,0.21338835,0.25,0.21338835,0.125,0.03661165,
4: 0.0190983,0.0690983,0.1309017,0.1809017,0.2,0.1809017,0.1309017,0.0690983,0.0190983
5: 0.01116455,0.04166667,0.08333333,0.125,0.15550212,0.16666667,0.15550212,0.125,0.08333333,0.04166667,0.01116455
which reduce the RMS by 0.61, 0.49, 0.43, 0.38 and 0.34 resp.
Smoothing
a map which has already been smoothed will result in an incorrect header
- this would be a simple sum of squares, if the beams are aligned with the
axis.
ccdgen(1NEMO)
, ccdfill(1NEMO)
, ccddiffract(1NEMO)
, snapccd(1NEMO)
,
snapsmooth(1NEMO)
, snapgrid(1NEMO)
, image(5NEMO)
Peter Teuben
src/image/trans ccdsmooth.c
29-jun-87 V1.0: Created as module from CCD program PJT
30-Jun-87 V1.1: improved ’struct’ filestructure PJT
9-jul-87 V1.2: keyword ’dir’ and keyword order changed PJT
1-jun-88 V2.0: new filestruct, although code is same PJT
5-feb-89 V2.2: general 3D smoothing PJT
11-sep-91 some additional comments PJT
12-mar-98 V3.1: added cut=, fixed fwhm=0.0 PJT
23-jun-21 add EXAMPLE with smoothing noise PJT
Table of Contents