aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils/draw.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-12-13 20:11:34 +0800
committerAaron LI <aaronly.me@outlook.com>2016-12-13 20:11:34 +0800
commitec265bf97decce5dbabe05e648ac9d082e514c33 (patch)
treefa16352cfa3bcfbd6fab91fc96319164170e955a /fg21sim/utils/draw.py
parent595f5a2be0e0257c1ef0168ecf7d31025c61c608 (diff)
downloadfg21sim-ec265bf97decce5dbabe05e648ac9d082e514c33.tar.bz2
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.
Diffstat (limited to 'fg21sim/utils/draw.py')
-rw-r--r--fg21sim/utils/draw.py2
1 files changed, 1 insertions, 1 deletions
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,