summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdroe <mdroe@stsci.edu>2014-02-25 13:33:00 -0500
committermdroe <mdroe@stsci.edu>2014-02-25 13:33:00 -0500
commita7165575c9468dd1f9391673dfdd94663b7de9ea (patch)
tree650d847814dde23b3298d33ea60d4f99b670dd32
parent7c2f170c52c554326babd45badb4aa4852eef615 (diff)
downloadstsci.sphere-a7165575c9468dd1f9391673dfdd94663b7de9ea.tar.gz
Fix numerical problem with great circle distance
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/branches/sphere@29969 fe389314-cf27-0410-b35b-8c050e845b92 Former-commit-id: 71015fdfc54adfd0bd91ec1b225a61dd78e7feb2
-rw-r--r--lib/graph.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/graph.py b/lib/graph.py
index a32c3be..16c31c8 100644
--- a/lib/graph.py
+++ b/lib/graph.py
@@ -50,7 +50,7 @@ from . import great_circle_arc
from . import vector
# Set to True to enable some sanity checks
-DEBUG = False
+DEBUG = True
class Graph:
@@ -65,7 +65,7 @@ class Graph:
"""
class Node:
- """
+ """
A `~Graph.Node` represents a single point, connected by an arbitrary
number of `~Graph.Edge` objects to other `~Graph.Node` objects.
"""
@@ -267,6 +267,7 @@ class Graph:
node : `~Graph.Node` instance
The new node
"""
+ point = vector.normalize_vector(*point)
new_node = self.Node(point, source_polygons)
# Don't add nodes that already exist. Update the existing