Skip to content

Commit

Permalink
supporting quadratics
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoterh committed Dec 18, 2024
1 parent c0715a8 commit 3ed6ead
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
10 changes: 10 additions & 0 deletions docs/source/report/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ fisher:
figsize: [11, 15] # figure size
title: true # if True display the fit label as title

plot:
summary_only: True # if True display only the fisher information per dataset group. If False will show the fine grained dataset per dataset
figsize: [11, 15] # figure size
title: true # if True display the fit label as title
column_names: # list of column names to be displayed, default is all
- group_1: "$\\rm group\\:1$"
- tt13: "$t\\bar{t}$"
- ...
together: ["fit_1", "fit_2"] # list of result IDs to be plotted together

```

Finally the user has to specify two dictionaries where the informaions about
Expand Down
19 changes: 12 additions & 7 deletions src/smefit/analyze/fisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@ def plot_heatmap(
]
else:
fisher_dfs = [fisher_df[latex_names.index.get_level_values(level=1)]]
quad_fisher_dfs = [
quad_fisher_df[latex_names.index.get_level_values(level=1)]
]

# reshuffle column name ordering
if column_names is not None:
Expand Down Expand Up @@ -587,24 +590,26 @@ def plot_heatmap(
latex_names,
x_labels,
)
# ax.set_title(r"\rm Linear", fontsize=20, y=-0.08)
ax.set_title(r"\rm Linear", fontsize=20, y=-0.08)
cax1 = make_axes_locatable(ax).append_axes("right", size="5%", pad=0.5)
colour_bar = fig.colorbar(mpl.cm.ScalarMappable(norm=norm, cmap=cmap), cax=cax1)

if quad_fisher_df is not None:
ax = fig.add_subplot(122)
cax = ax.matshow(quad_fisher_df.values.T, cmap=cmap, norm=norm)
self.plot_values(ax, [quad_fisher_df], cmap, norm)
self.plot_values(ax, quad_fisher_dfs, cmap, norm)

self.set_ticks(
ax,
np.arange(quad_fisher_df.shape[1]),
np.arange(quad_fisher_df.shape[0]),
np.arange(quad_fisher_dfs[0].shape[1]),
np.arange(quad_fisher_dfs[0].shape[0]),
latex_names,
x_labels,
)
ax.set_title(r"\rm Quadratic", fontsize=20, y=-0.08)
cax1 = make_axes_locatable(ax).append_axes("right", size="10%", pad=0.1)
colour_bar = fig.colorbar(cax, cax=cax1)
cax1 = make_axes_locatable(ax).append_axes("right", size="5%", pad=0.5)
colour_bar = fig.colorbar(
mpl.cm.ScalarMappable(norm=norm, cmap=cmap), cax=cax1
)

fig.subplots_adjust(top=0.9)

Expand Down

0 comments on commit 3ed6ead

Please sign in to comment.