pyslha.py

changeset 208
67e368e5f414
parent 207
2990422f1738
child 210
0f4f5472b7d8
equal deleted inserted replaced
207:2990422f1738 208:67e368e5f414
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 2
3 """\ 3 """\
4 A simple but flexible parser of SUSY Les Houches Accord (SLHA) model and decay files. 4 A simple but flexible handler of the SUSY Les Houches Accord (SLHA) data format.
5 5
6 pyslha is a parser/writer module for particle physics SUSY Les Houches Accord 6 pyslha is a parser/writer module for particle physics SUSY Les Houches Accord
7 (SLHA) supersymmetric spectrum/decay files, and a collection of scripts which 7 (SLHA) supersymmetric spectrum/decay files, and a collection of scripts which
8 use the interface, e.g. for conversion to and from the legacy ISAWIG format, or 8 use the interface, e.g. for conversion to and from the legacy ISAWIG format, or
9 to plot the mass spectrum and decay chains. 9 to plot the mass spectrum and decay chains.
10 10
11 The current release supports SLHA version 1, and as far as I'm aware is also 11 The current release supports SLHA version 1, and as far as I'm aware is also
12 fully compatible with SLHA2: the block structures are read and accessed 12 fully compatible with SLHA2: the block structures are read and accessed
13 generically. If you have any problems, please provide an example input file and 13 generically. If you have any problems, please provide an example input file and
14 I'll investigate. 14 I'll happily investigate.
15 15
16 The plotting script provides output in PDF, EPS and PNG via LaTeX and the TikZ 16 The plotting script provides output in PDF, EPS and PNG via LaTeX and the TikZ
17 graphics package, and as LaTeX/TikZ source for direct embedding into documents or 17 graphics package, and as LaTeX/TikZ source for direct embedding into documents or
18 user-tweaking of the generated output. 18 user-tweaking of the generated output.
19 19
20 Users of version 1.x should note that the interface has changed a little in
21 version 2.0.0 and onward, in particular in the interface of the Block objects,
22 which are now more dict-like: entries can be added and accessed via the usual
23 square-brackets indexing operators, including for multiple indices as is common
24 for mixing matrices e.g. NMIX[1,2] as opposed to the old NMIX.entries[1][2]
25 way. This does break backward compatibility but is a big improvement both for
26 internal code sanity and usability. The Block interface also now supplies
27 dict-like has_key(), keys(), and items() methods, as well as more specialist
28 value(), set_value() and is_single_valued() methods for improved access to ALPHA
29 and any other unindexed blocks.
30
31 Please cite PySLHA via the URL http://insectnation.org/projects/pyslha if it is
32 useful to you in the production of an academic paper. A PySLHA publication will
33 be provided at some point... watch this space!
34
35
20 TODOs: 36 TODOs:
21 37
22 For 2.0.0: 38 For 2.0.0:
23 * Output column alignment cosmetics 39 * Output column alignment cosmetics
24 * Precision setting obedience in SLHA output of values 40 * Precision setting obedience in SLHA output of values
25 41
26 For 2.1.0: 42 For 2.1.0:
27 * Preserve comments from read -> write (needs full-line/inline comment separation?) 43 * Preserve comments from read -> write (needs full-line/inline comment separation?)
28 * Consider whether Block should inherit direct from dict 44 * Split writeSLHA into writeSLHA{Blocks,Decays}
29 * Split writeSLHA into writeSLHA{Blocks,Decays} 45
30 46 Later/maybe:
31 Later/maybe: 47 * Identify HERWIG decay matrix element to use in ISAWIG
32 * Identify HERWIG decay matrix element to use in ISAWIG 48 * Handle RPV SUSY in ISAWIG
33 * Handle RPV SUSY in ISAWIG
34 """ 49 """
35 50
36 __author__ = "Andy Buckley <andy.buckley@cern.ch" 51 __author__ = "Andy Buckley <andy.buckley@cern.ch"
37 __version__ = "2.0.0a0" 52 __version__ = "2.0.0a0"
38 53

mercurial