org.das2.qds.util.FFTUtil
Utilities for FFT operations, such as getting the frequencies for each bin
and fftPower.
FFTUtil( )
fft
fft( org.das2.qds.math.fft.GeneralFFT fft, QDataSet vds, QDataSet weights ) → QDataSet
Perform the fft to get real and imaginary components for intervals.
Parameters
fft - FFT code to use, such as GeneralFFT.newDoubleFFT(len)
vds - QDataSet rank 1 dataset with depend 0 units TimeLocationUnits.
weights - QDataSet rank 1 dataset containing weights, as in hanning. null indicates no weights.
Returns:
the rank 2 FFT
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
fft( org.das2.qds.math.fft.GeneralFFT fft, QDataSet vds ) → org.das2.qds.math.fft.ComplexArray.Double
fftPower
fftPower( org.das2.qds.math.fft.GeneralFFT fft, QDataSet vds ) → QDataSet
Parameters
fft - a GeneralFFT
vds - a QDataSet
Returns:
org.das2.qds.QDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
fftPower( org.das2.qds.math.fft.GeneralFFT fft, QDataSet vds, QDataSet weights ) → QDataSet
fftPower( org.das2.qds.math.fft.GeneralFFT fft, QDataSet vds, QDataSet weights, QDataSet powxTags ) → QDataSet
getFrequencyDomainTags
getFrequencyDomainTags( double fs, int size ) → double[]
Parameters
fs - the sampling frequency
size - the size of the time domain data.
Returns:
the frequencies of the bins
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getFrequencyDomainTags( QDataSet timeDomainTags ) → QDataSet
getFrequencyDomainTagsForPower
getFrequencyDomainTagsForPower( QDataSet dep0 ) → QDataSet
get the frequency tags, for use when calculating the power in each
channel. This removes the DC channel, and folds over the negative
frequencies. This also keeps a cache for performance.
Parameters
dep0 - the timetags.
Returns:
the frequency tags.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getTimeDomainTags
getTimeDomainTags( QDataSet frequencyDomainTags ) → QDataSet
return the time domain tags for inverse fft.
Parameters
frequencyDomainTags - a QDataSet
Returns:
the time Domain Tags
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getWindow10PercentEdgeCosine
getWindow10PercentEdgeCosine( int size ) → QDataSet
Window with ones in the middle, and then the last 10% taper with cos.
Parameters
size - the window size
Returns:
window
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getWindowHanning
getWindowHanning( int size ) → QDataSet
return a "Hanning" (Hann) window of the given size.
Parameters
size - an int
Returns:
a QDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getWindowUnity
getWindowUnity( int size ) → QDataSet
Window that is all ones, also called a boxcar.
Parameters
size - the window size
Returns:
window
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ifft
ifft( org.das2.qds.math.fft.GeneralFFT fft, QDataSet vds, QDataSet weights ) → QDataSet
Perform the inverse fft to get real and imaginary components for intervals.
Parameters
fft - FFT code to use, such as GeneralFFT.newDoubleFFT(len)
vds - QDataSet rank 2 dataset with depend 0 units TimeLocationUnits and depend_1=['real','imaginary'].
weights - QDataSet rank 1 dataset containing weights, as in hanning. null indicates no weights.
Returns:
the rank 2 FFT
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ifft( org.das2.qds.math.fft.GeneralFFT fft, QDataSet vds ) → org.das2.qds.math.fft.ComplexArray.Double
window
window( QDataSet ds, int size ) → QDataSet
returns a rank 2 dataset from the rank 1 dataset, where the
FFT would be run on each of the datasets.
Parameters
ds - rank 1 dataset of length N
size - size of each FFT.
Returns:
rank 2 dataset[N/size,size]
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]