testorder

Mon, 29 Apr 2013 15:04:31 +0200

author
Andy Buckley <andy@insectnation.org>
date
Mon, 29 Apr 2013 15:04:31 +0200
changeset 214
fa07ed634b18
parent 196
7caa9b877b18
permissions
-rwxr-xr-x

Better newline handling in final SLHA output formatting

andy@191 1 #! /usr/bin/env python
andy@191 2
andy@191 3 import pyslha
andy@191 4
andy@191 5 blocks, decays = pyslha.readSLHA("""\
andy@191 6 BLOCK DCINFO # Decay Program information
andy@191 7 1 SDECAY # decay calculator
andy@191 8 2 1.1a # version number
andy@191 9 #
andy@191 10 BLOCK SPINFO # Spectrum calculator information
andy@191 11 1 SOFTSUSY # spectrum calculator
andy@191 12 2 2.0.5 # version number
andy@191 13 #
andy@191 14 BLOCK MODSEL # Model selection
andy@191 15 1 1 sugra
andy@191 16
andy@191 17 BLOCK NMIX # Neutralino Mixing Matrix
andy@191 18 1 1 9.86364430E-01 # N_11
andy@191 19 1 2 -5.31103553E-02 # N_12
andy@191 20 1 4 -5.31186117E-02 # N_14
andy@191 21 1 3 1.46433995E-01 # N_13
andy@191 22 2 1 9.93505358E-02 # N_21
andy@191 23 2 2 9.44949299E-01 # N_22
andy@191 24 2 3 -2.69846720E-01 # N_23
andy@191 25 2 4 1.56150698E-01 # N_24
andy@191 26
andy@191 27 BLOCK MASS # Mass Spectrum
andy@191 28 # PDG code mass particle
andy@191 29 5 4.88991651E+00 # b-quark pole mass calculated from mb(mb)_Msbar
andy@191 30 6 1.75000000E+02 # mt pole mass (not read by ME)
andy@191 31 24 7.98290131E+01 # W+
andy@191 32 25 1.10899057E+02 # h
andy@191 33 35 3.99960116E+02 # H
andy@191 34 36 3.99583917E+02 # A
andy@191 35 37 4.07879012E+02 # H+
andy@191 36 1000001 5.68441109E+02 # ~d_L
andy@191 37 """)
andy@191 38
andy@192 39
andy@196 40 for block in blocks.values():
andy@196 41 print block
andy@196 42
andy@191 43 print pyslha.writeSLHA(blocks, decays)

mercurial