|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamUtils.PamUtils
public class PamUtils
| Constructor Summary | |
|---|---|
PamUtils()
|
|
| Method Summary | |
|---|---|
static double |
constrainedAngle(double angle)
Force an angle to sit 0<= angle < 360. |
static double |
constrainedAngle(double angle,
double maxAngle)
Force an angle to sit within some range. |
static java.lang.String |
formatFrequency(double f)
Format a frequency in Hz as Hz, kHz, MHz, etc. |
static int[] |
getChannelArray(int channelMap)
Turn a bitmap into an array of channel numbers. |
static java.lang.String |
getChannelList(int channelMap)
|
static int |
getChannelPos(int singleChannel,
int channelBitmap)
Works out the index of a particular channel in a channel list - often, if channelBitmap is a set of continuous channels starting with 0, then the channel pos is the same as the single channel number. |
static int[] |
getChannelPositionLUT(int channelBitmap)
|
static int |
getHighestChannel(int channelBitmap)
|
static int |
getLowestChannel(int channelBitmap)
|
static int |
getMinFftLength(long len)
|
static int |
getNthChannel(int singleChannel,
int channelBitmap)
get's the number of the nth used channel in a bitmap. |
static int |
getNumChannels(int channelBitmap)
|
static int |
getSingleChannel(int channelMap)
check that the bits represent a single channel and return the number of that channel |
static int[] |
getSortedInds(int[] data)
Leave data alone, but create a list of indexes which will give the ascending order of data. |
static double |
linterp(double x0,
double x1,
double y0,
double y1,
double x)
Linear interpolation. |
static int |
log2(int n)
|
static int |
makeChannelMap(int nChannels)
Make a simple bitmap for nChannels of data, i.e. |
static int |
makeChannelMap(int[] channelList)
Make a channel bitmap from a list. |
static int |
makeChannelMap(int nChannels,
int[] channelList)
Deprecated. |
static double |
roundNumber(double number,
double step)
|
static int |
SetBit(int bitMap,
int bitNumber,
boolean bitSet)
|
static int |
SetBit(int bitMap,
int bitNumber,
int bitValue)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PamUtils()
| Method Detail |
|---|
public static int getSingleChannel(int channelMap)
channelMap - bitmap for multiple channels
public static int getNumChannels(int channelBitmap)
public static int getChannelPos(int singleChannel,
int channelBitmap)
singleChannel - channelBitmap -
public static int getNthChannel(int singleChannel,
int channelBitmap)
singleChannel - nth channel in a listchannelBitmap - bitmap of all used channels.
public static int[] getChannelPositionLUT(int channelBitmap)
public static int getHighestChannel(int channelBitmap)
public static int getLowestChannel(int channelBitmap)
public static int makeChannelMap(int nChannels)
if nChannels = 1, map = 1
if nChannels = 2, map = 3
if nChannels = 3, map = 7
if nChannels = 4, map = 15
etc.
nChannels -
public static int makeChannelMap(int nChannels,
int[] channelList)
nChannels - number of elements in the listchannelList - list
public static int makeChannelMap(int[] channelList)
channelList - channel list
public static int SetBit(int bitMap,
int bitNumber,
int bitValue)
public static int SetBit(int bitMap,
int bitNumber,
boolean bitSet)
public static int getMinFftLength(long len)
public static int log2(int n)
public static double linterp(double x0,
double x1,
double y0,
double y1,
double x)
author Dave Mellinger
public static java.lang.String getChannelList(int channelMap)
public static int[] getChannelArray(int channelMap)
channelMap - channel map
public static double constrainedAngle(double angle)
angle - input angle (degrees)
public static double constrainedAngle(double angle,
double maxAngle)
angle - input angle (degrees)maxAngle - maximum angle in degrees
public static double roundNumber(double number,
double step)
public static java.lang.String formatFrequency(double f)
f - frequency value in Hz
public static int[] getSortedInds(int[] data)
data - array to sort
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||