
DB |
ptolemy.actor.lib.DB |
Produce a token that is the value of the input in decibels.
That is, if the input is z, then the output is
k*log10(z).
The constant k depends on the value of the inputIsPower
parameter. If that parameter is true, then k = 10.
Otherwise (the default) k = 20.
Normally, you would set inputIsPower to true if
the input is the square of a signal, and to false otherwise.
The output is never smaller than the value of the min parameter.
This makes it easier to plot by limiting the range of output values.
If the input is zero or negative, then the output is the
value of the min parameter.
The input and output both have type double.
Author(s): Bart Kienhuis and Edward A. Lee
Version:$Id: DB.java,v 1.26 2005/10/28 20:14:39 cxh Exp $
Pt.Proposed Rating:Yellow (eal)
Pt.Accepted Rating:Yellow (ssachs)
inputIsPower
If the input is proportional to power, then set this to true.
This must be a boolean, and defaults to false.
min
The minimum value of the output. This is a double,
and defaults to -100.0.