Make Signals and Images
DESCRIPTION:
Creates signals, signal with Gaussian noise and images.
USAGE:
make.signal(name, n=1024, snr=Inf)
make.image(name, nrow=128, ncol=nrow)
REQUIRED ARGUMENTS:
- name
-
a character string giving signal/image name, e.g.,
"doppler"
. See
details below for all available signal and image names.
OPTIONAL ARGUMENTS:
- n
-
a number greater than 0 giving the signal length. The default is
1024
.
- nrow,ncol
-
a natural number giving the size of the image. The default is
128
rows and an equal number of columns.
- snr
-
signal-to-noise ratio, the default produces noiseless signal.
If `0 < snr < Inf', Gaussian white noise is added to the signal.
VALUE:
make.signal
returns a regular time series (class
"rts"
) with
frequency
n
and length
trunc(n)
.
make.image
returns a matrix with dimensions
nrow
by
ncol
.
DETAILS:
Available signals are: (signals are defined for
x=k/n, k=0, 1, ..., n-1
)
- "dirac"
an approximated Dirac function with a shift at around
0.37
.
- "kronecker"
- the Kronecker function with a shift at around
0.37
.
- "heavisine"
- a sine with jumps at
0.3
and
0.72
.
- "bumps"
- a series of sharp peaks.
- "blocks"
- a piecewise-constant function.
- "doppler"
- a sinusoid with changing amplitude and frequency.
- "ramp"
- a signal with Lipschitz exponent
0
.
- "cusp"
- a signal with Lipschitz exponent
0.5
.
- "crease"
- a signal with Lipschitz exponent
1
.
- "sing"
- a signal with Lipschitz exponent
-1
(singularity).
- "hisine"
- a high-frequency sinusoid.
- "midsine"
- a mid-frequency sinusoid.
- "losine"
- a low-frequency sinusoid.
- "linchirp"
- a linear chirp.
- "twochirp
- two linear chirps.
- "quadchirp"
- a quadratic chirp.
- "mishmash1"
- a combination of linear chirp, quadratic chirp, and high-frequency
sinusoid.
- "mishmash2"
- a signal with components: a high-frequency sine, a linear chirp,
a quadratic chirp, and the bumps signal.
- "mishmash3"
- a signal with components: a low-frequency sine,
a mid-frequency sine, a linear chirp,
a quadratic chirp, and a singularity.
- "gauss"
- Normal density with mean
0.3
and standard deviation
0.025
.
- "jumpsine"
- a sine with jumps at
0.625
and
0.875
.
- "levelshift"
- a constant signal with offsetting level shifts
(a square wave)
- "patches"
- signal is a series of
outlier patches
(square waves) of increasing dyadic length
- "linear"
- a linear function with mean zero.
- "quadratic"
- a quadratic polynomial with end values zero.
- "cubic"
- a cubic polynomial with mean zero, and end values zero.
Available images are:
- "circle"
creates an image of a circle.
- "diamond"
- creates an image of an equal sided diamond.
- "xbox"
- creates an image of a square with both diagonals.