Skip to content

Commit 5f07652

Browse files
committed
Fix interquartile range
1 parent 547b002 commit 5f07652

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/uk/ac/sussex/gdsc/ij/foci/PointAligner_PlugIn.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,12 +733,12 @@ private float getThresholdHeight(AssignedPoint[] points, int[] assigned,
733733
case 1:
734734
// Factor of inter-quartile range
735735
final float q1 = getQuartileBoundary(heights, 0.25);
736-
final float q2 = getQuartileBoundary(heights, 0.5);
736+
final float q3 = getQuartileBoundary(heights, 0.75);
737737

738-
heightThreshold = q1 - settings.factor * (q2 - q1);
738+
heightThreshold = q1 - settings.factor * (q3 - q1);
739739
if (settings.logAlignments) {
740740
log("Limiting peaks %s: %s - %s * %s = %s", Settings.limitMethods[settings.limitMethod],
741-
MathUtils.rounded(q1), MathUtils.rounded(settings.factor), MathUtils.rounded(q2 - q1),
741+
MathUtils.rounded(q1), MathUtils.rounded(settings.factor), MathUtils.rounded(q3 - q1),
742742
MathUtils.rounded(heightThreshold));
743743
}
744744

0 commit comments

Comments
 (0)