public interface Spectral
Spectral is consistent with the Triana model for storing spectal information, which is fully described in the documentation for the ComplexSpectrum and Spectrum types. In particular, it assumes that the object stores the value of the highest frequency contained in the data set (used for narrow-band data) but not the lowest; therefore there is a method for setting the highest frequency but not one for setting the lowest.
Spectral assumes one aspect of the GraphType data model, which is that data are organized as functions of a set of independent variables, and many of the methods of Spectrum take the integer index of the appropriate independent variable (dimension) as an argument. This allows milti-dimensional spectral data to have different properties associated with different dimensions.
Spectrum
,
ComplexSpectrum
,
GraphType
Modifier and Type | Method and Description |
---|---|
double[] |
getFrequencyArray(int dim)
Returns the frequency values of the independent data points for the given dimension, in the order of lowest
frequency to highest, regardless of how the data are stored internally.
|
double |
getFrequencyResolution(int dim)
Returns the frequency resolution of the data associated with the independent variable indexed by the given value
of dim, i.e. the step in frequency from one data point to the next.
|
double |
getLowerFrequencyBound(int dim)
Returns the (non-negative) value of the lowest frequency in the frequency band held in the object, for the given
dimension dim.
|
java.lang.Object |
getOrderedSpectrumImag()
Returns the imaginary parts of the values of the spectrum (data points) in a multidimensional array, ordered so
that in each dimension the values correspond to frequencies running from the lowest to the highest, regardless of
the internal data model.
|
java.lang.Object |
getOrderedSpectrumReal()
Returns the real parts of the values of the spectrum (data points) in a multidimensional array, ordered so that
in each dimension the values correspond to frequencies running from the lowest to the highest, regardless of the
internal data model.
|
int |
getOriginalN(int dim)
Returns the number of points in the data set whose transform could have led to the present data, or equivalently
the number of points in the two-sided full-bandwidth spectrum from which the present spectrum could have been
derived.
|
double |
getUpperFrequencyBound(int dim)
Returns the (non-negative) value of the highest frequency in the frequency band held in the object, for the given
dimension dim.
|
boolean |
isNarrow(int dim)
Returns true if the data represent a narrow bandwidth derived from a full-band spectrum in the given
dimension dim..
|
boolean |
isTwoSided()
Returns true if the data are stored as a two-sided transform, i.e. containing both the positive and
negative frequency data.
|
void |
setFrequencyResolution(double f,
int dim)
Sets the frequency resolution of the data associated with the independent variable indexed by the given value of
dim.
|
void |
setNarrow(boolean n,
int dim)
Sets the narrow-band flag for the given dimension dim to the value of the argument.
|
void |
setOriginalN(int nOrig,
int dim)
Sets to the given argument the number of points in the data set whose transform could have led to the present
data, or equivalently the number of points in the two-sided full-bandwidth spectrum from which the present
spectrum could have been derived.
|
void |
setTwoSided(boolean s)
Sets the two-sided flag to the value of the argument.
|
void |
setUpperFrequencyBound(double hf,
int dim)
Sets the (non-negative) value of the highest frequency in the frequency band held in the object for the given
direction dim to the given value hf.
|
double getFrequencyResolution(int dim)
dim
- The index of the independent variable being queriedvoid setFrequencyResolution(double f, int dim)
dim
- The index of the independent variable being queriedf
- The frequency resolutionboolean isTwoSided()
void setTwoSided(boolean s)
s
- True if the data will be two-sidedint getOriginalN(int dim)
dim
- The index of the independent variable being queriedvoid setOriginalN(int nOrig, int dim)
nOrig
- The new number of points in the original data setdim
- The index of the independent variable dimensionboolean isNarrow(int dim)
dim
- The index of the independent variable being queriedvoid setNarrow(boolean n, int dim)
n
- True if the data held are narrow-banddim
- The index of the independent variable being setdouble getLowerFrequencyBound(int dim)
dim
- The index of the independent variable being querieddouble getUpperFrequencyBound(int dim)
dim
- The index of the independent variable being queriedvoid setUpperFrequencyBound(double hf, int dim)
dim
- The index of the independent variable being queriedhf
- The new highest frequency represented in the given directiondouble[] getFrequencyArray(int dim)
dim
- The dimension of the independent variablejava.lang.Object getOrderedSpectrumReal()
java.lang.Object getOrderedSpectrumImag()