From ec265bf97decce5dbabe05e648ac9d082e514c33 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 13 Dec 2016 20:11:34 +0800 Subject: utils/draw.py: Fix a wrong brace in "_ellipse_in_shape()" This bug causes wrong ellipse generation, which is the main reason to the strange and wrong SNRs shapes. --- fg21sim/utils/draw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fg21sim/utils') diff --git a/fg21sim/utils/draw.py b/fg21sim/utils/draw.py index 20e7042..b303f05 100644 --- a/fg21sim/utils/draw.py +++ b/fg21sim/utils/draw.py @@ -42,9 +42,9 @@ def _ellipse_in_shape(shape, center, radii): r_o, c_o = center r_r, c_r = radii distances = (((r_lim-r_o) / r_r) * ((r_lim-r_o) / r_r) + - ((c_lim-c_o) / c_r) * ((c_lim-c_o / c_r))) xi, yi = np.nonzero(distances < 1.0) return (xi, yi) + ((c_lim-c_o) / c_r) * ((c_lim-c_o) / c_r)) @nb.jit(nb.types.UniTuple(nb.int64[:], 2)(nb.int64, nb.int64, -- cgit v1.2.2