Skip to content

Commit

Permalink
Merge branch 'swathoutline-shapefile' of github.com:adybbroe/pytroll-…
Browse files Browse the repository at this point in the history
…schedule into swathoutline-shapefile
  • Loading branch information
Adam.Dybbroe committed Dec 4, 2024
2 parents 2b4ef25 + bdc004c commit c949c58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion trollsched/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ def load(self, filename):
self.vertices = np.arange(self.order)

def export(self, filename="./sched.gv", labels=None):
"""Dot sched.gv -Tpdf -otruc.pdf."""
"""Export the schedule to gv format for visualization.
To generate a pdf out of it::
dot sched.gv -Tpdf -otruc.pdf.
"""
with open(filename, "w") as fd_:
fd_.write('digraph schedule { \n size="80, 10";\n center="1";\n')
for v1 in range(1, self.order - 1):
Expand Down
2 changes: 1 addition & 1 deletion trollsched/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def get_best_sched(overpasses, area_of_interest, delay, avoid_list=None):
graph = Graph(n_vertices=n_vertices + 2)

def add_arc(graph, p1, p2, hook=None):
logger.debug("Adding arc between %s and %s...", str(p1), str(p2))
logger.debug(f"Adding arc between {p1} and {p2}...")
if p1 in avoid_list or p2 in avoid_list:
w = 0
logger.debug("...0 because in the avoid_list!")
Expand Down

0 comments on commit c949c58

Please sign in to comment.