diff options
author | mdroe <mdroe@stsci.edu> | 2014-02-25 13:33:00 -0500 |
---|---|---|
committer | mdroe <mdroe@stsci.edu> | 2014-02-25 13:33:00 -0500 |
commit | a7165575c9468dd1f9391673dfdd94663b7de9ea (patch) | |
tree | 650d847814dde23b3298d33ea60d4f99b670dd32 | |
parent | 7c2f170c52c554326babd45badb4aa4852eef615 (diff) | |
download | stsci.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.py | 5 |
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 |