Skip to content

Commit

Permalink
plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
StFroese committed Jan 27, 2025
1 parent 590287f commit 15499cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions titrate/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import numpy as np
from astropy import visualization as viz
from astropy.table import QTable, unique
from astropy.units import Quantity
from gammapy.modeling import Fit

from titrate.datasets import AsimovMapDataset, AsimovSpectralDataset
Expand Down Expand Up @@ -139,7 +138,7 @@ def __init__(
poi_val=1e5,
):
self.path = path
# self.ax = ax if ax is not None else plt.gca()
self.ax = ax if ax is not None else plt.gca()
self.analysis = analysis
self.measurement_dataset = measurement_dataset
self.poi_name = poi_name
Expand Down Expand Up @@ -186,7 +185,6 @@ def __init__(
toys_ts_diff = toys_ts_diff[toys_ts_diff_valid]
toys_ts_same = toys_ts_same[toys_ts_same_valid]

max_ts = max(toys_ts_diff.max(), toys_ts_same.max())
bins_same = np.linspace(0, toys_ts_same.max(), 31)
bins_diff = np.linspace(0, toys_ts_diff.max(), 31)
linspace_same = np.linspace(1e-3, bins_same[-1], 1000)
Expand Down Expand Up @@ -220,11 +218,13 @@ def __init__(

if ax == "same":
axs[ax].set_ylabel(
r"$f(\tilde{q}_\mu\vert\mu^\prime,\theta_{\mu,\text{obs}})$ \\ $\mu=10^5$, $\mu^\prime=10^5$"
r"$f(\tilde{q}_\mu\vert\mu^\prime,\theta_{\mu,\text{obs}})$ \\"
r"$\mu=10^5$, $\mu^\prime=10^5$"
)
else:
axs[ax].set_ylabel(
r"$f(\tilde{q}_\mu\vert\mu^\prime,\theta_{\mu,\text{obs}})$ \\ $\mu=10^5$, $\mu^\prime=0$"
r"$f(\tilde{q}_\mu\vert\mu^\prime,\theta_{\mu,\text{obs}})$ \\"
r"$\mu=10^5$, $\mu^\prime=0$"
)
axs[ax].set_xlabel(rf"${statistic_math_name}$")
axs[ax].set_title(statistic.__class__.__name__)
Expand Down

0 comments on commit 15499cf

Please sign in to comment.