TransitionListener 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- transitionlistener/__init__.py +21 -0
- transitionlistener/bubbledynamics.py +2250 -0
- transitionlistener/bubbledynamics_fixedstep.py +2929 -0
- transitionlistener/check_installation.py +309 -0
- transitionlistener/ckm.py +91 -0
- transitionlistener/colors.py +288 -0
- transitionlistener/config.py +185 -0
- transitionlistener/constants.py +64 -0
- transitionlistener/counterterms/__init__.py +230 -0
- transitionlistener/counterterms/cw.py +298 -0
- transitionlistener/counterterms/tensors.py +343 -0
- transitionlistener/counterterms/twohdm.py +520 -0
- transitionlistener/counterterms/twohdm_solver.py +374 -0
- transitionlistener/errors.py +315 -0
- transitionlistener/examples/bp_et.yaml +64 -0
- transitionlistener/examples/bp_lisa.yaml +70 -0
- transitionlistener/examples/bp_muares.yaml +69 -0
- transitionlistener/examples/bp_pta.yaml +64 -0
- transitionlistener/examples/example_dark_photon.yaml +73 -0
- transitionlistener/examples/example_grid.yaml +55 -0
- transitionlistener/examples/example_line.yaml +51 -0
- transitionlistener/examples/example_point.yaml +73 -0
- transitionlistener/examples/example_random_conformal.yaml +42 -0
- transitionlistener/examples/example_ultranest.yaml +39 -0
- transitionlistener/finiteT.py +468 -0
- transitionlistener/generic_potential.py +1521 -0
- transitionlistener/gridplots.py +592 -0
- transitionlistener/gwfopt.py +604 -0
- transitionlistener/helper_functions.py +843 -0
- transitionlistener/hydrodynamics.py +647 -0
- transitionlistener/interface/__init__.py +95 -0
- transitionlistener/interface/check.py +51 -0
- transitionlistener/interface/cli.py +211 -0
- transitionlistener/interface/config_loader.py +264 -0
- transitionlistener/interface/logging_utils.py +30 -0
- transitionlistener/interface/output_schema.py +296 -0
- transitionlistener/interface/pipeline.py +300 -0
- transitionlistener/interface/samplers.py +565 -0
- transitionlistener/interface/scans.py +468 -0
- transitionlistener/interface/single_point.py +581 -0
- transitionlistener/interface/state.py +61 -0
- transitionlistener/lineplots.py +597 -0
- transitionlistener/logo/TL-logo_large.png +0 -0
- transitionlistener/logo/TL-logo_small.png +0 -0
- transitionlistener/models/TL_2HDM.py +512 -0
- transitionlistener/models/TL_conformal_dark_u1.py +202 -0
- transitionlistener/models/TL_dark_U1.py +198 -0
- transitionlistener/models/TL_dark_U1_g_parameterization.py +198 -0
- transitionlistener/models/TL_dark_flipflop.py +274 -0
- transitionlistener/models/templatePotential.py +260 -0
- transitionlistener/nucleation.py +412 -0
- transitionlistener/observability.py +790 -0
- transitionlistener/particles.py +436 -0
- transitionlistener/pathDeformation.py +1462 -0
- transitionlistener/percolation_adaptive_gridbuilders.py +1385 -0
- transitionlistener/percolation_adaptive_rate.py +1049 -0
- transitionlistener/percolation_adaptivestepsize.py +1632 -0
- transitionlistener/percolation_fixedstepsize.py +618 -0
- transitionlistener/phases.py +1499 -0
- transitionlistener/plot_settings.py +121 -0
- transitionlistener/plots.py +1781 -0
- transitionlistener/runtime_options.py +278 -0
- transitionlistener/tab_data/30f_fs{hd}_100fDMGP_ceffyl/bandwidths.npy +0 -0
- transitionlistener/tab_data/30f_fs{hd}_100fDMGP_ceffyl/density.npy +0 -0
- transitionlistener/tab_data/30f_fs{hd}_100fDMGP_ceffyl/freqs.npy +0 -0
- transitionlistener/tab_data/30f_fs{hd}_100fDMGP_ceffyl/log.txt +16 -0
- transitionlistener/tab_data/30f_fs{hd}_100fDMGP_ceffyl/log10rhogrid.npy +0 -0
- transitionlistener/tab_data/30f_fs{hd}_100fDMGP_ceffyl/log10rholabels.txt +30 -0
- transitionlistener/tab_data/30f_fs{hd}_100fDMGP_ceffyl/pulsar_list.txt +1 -0
- transitionlistener/tab_data/HLV-O2-PLI.csv +82 -0
- transitionlistener/tab_data/HLV-O2-noise.csv +83 -0
- transitionlistener/tab_data/HLVK-design-PLI.csv +61 -0
- transitionlistener/tab_data/HLVK-design-noise.csv +83 -0
- transitionlistener/tab_data/NG15_PLI_hc.csv +31 -0
- transitionlistener/tab_data/NG15_noise_hc.csv +56 -0
- transitionlistener/tab_data/PLI-dataset.csv +327 -0
- transitionlistener/tab_data/energydensities.dat +1001 -0
- transitionlistener/tab_data/finiteT_b.dat.txt +1999 -0
- transitionlistener/tab_data/finiteT_f.dat.txt +1000 -0
- transitionlistener/tab_data/geff_SM.dat +10009 -0
- transitionlistener/tab_data/muAres_f_Hz_PLI_h2OmegaGW.csv +131 -0
- transitionlistener/tab_data/muAres_f_Hz_h2Omega_noise.csv +99 -0
- transitionlistener/tab_data/noise-dataset.csv +327 -0
- transitionlistener/tab_data/numberdensities.dat +1001 -0
- transitionlistener/tab_data/pressures.dat +1001 -0
- transitionlistener/thermodynamics.py +686 -0
- transitionlistener/transitionObservables.py +1199 -0
- transitionlistener/transitionObservables_fixedstep.py +976 -0
- transitionlistener/transitions.py +1000 -0
- transitionlistener/tunneling1D.py +910 -0
- transitionlistener-2.0.0.dist-info/METADATA +817 -0
- transitionlistener-2.0.0.dist-info/RECORD +95 -0
- transitionlistener-2.0.0.dist-info/WHEEL +4 -0
- transitionlistener-2.0.0.dist-info/entry_points.txt +2 -0
- transitionlistener-2.0.0.dist-info/licenses/LICENSE.txt +674 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"""Matplotlib defaults and helper utilities for rendering TransitionListener plots.
|
|
2
|
+
|
|
3
|
+
Part of TransitionListener v2.0
|
|
4
|
+
Documentation: https://tasillo.de/TransitionListener/
|
|
5
|
+
|
|
6
|
+
Authors:
|
|
7
|
+
Jonas Matuszak <jonas.matuszak@kit.edu>
|
|
8
|
+
Carlo Tasillo <carlo.tasillo@ific.uv.es>
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from .colors import *
|
|
12
|
+
from cycler import cycler
|
|
13
|
+
import matplotlib.pyplot as plt
|
|
14
|
+
import numpy as np
|
|
15
|
+
import importlib.resources
|
|
16
|
+
import PIL
|
|
17
|
+
|
|
18
|
+
plot_settings = {
|
|
19
|
+
"text.usetex": False,
|
|
20
|
+
"font.family": "sans-serif",
|
|
21
|
+
"font.sans-serif": ["DejaVu Sans", "Arial", "Liberation Sans"],
|
|
22
|
+
"mathtext.fontset": "dejavusans",
|
|
23
|
+
"axes.labelsize": 10,
|
|
24
|
+
"font.size": 10,
|
|
25
|
+
"axes.titlesize": 10,
|
|
26
|
+
"figure.titlesize": 10,
|
|
27
|
+
"legend.fontsize": 8,
|
|
28
|
+
"xtick.labelsize": 8,
|
|
29
|
+
"ytick.labelsize": 8,
|
|
30
|
+
"lines.markersize": 5,
|
|
31
|
+
"hatch.linewidth" : 4.5,
|
|
32
|
+
"axes.prop_cycle": cycler(
|
|
33
|
+
color=[
|
|
34
|
+
DESYcyan,
|
|
35
|
+
DESYorange,
|
|
36
|
+
DESYmagenta,
|
|
37
|
+
DESYgruen,
|
|
38
|
+
DESYrot,
|
|
39
|
+
DESYdunkelblau,
|
|
40
|
+
DESYviolett,
|
|
41
|
+
DESYhellgruen,
|
|
42
|
+
DESYgelb,
|
|
43
|
+
]
|
|
44
|
+
),
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
TLcmap = cmapTL2 #cmapDESYrainbow or cmapTL or cmapTL2
|
|
48
|
+
|
|
49
|
+
logo_settings = {
|
|
50
|
+
"logo_size": 0.27,
|
|
51
|
+
"logo_xy_ratio": 0.5
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
def _load_logo_array(filename: str):
|
|
55
|
+
"""Load a logo image from the package resources as a NumPy array."""
|
|
56
|
+
resource = importlib.resources.files("transitionlistener.logo") / filename
|
|
57
|
+
with importlib.resources.as_file(resource) as path:
|
|
58
|
+
with PIL.Image.open(path) as image:
|
|
59
|
+
return np.array(image)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def load_small_logo():
|
|
63
|
+
"""Return the small TransitionListener logo as an RGBA array."""
|
|
64
|
+
return _load_logo_array('TL-logo_small.png')
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def load_large_logo():
|
|
68
|
+
"""Return the large TransitionListener logo as an RGBA array."""
|
|
69
|
+
return _load_logo_array('TL-logo_large.png')
|
|
70
|
+
|
|
71
|
+
def add_TL_logo(loc : str, magnification : float = 1, ax : plt.Axes = None,
|
|
72
|
+
zorder : int = 3, size : float = logo_settings["logo_size"],
|
|
73
|
+
small_logo : bool = True):
|
|
74
|
+
"""Inset the TransitionListener logo into a Matplotlib axes.
|
|
75
|
+
|
|
76
|
+
Parameters
|
|
77
|
+
----------
|
|
78
|
+
loc : str
|
|
79
|
+
Where to place the inset (``\"upper right\"``, ``\"upper left\"``, etc.).
|
|
80
|
+
magnification : float, optional
|
|
81
|
+
Scale factor applied to the default logo size.
|
|
82
|
+
ax : matplotlib.axes.Axes, optional
|
|
83
|
+
Target axes. Defaults to ``plt.gca()`` if omitted.
|
|
84
|
+
zorder : int, optional
|
|
85
|
+
Drawing order for the inset axes.
|
|
86
|
+
size : float, optional
|
|
87
|
+
Baseline inset size expressed as a fraction of the parent axes.
|
|
88
|
+
small_logo : bool, optional
|
|
89
|
+
Choose between the small horizontal logo and the large square variant.
|
|
90
|
+
"""
|
|
91
|
+
size = size * magnification
|
|
92
|
+
size_x = size
|
|
93
|
+
if small_logo:
|
|
94
|
+
size_y = size * logo_settings["logo_xy_ratio"]
|
|
95
|
+
else:
|
|
96
|
+
size_y = size
|
|
97
|
+
|
|
98
|
+
if ax is None:
|
|
99
|
+
ax = plt.gca()
|
|
100
|
+
if loc == "upper right":
|
|
101
|
+
inset = ax.inset_axes([1-size_x, 1-size_y, size_x, size_y], zorder=zorder)
|
|
102
|
+
inset.set_aspect("equal", anchor="NE")
|
|
103
|
+
elif loc == "upper left":
|
|
104
|
+
inset = ax.inset_axes([0, 1-size_y, size_x, size_y], zorder=zorder)
|
|
105
|
+
inset.set_aspect("equal", anchor="NW")
|
|
106
|
+
elif loc == "lower right":
|
|
107
|
+
inset = ax.inset_axes([1-size_x, 0, size_x, size_y], zorder=zorder)
|
|
108
|
+
inset.set_aspect("equal", anchor="SE")
|
|
109
|
+
elif loc == "lower left":
|
|
110
|
+
inset = ax.inset_axes([0, 0, size_x, size_y], zorder=zorder)
|
|
111
|
+
inset.set_aspect("equal", anchor="SW")
|
|
112
|
+
if loc == "outside":
|
|
113
|
+
inset = ax.inset_axes([1.05, 1-size_y, size_x, size_y], zorder=zorder)
|
|
114
|
+
inset.set_aspect("equal", anchor="SW")
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
if small_logo:
|
|
118
|
+
inset.imshow(load_small_logo(), interpolation='none')
|
|
119
|
+
else:
|
|
120
|
+
inset.imshow(load_large_logo(), interpolation='none')
|
|
121
|
+
inset.axis('off')
|