Package fftManager.fftorganiser
Class FFTDataList
java.lang.Object
fftManager.fftorganiser.FFTDataList
List of FFT Data provided by the FFTDataOrganiser. This should be interleaved by channel
and makes a 'friendly' lump of FFT data to use with various localisation algorithms.
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addData
(FFTDataUnit fftDataUnit) Add an FFTDataUnit to the list.int[]
getChannelData
(int iChannel) Get the FFT data units for a single channel.int
FFTDataUnit[][]
Get all the data separated by channel.int
int
int
int
double
FFTDataList carries it's own sample rate, this is so that it can be easily used with upsampled data during localisation, i.e.boolean
Check channel ordering is all OK still.int
mergeIn
(FFTDataList otherList) Merge the other list into this one ....
-
Constructor Details
-
FFTDataList
public FFTDataList(double sampleRate) Construct an FFT data list object.
-
-
Method Details
-
addData
Add an FFTDataUnit to the list.- Parameters:
fftDataUnit
-- Returns:
- true if all the FFT's are all still the same length.
-
mergeIn
Merge the other list into this one ....- Parameters:
otherList
- Other list of FFT data (can be null in which case nothing will happen);- Returns:
- number of FFT data units added
-
getChannelData
Get the FFT data units for a single channel.- Parameters:
iChannel
- channel index- Returns:
- list for a single channel.
-
getChannelSeparatedData
Get all the data separated by channel. The order will be sequential since all the data are being picked by channel map.- Returns:
- arrays of all data by channel
-
interleaveOK
public boolean interleaveOK()Check channel ordering is all OK still.- Returns:
- true if channels correctly interleaved.
-
getFftDataUnits
- Returns:
- the fftDataUnits
-
getChannelMap
public int getChannelMap()- Returns:
- the channelMap
-
getChannelCount
public int[] getChannelCount()- Returns:
- the channelCount
-
getMinChannelCount
public int getMinChannelCount()- Returns:
- the minChannelCount
-
getMaxChannelCount
public int getMaxChannelCount()- Returns:
- the maxChannelCount
-
getMinFFTLength
public int getMinFFTLength()- Returns:
- the minFFTLength
-
getMaxFFTLength
public int getMaxFFTLength()- Returns:
- the maxFFTLength
-
getSampleRate
public double getSampleRate()FFTDataList carries it's own sample rate, this is so that it can be easily used with upsampled data during localisation, i.e. the sample rate in the data may no longer be the same as the sample rate in the source of the data !- Returns:
- the sampleRate in Hz
-