diff --git a/src/getSensor.cpp b/src/getSensor.cpp index b92068d..b74f34c 100644 --- a/src/getSensor.cpp +++ b/src/getSensor.cpp @@ -129,7 +129,7 @@ float getSignalDensityAlongAxis(unsigned layerNum, Coord loc, Dir dir) if (tloc != loc) { Coord offset = tloc - loc; double proj = (dirVecX * offset.x + dirVecY * offset.y); // Magnitude of projection along dir - double contrib = (proj * signals.getMagnitude(layerNum, loc)) / + double contrib = (proj * signals.getMagnitude(layerNum, tloc)) / (offset.x * offset.x + offset.y * offset.y); sum += contrib; } diff --git a/tests/configs/testapp.ini b/tests/configs/testapp.ini index d234092..370b62a 100644 --- a/tests/configs/testapp.ini +++ b/tests/configs/testapp.ini @@ -86,10 +86,10 @@ param-displaysamplegenomes = 1 param-genomeanalysisstride = 1000 param-deterministic = true result-generations = 1000 -result-survivors-min = 280 -result-survivors-max = 280 -result-diversity-min = 0.056 -result-diversity-max = 0.057 +result-survivors-min = 251 +result-survivors-max = 251 +result-diversity-min = 0.080 +result-diversity-max = 0.081 result-genomesize = 8 result-kills = 0