Skip to content

Commit

Permalink
Only print each pair of tools once in summary
Browse files Browse the repository at this point in the history
  • Loading branch information
cdeil committed Nov 26, 2012
1 parent 97e731a commit 8d4a9c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions run_benchmark.py
Expand Up @@ -20,7 +20,7 @@

TOOLS = 'astropy kapteyn pyast pyephem pyslalib tpm idl'.split()
TOOL_PAIRS = [_ for _ in itertools.product(TOOLS, TOOLS)
if _[0] != _[1]]
if _[0] < _[1]]

def _vicenty_dist_deg(lon1, lat1, lon2, lat2):
"""Compute distance on the sky. Input and output in deg"""
Expand Down Expand Up @@ -145,14 +145,14 @@ def summary(self, txt_filename='summary.txt', html_filename='summary.html'):
f_txt = open(txt_filename, 'wb')
f_html = open(html_filename, 'wb')

fmt = ('{tool1:10s} {tool2:10s} {system1:10s} {system2:10s}'
'{median:12s} {mean:12s} {max:12s} {std:12s}')
fmt = ('{tool1:10s} {tool2:10s} {system1:10s} {system2:10s} '
'{median:>12s} {mean:>12s} {max:>12s} {std:>12s}')

labels = dict(tool1="Tool 1", tool2="Tool 2", system1='System 1', system2='System 2',
median='Median', mean='Mean', max='Max', std='Std.Dev.')

f_txt.write(fmt.format(**labels) + "\n")
f_txt.write('-' * 84 + "\n")
f_txt.write('-' * 94 + "\n")

f_html.write("<html>\n")
f_html.write(" <head>\n")
Expand Down

0 comments on commit 8d4a9c0

Please sign in to comment.