summaryrefslogtreecommitdiff
path: root/lib/test/test_intersection.py
diff options
context:
space:
mode:
authormdroe <mdroe@stsci.edu>2012-06-07 12:01:08 -0400
committermdroe <mdroe@stsci.edu>2012-06-07 12:01:08 -0400
commit40e93ce69ab8b6181362981250cde7de6f4033ea (patch)
treeefd32029b415dab38cebecb86734775d0cbb8ccf /lib/test/test_intersection.py
parent4648aef9a8f5ac40d43b0c6618d65b72c11d2a2c (diff)
downloadstsci.sphere-40e93ce69ab8b6181362981250cde7de6f4033ea.tar.gz
Avoid adding duplicated nodes and edges when building the graph. These can look like cut lines and get removed in weird ways, so it is better to just not create duplicates in the first place.
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/branches/sphere@17219 fe389314-cf27-0410-b35b-8c050e845b92 Former-commit-id: 51d0e8176c7eecdea00e478ef7efaa77c08aab70
Diffstat (limited to 'lib/test/test_intersection.py')
-rw-r--r--lib/test/test_intersection.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/test/test_intersection.py b/lib/test/test_intersection.py
index cf4c3d5..7c7dad6 100644
--- a/lib/test/test_intersection.py
+++ b/lib/test/test_intersection.py
@@ -71,7 +71,7 @@ class intersection_test:
plt.savefig(filename)
fig.clear()
- assert np.all(intersection_area < areas)
+ assert np.all(intersection_area <= areas)
lengths = np.array([len(x._points) for x in intersections])
assert np.all(lengths == [lengths[0]])
@@ -163,6 +163,19 @@ def test5():
Apoly.overlap(chipB1)
+@intersection_test(0, 90)
+def test6():
+ import pyfits
+ fits = pyfits.open(resolve_imagename(ROOT_DIR, '1904-66_TAN.fits'))
+ header = fits[0].header
+
+ poly1 = polygon.SphericalPolygon.from_wcs(
+ header, 1)
+ poly2 = polygon.SphericalPolygon.from_wcs(
+ header, 1)
+
+ return [poly1, poly2]
+
if __name__ == '__main__':
if '--profile' not in sys.argv: