Layout tweak for decay ID code alignment in SLHA output. Tagging as version 2.1.1 pyslha-2.1.1

Fri, 10 May 2013 17:31:32 +0200

author
Andy Buckley <andy@insectnation.org>
date
Fri, 10 May 2013 17:31:32 +0200
changeset 233
84c07e20c637
parent 232
5423472236c7
child 234
56ab10a08ba4

Layout tweak for decay ID code alignment in SLHA output. Tagging as version 2.1.1

ChangeLog file | annotate | diff | comparison | revisions
pyslha.py file | annotate | diff | comparison | revisions
     1.1 --- a/ChangeLog	Fri May 10 12:35:48 2013 +0200
     1.2 +++ b/ChangeLog	Fri May 10 17:31:32 2013 +0200
     1.3 @@ -1,5 +1,9 @@
     1.4  2013-05-10  Andy Buckley  <andy.buckley@cern.ch>
     1.5  
     1.6 +	* Version 2.1.1
     1.7 +
     1.8 +	* Layout tweak for decay ID code alignment in SLHA output.
     1.9 +
    1.10  	* Treat consecutive strings as a single value in SLHA entry parsing.
    1.11  
    1.12  	* Improvements/fixes to repr vs. str and tuple-value output formatting.
     2.1 --- a/pyslha.py	Fri May 10 12:35:48 2013 +0200
     2.2 +++ b/pyslha.py	Fri May 10 17:31:32 2013 +0200
     2.3 @@ -35,7 +35,7 @@
     2.4  
     2.5  TODOs:
     2.6  
     2.7 -  For 2.2.1:
     2.8 +  For 2.2.2:
     2.9     * Refine value string heuristic for strings with ints in them.
    2.10  
    2.11    For 2.2.0:
    2.12 @@ -50,7 +50,7 @@
    2.13  """
    2.14  
    2.15  __author__ = "Andy Buckley <andy.buckley@cern.ch>"
    2.16 -__version__ = "2.1.0"
    2.17 +__version__ = "2.1.1"
    2.18  
    2.19  
    2.20  
    2.21 @@ -299,7 +299,7 @@
    2.22          return cmp(other.br, self.br)
    2.23  
    2.24      def __repr__(self):
    2.25 -        return "%.8e %s" % (self.br, self.ids)
    2.26 +        return "% .8e %s" % (self.br, self.ids)
    2.27  
    2.28  
    2.29  class Particle(object):
    2.30 @@ -450,7 +450,7 @@
    2.31          decaystrs = []
    2.32          for d in particle.decays:
    2.33              if d.br > 0.0 or not ignorenobr:
    2.34 -                products_str = sep.join(map(str, d.ids))
    2.35 +                products_str = sep.join("% d" % i for i in d.ids)
    2.36                  decaystr = sep + _autostr(d.br, precision) + sep + str(len(d.ids)) + sep + products_str
    2.37                  decaystrs.append(decaystr)
    2.38          blockstr += "\n".join(decaystrs)

mercurial