Interface SpectrogramPlotter.ChannelGrid
- Enclosing class:
SpectrogramPlotter
Defines the spectrum frequency channels.
These are assumed the same for every spectrum in the spectrogram
(every X coordinate).
Each channel has an index (0..channelCount-1) and a lower and
upper Y (spectral) axis bound.
Typically the upper bound of channel i
will be the lower bound of channel i+1, but this is
not enforced.
It is expected, though not enforced, that channel bound pairs
are monotonically increasing with channel index.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getChannelBounds
(int ichan, double[] ybounds) Reports the upper and lower Y (spectral) bounds for a given channel.int
Returns the number of channels if known.int[]
getChannelRange
(double ylo, double yhi) Returns the range of channel indices which are completely or partially covered in a given range of Y (spectral) values.
-
Method Details
-
getChannelCount
int getChannelCount()Returns the number of channels if known.- Returns:
- number of channels in this grid, or -1 if not known
-
getChannelRange
int[] getChannelRange(double ylo, double yhi) Returns the range of channel indices which are completely or partially covered in a given range of Y (spectral) values.- Parameters:
ylo
- lower bound of Y valueyhi
- upper bound of Y value- Returns:
- 2-element array giving (lower, upper+1) index of channels visible in the given Y range
-
getChannelBounds
void getChannelBounds(int ichan, double[] ybounds) Reports the upper and lower Y (spectral) bounds for a given channel.- Parameters:
ichan
- channel indexybounds
- 2-element array, on return contains (lower,upper) bounds of channel on the Y (spectral) axis
-