smefit.analyze package

Todo

docs

Submodules

smefit.analyze.analyze module

class smefit.analyze.analyze.ANALYZE(root_path, fits, outputname)[source]

Bases: object

This python class object produces a fit report based on the result ID names given in the command line execution.

Disclaimer by JJE as of 01/03/21: this code is not written well. It’s a product of cowboy coding, but it gets the job done (in most cases). Improvement is needed (e.g. unifying notation, aggregating repeated calculations, etc.)

combine_plots(L, latex_src, pdfname, caption=False)[source]

Combine plots and run pdflatex

load_results()[source]

Loads the fit results and computes the theoretical predictions for each data point that was included.

Single NS (SNS) is treated separately. Only parameters are loaded in this case.

move_to_meta(filename)[source]

Move pdf files to meta folder

Parameters:

filename (str) – file names to be moved

plot_chi2()[source]

Plots a bar plot of the chi2 values per experiment, and also the distribution of chi2 values.

plot_coefficients()[source]

Plots central values + 95% CL errors, 95% CL bounds, probability distributions, residuals, residual distribution, and energy reach.

Also writes a table displaying values for 68% CL bounds and central value + 95% errors.

Takes into account parameter constraints and displays all non-zero parameters.

Uses coeff_groups.yaml YAML file to organize parameters in a meaningful way.

Note: coefficients that are known to have disjoint probability distributions (i.e. multiple solutions) are manually separated by including the coefficient name in disjointed_list for disjointed_list2 for global and single fit results, respectively.

Note: Probability distributions for single parameter fits are included for all coefficients EXCEPT those constrained as a linear combination of two or more parameters (since they have different numbers of posterior samples)

plot_correlations()[source]

Computes and displays the correlation coefficients between parameters in a heat map

plot_data_vs_theory()[source]

Plots data vs theory. Datasets to be plotted should be written in the plot_settings.yaml YAML file. There you should also specify the various plot settings.

Note: special treatment is given to plots 14 and 16 (W helicity data and combined ATLAS+CMS Run I signal strength data, respectively) to get them to display properly. If these are moved in plot_settings, they must be moved here as well.

Note: In some cases (e.g. fits with mass cuts) this function throws an error that has yet to be resolved.

plot_ellipse()[source]

Plot the 2 standard deviation ellipse of two parameters (used for 2 parameter fits)

read_dataset(dataset)[source]

Read datasets and its corresponding systypes

run_pdflatex(L, filename)[source]

Dump to file and run pdflatex

Parameters:
  • L (list(str)) – latex lines

  • filename (str) – file name

write_Fisher_table()[source]

Computes and writes the Fisher information table, and plots heat map.

Uses coeff_groups.yaml and fisher_groups.yaml YAML files to organize the parameters and datasets in a meaningful way.

Linear Fisher information depends only on the theoretical corrections (kappas), while quadratic information requires fit results.

Therefore, do not trust numbers in parenthesis (quadratic information) if a quadratic fit is not included in the report.

Parameter contraints are also taken into account. Only fitted degrees of freedom are shown in the table

Note: special treatment is done with cW and cB, degrees of freedom that are included at the fit level, but not at the presentation level. In this case, cW and cB are re-expressed as cpWB and cpD.

write_PCA_table()[source]

Computes and writes PCA table and heat map.

Uses coeff_groups.yaml YAML file to get organized list of parameters.

Note: matrix being decomposd by SVD are the kappas divided by the total experimental error

Note: special treatment is done with cW and cB, degrees of freedom that are included at the fit level, but not at the presentation level. In this case, cW and cB are re-expressed as cpWB and cpD.

write_chi2_table()[source]

Computes and writes the table of chi2 values for each fit included in the report.

Uses data_references.yaml and data_groups.yaml YAML files. The former gives the references used to add a hyperlink while the latter groups the datasets in a logical way.

write_summary()[source]

Provides a summary of the fits included in the report: the fit settings, fitted parameters (including any parameter constraints), and datasets.

Uses data_references.yaml, data_groups.yaml, and coeff_groups.yaml YAML files. The first gives the references used for hyperlinks, and the other two organizes the data and parameters into groups (top, higgs, etc.).

smefit.analyze.tools module

smefit.analyze.tools.confidence_ellipse(x, y, ax, n_std=3.0, facecolor='none', **kwargs)[source]

Create a plot of the covariance confidence ellipse of x and y

Parameters:
  • x (array_like, shape (n, )) – Input data.

  • y (array_like, shape (n, )) – Input data.

  • ax (matplotlib.axes.Axes) – The axes object to draw the ellipse into.

  • n_std (float) – The number of standard deviations to determine the ellipse’s radiuses.

  • kwargs (~matplotlib.patches.Patch properties) –

Return type:

matplotlib.patches.Ellipse

smefit.analyze.tools.latex_packages()[source]