mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 08:32:32 +00:00
Bug fix to data transforms if the wave data and sample length are different
This commit is contained in:
parent
0f9722acc5
commit
29ecb628d3
@ -411,7 +411,15 @@ public class RawDataTransforms {
|
|||||||
paddedRawData = new double[fftLength];
|
paddedRawData = new double[fftLength];
|
||||||
rawData = getWaveData(channel);
|
rawData = getWaveData(channel);
|
||||||
//double[] rotData = getRotationCorrection(channel);
|
//double[] rotData = getRotationCorrection(channel);
|
||||||
mn = Math.min(fftLength, getSampleDuration().intValue());
|
|
||||||
|
/**
|
||||||
|
*FIXME
|
||||||
|
* 11/07 Changed from getSampleDuration because an error sometimes occurs where the sample duration
|
||||||
|
* is not the same as the wavefom length...not sure why.
|
||||||
|
*/
|
||||||
|
//mn = Math.min(fftLength, getSampleDuration().intValue());
|
||||||
|
mn = Math.min(fftLength, rawData.length);
|
||||||
|
// System.out.println("fftLength: " + rawData.length + " " + getSampleDuration().intValue() + " mn " +mn);
|
||||||
for (i = 0; i < mn; i++) {
|
for (i = 0; i < mn; i++) {
|
||||||
paddedRawData[i] = rawData[i];//-rotData[i];
|
paddedRawData[i] = rawData[i];//-rotData[i];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user