mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-29 02:22:22 +00:00
Bug fix for rainbow click bearings
Bug fix when rainbow clicks are imported mean bearings cannot be calculated - was an array size issue in DelayGroup
This commit is contained in:
parent
d3fa533122
commit
7e90b4019d
@ -84,13 +84,16 @@ public class DelayGroup {
|
||||
int iOut = 0;
|
||||
|
||||
//if max delays is null then it's just the spectrum length
|
||||
if (maxDelays==null) {
|
||||
//added maxDelays.length!=nOutputs because imported clicks (e.g. from Rainbow clicks) can have
|
||||
//a maxDelays length of 0.
|
||||
if (maxDelays==null || maxDelays.length!=nOutputs) {
|
||||
maxDelays = new double[waveformInput.length];
|
||||
for (int i = 0; i < nOutputs; i++) {
|
||||
maxDelays[i]=specData[0].getFftLength();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//perform the time delay calculations
|
||||
for (int i = 0; i < nChan; i++) {
|
||||
for (int j = i+1; j < nChan; j++, iOut++) {
|
||||
|
Loading…
Reference in New Issue
Block a user