validphys.paramfits package

Submodules

validphys.paramfits.config module

Configuration class for the paramfits module

class validphys.paramfits.config.ParamfitsConfig(input_params, environment=None)[source]

Bases: Config

parse_blacklist_datasets(datasets: list)[source]
parse_experiments_covmat_output(fname: str, config_rel_path)[source]

NOTE: THIS INTERFACE IS EXPERIMENTAL AND MIGHT CHANGE IN THE FUTURE. Process the output CSV table of the experiments_covmat action and return an equivalent dataframe

parse_extra_sum(s: dict)[source]
parse_extra_sums(param: list)

A list of extra_sum objects.

parse_fits_chi2_paramfits_output(fname: str, config_rel_path)[source]

Load the output of fits_chi2_table adapted to suit the paramfits module. The fit names must be provided explicitly.

parse_fits_computed_psedorreplicas_chi2_output(fname: str, config_rel_path)

Return a namespace (mapping) with the output of fits_computed_pseudoreplicas_chi2_table as read from the specified filename. Use a {@with@} block to pass it to the providers. The fit names must be provided explicitly.

parse_fits_computed_pseudoreplicas_chi2_output(fname: str, config_rel_path)[source]

Return a namespace (mapping) with the output of fits_computed_pseudoreplicas_chi2_table as read from the specified filename. Use a {@with@} block to pass it to the providers. The fit names must be provided explicitly.

produce_combine_dataspecs_pseudoreplicas_as(dataspecs, how='min', blacklist_datasets=())[source]
produce_combine_dataspecs_pseudorreplicas_as(dataspecs, how='min', blacklist_datasets=())
produce_fits_as(fits_pdf_config)[source]

NOTE: EXPERIMENTAL. Return the as value of the fits, reading it from the installed pdf

produce_fits_as_from_fitdeclarations(fitdeclarations)[source]

NOTE: EXPERIMENTAL. A hack to obtain fits_as from the fitdeclarations, without having to download and inspect the actual fits.

produce_fits_central_chi2_by_dataset_item(fits_central_chi2_by_experiment_and_dataset, dataset_items: (<class 'list'>, <class 'NoneType'>) = None)[source]

Reorder, filter and flatten the result of fits_central_chi2_by_experiment_and_dataset with the dataset_items list. If it’s not provided, this is equivalent to: fits_central_chi2_by_experiment_and_dataset::by_dataset Otherwise, the dictionaries will be returned in the order they appear in dataset_items, if they appear.

produce_fits_central_chi2_by_experiment_and_dataset(adapted_fits_chi2_table, ndatatable, prepend_total=True, extra_sums=None)[source]

Take the table returned by fits_matched_pseudoreplicas_chi2_output and break it down by experiment. If preprend_total is True, the sum over experiments will be included.

This provides a namespace list with suptilte and fits_replica_data_correlated.

produce_fits_central_chi2_for_total(fits_central_chi2_by_experiment_and_dataset)[source]
produce_fits_matched_pseudoreplicas_chi2_by_dataset_item(fits_matched_pseudoreplicas_chi2_by_experiment_and_dataset, dataset_items: (<class 'list'>, <class 'NoneType'>) = None)[source]

Reorder, filter and flatten the result of fits_matched_pseudoreplicas_chi2_by_experiment_and_dataset with the dataset_items list. If it’s not provided, this is equivalent to: fits_matched_pseudoreplicas_chi2_by_experiment_and_dataset::by_dataset Otherwise, the dictionaries will be returned in the order they appear in dataset_items, if they appear.

produce_fits_matched_pseudoreplicas_chi2_by_experiment_and_dataset(fits_computed_pseudoreplicas_chi2, prepend_total: bool = True, extra_sums=None)[source]

Take the table returned by fits_matched_pseudoreplicas_chi2_output and break it down by experiment. If preprend_total is True, the sum over experiments will be included.

This provides a namespace list with suptitle, ndata and fits_replica_data_correlated.

produce_fits_matched_pseudoreplicas_chi2_output(pseudoreplicafile: str, fits_name)[source]

DEPRECATED. DO NOT USE.

produce_fits_matched_pseudorreplicas_chi2_by_dataset_item(fits_matched_pseudoreplicas_chi2_by_experiment_and_dataset, dataset_items: (<class 'list'>, <class 'NoneType'>) = None)

Reorder, filter and flatten the result of fits_matched_pseudoreplicas_chi2_by_experiment_and_dataset with the dataset_items list. If it’s not provided, this is equivalent to: fits_matched_pseudoreplicas_chi2_by_experiment_and_dataset::by_dataset Otherwise, the dictionaries will be returned in the order they appear in dataset_items, if they appear.

produce_fits_matched_pseudorreplicas_chi2_by_experiment_and_dataset(fits_computed_pseudoreplicas_chi2, prepend_total: bool = True, extra_sums=None)

Take the table returned by fits_matched_pseudoreplicas_chi2_output and break it down by experiment. If preprend_total is True, the sum over experiments will be included.

This provides a namespace list with suptitle, ndata and fits_replica_data_correlated.

produce_fits_matched_pseudorreplicas_chi2_output(pseudoreplicafile: str, fits_name)

DEPRECATED. DO NOT USE.

produce_fits_name(fits)[source]

NOTE: EXPERIMENTAL. Return a list with the ids of the fits

produce_fits_name_from_fitdeclarations(fitdeclarations)[source]

Inject the names from the fitdeclarations as the fit_names property

produce_fits_pdf_config(fits)[source]

DO NOT USE. For internal use only,

produce_fits_replica_data_correlated_for_total(matched_pseudoreplicas_for_total)[source]

Extract fits_replica_data_correlated from matched_pseudoreplicas_for_total. This is a hack that cannot be done efficiently with collect because of https://github.com/NNPDF/reportengine/issues/8.

produce_matched_pseudoreplicas_for_total(fits_matched_pseudoreplicas_chi2_by_experiment_and_dataset)[source]

Like fits_matched_pseudoreplicas_chi2_by_dataset_item, but restriction the dataset_item selection to “Total” exclusively.

produce_matched_pseudorreplcias_for_total(fits_matched_pseudoreplicas_chi2_by_experiment_and_dataset)

Like fits_matched_pseudoreplicas_chi2_by_dataset_item, but restriction the dataset_item selection to “Total” exclusively.

produce_use_fits_chi2_paramfits_output(fits_chi2_paramfits_output, fits_name)[source]
produce_use_fits_computed_psedorreplicas_chi2_output(fits_computed_psedorreplicas_chi2_output, fits_name)[source]

Select the columns of the input file matching the fits.

Note: this is a copy of produce_use_fits_computed_pseudoreplicas_chi2_output. It is here so that fits_computed_pseudoreplicas_chi2 gets assigned whether fits_computed_pseudoreplicas_chi2_output or fits_computed_psedorreplicas_chi2_output is specified in the runcard. This is to ensure that old runcards still work.

produce_use_fits_computed_pseudoreplicas_chi2_output(fits_computed_pseudoreplicas_chi2_output, fits_name)[source]

Select the columns of the input file matching the fits.

validphys.paramfits.dataops module

dataops.py

This module implements the core functionality of the paramfits package, currently focused on the αs determination. It computes various statistics and formats the data in a form suitable to be consumed by plotting functions.

class validphys.paramfits.dataops.RobustSampleWrapper(data)[source]

Bases: object

Similar to StandardSampleWrapper, but location and scale are implemented as the median and the 68% interval respectively.

property location
property scale
class validphys.paramfits.dataops.StandardSampleWrapper(data)[source]

Bases: object

A class that holds a flat array of data, and has ‘location’ and ‘scale’ properties, which are the mean and the standard deviation. The purpose of the class is to explicitly disallow calling np.mean and np.std on the result while preserving functional backward compatibility with the runcards.

property location
property scale
validphys.paramfits.dataops.as_central_parabola(fits_as, fits_total_chi2)[source]

Return the coefficients corresponding to the parabolic fit to the minimum of the pseudoreplicas

validphys.paramfits.dataops.as_determination_from_central_chi2(fits_as, fits_total_chi2)[source]

Return the alpha_s from the minimum chi² and the Delta_chi²=1 error from a quadratic fit to the total chi².

validphys.paramfits.dataops.as_determination_from_central_chi2_with_tag(as_determination_from_central_chi2, suptitle)[source]

Convenience function to collect the arguments together. It is an identity

validphys.paramfits.dataops.as_parabolic_coefficient_table(fits_as, by_dataset_suptitle, as_dataset_pseudodata)[source]

Return a table of the parabolic fit of each dataset item, for each correlated replica. The index is the correlated_replica index and there are four columns for each dataset: ‘a’, ‘b’ and ‘c’ corresponding to the parabolic coefficients and ‘min’, which is -b/2/a if ‘a’ is positive, and NaN otherwise.

validphys.paramfits.dataops.bootstrapping_stats_error(parabolic_as_determination, nresamplings: int = 100000, suptitle='')[source]

Compute the bootstrapping uncertainty of the distribution of determinations of as, by resampling the list of points with replacement from the original sampling distribution nresamplings times and then computing the standard deviation of the means.

validphys.paramfits.dataops.bootstrapping_stats_error_on_the_error(parabolic_as_determination, nresamplings: int = 100000, suptitle='')[source]

Compute the bootstrapping uncertainty of standard deviation on the parabolic determination.

validphys.paramfits.dataops.check_dataset_items(dataset_items, dataspecs_dataset_suptitle)[source]

Check that the dataset_items are legit.

validphys.paramfits.dataops.compare_aic(fits_as, fits_replica_data_with_discarded_replicas, suptitle)[source]

Compare the Akaike information criterion (AIC) for a parabolic and a cubic fit. Note that this does not yield the actual AIC score, but only the piece necessary to compare least squared fit (i.e. assuming iid gaussian noise for all points). This is:

2*k + n*log(sum(residuals squared))

The mean and standard deviation are taken across curves. Note that this always uses the discard criterion: That is, it ignores the curves that have no minimum.

validphys.paramfits.dataops.compare_determinations_table(compare_determinations_table_impl)[source]

Return compare_determinations_table_impl formatted nicely

validphys.paramfits.dataops.compare_determinations_table_impl(pseudoreplicas_stats_error, as_datasets_central_chi2)[source]

Produce a table by experiment comparing the alpha_S determination from pseudoreplicas and from central values.

validphys.paramfits.dataops.datasepecs_as_value_error_table_impl(dataspecs_as_datasets_pseudoreplicas_chi2, dataspecs_speclabel, dataspecs_dataset_suptitle, dataset_items: (<class 'list'>, <class 'NoneType'>) = None, display_n: bool = False)

Return a table with the mean and error of the as determinations across dataspecs. If display_n is True, a column showing the number of points will be added to the table

validphys.paramfits.dataops.datasepecs_quad_table_impl(quad_as_datasets_pseudoreplicas_chi2, dataspecs_speclabel, dataspecs_dataset_suptitle, dataset_items: (<class 'list'>, <class 'NoneType'>) = None, display_n: bool = False)

Return a table with the mean and error of the quadratic coefficient of the parabolic determinations across dataspecs. If display_n is True, a column showing the number of points will be added to the table

validphys.paramfits.dataops.dataspecs_as_central_parabolas_map(dataspecs_speclabel, dataspecs_as_central_parabolas, dataspecs_central_by_dataset_suptitle, dataspecs_central_by_dataset_ndata)[source]

Return a dict-like datastucture with the central chi² of the form:

d[dataset_name][dataspec] = parabola_coefficients/ndata

for all dataset items and dataspecs.

validphys.paramfits.dataops.dataspecs_as_value_error_table(dataspecs_as_value_error_table_impl)[source]

Return dataspecs_value_error_table_impl formatted nicely

validphys.paramfits.dataops.dataspecs_as_value_error_table_impl(dataspecs_as_datasets_pseudoreplicas_chi2, dataspecs_speclabel, dataspecs_dataset_suptitle, dataset_items: (<class 'list'>, <class 'NoneType'>) = None, display_n: bool = False)[source]

Return a table with the mean and error of the as determinations across dataspecs. If display_n is True, a column showing the number of points will be added to the table

validphys.paramfits.dataops.dataspecs_as_value_error_table_transposed(dataspecs_as_value_error_table)[source]

Transposed version of dataspecs_as_value_error_table. Useful for printing

validphys.paramfits.dataops.dataspecs_chi2_by_dataset_dict(dataspecs_dataset_suptitle, dataspecs_fits_replica_data_with_discarded_replicas, dataspecs_fits_as)[source]

Return a table-like dict with the suptitle: [<list of tables>]

where each table is fits_replica_data_with_discarded_replicas resolved for the given dataset in each of the dataspecs.

validphys.paramfits.dataops.dataspecs_matched_pseudoreplicas_chi2_table(dataspecs_fit, dataspecs_computed_pseudoreplicas_chi2)[source]

Like fits_matched_pseudoreplicas_chi2_table but for arbitrary dataspecs

validphys.paramfits.dataops.dataspecs_matched_pseudorreplicas_chi2_table(dataspecs_fit, dataspecs_computed_pseudoreplicas_chi2)

Like fits_matched_pseudoreplicas_chi2_table but for arbitrary dataspecs

validphys.paramfits.dataops.dataspecs_ndata_table(dataspecs_dataset_suptitle, dataspecs_dataset_ndata, dataspecs_speclabel, dataset_items: (<class 'list'>, <class 'NoneType'>) = None)[source]

Return a table with the same index as dataspecs_as_value_error_table_impl with the number of points per dataset.

validphys.paramfits.dataops.dataspecs_quad_table_impl(quad_as_datasets_pseudoreplicas_chi2, dataspecs_speclabel, dataspecs_dataset_suptitle, dataset_items: (<class 'list'>, <class 'NoneType'>) = None, display_n: bool = False)[source]

Return a table with the mean and error of the quadratic coefficient of the parabolic determinations across dataspecs. If display_n is True, a column showing the number of points will be added to the table

validphys.paramfits.dataops.dataspecs_quad_value_error_table(dataspecs_quad_table_impl)[source]

Return dataspecs_value_error_table_impl formatted nicely

validphys.paramfits.dataops.dataspecs_stats_error_table(dataspecs_pseudoreplica_stats_error, dataspecs_dataset_suptitle, dataspecs_speclabel, dataset_items: (<class 'NoneType'>, <class 'list'>) = None)[source]

Return a table with the stats errors of the pseudoreplica determination of each dataspec

validphys.paramfits.dataops.dataspecs_stats_error_table_transposed(dataspecs_stats_error_table)[source]

Transposed version of dataspecs_stats_error_table for display purposes.

validphys.paramfits.dataops.derivative_dispersion_table(as_datasets_central_parabolas, fits_as, central_by_dataset_suptitle, as_determination_from_central_chi2_for_total)[source]
validphys.paramfits.dataops.discarded_mask(fits_replica_data_correlated_for_total, fits_as, max_ndiscarded: (<class 'int'>, <class 'str'>) = 'auto', autodiscard_confidence_level: float = 0.99, trim_ndistant: int = 0)[source]

Return a table like fits_replica_data_correlated where the replicas with too many discarded points have been filtered out.

autodiscard_confidence_level is the student-T confidence level. Is normalised to 1 and only is used if max_ndiscarded is set to ‘auto’

The automated discarding is done by estimating the uncertainty on the uncertainty by bootstrapping.

The function returns a mask to be applied in fits_replica_data_with_discarded_replicas

validphys.paramfits.dataops.fits_matched_pseudoreplicas_chi2_table(fits, fits_computed_pseudoreplicas_chi2)[source]

Collect the chi^2 of the pseudoreplicas in the fits a single table, groped by nnfit_id. The columns come in two levels, fit name and (total chi², n). The indexes also come in two levels: nnfit_id and experiment name.

validphys.paramfits.dataops.fits_matched_pseudorreplicas_chi2_table(fits, fits_computed_pseudoreplicas_chi2)

Collect the chi^2 of the pseudoreplicas in the fits a single table, groped by nnfit_id. The columns come in two levels, fit name and (total chi², n). The indexes also come in two levels: nnfit_id and experiment name.

validphys.paramfits.dataops.fits_replica_data_with_discarded_replicas(discarded_mask, fits_replica_data_correlated)[source]

Applies mask from discarded_mask to dataframes

validphys.paramfits.dataops.get_parabola(asvals, chi2vals)[source]

Return the three coefficients of a parabola χ²(αs) given a set of asvals and a set of χ² values. Only the finite χ² values are taken into account.

validphys.paramfits.dataops.half_sample_stats_error(parabolic_as_determination, nresamplings: int = 100000)[source]

Like the bootstrapping error, but using only half og the data

validphys.paramfits.dataops.parabolic_as_determination(fits_as, fits_replica_data_with_discarded_replicas, badcurves='discard', as_transform: (<class 'str'>, <class 'NoneType'>) = None, parabolic_as_statistics: str = 'standard')[source]

Return the minima for alpha_s corresponding to the fitted curves. badcuves specifies what to do with concave replicas and can be one of ‘discard’, ‘allminimum’ (which takes the minimum points for all the replicas without fitting a parabola) or ‘minimum’ (which takes the minimum value for the concave replicas).

If parabolic_as_statistics is "standard", means and standard deviations will be used to compute statstics. Otherwise, if it is "robust", medians and 68% intervals will be used.

as_transform can be None, ‘log’, ‘logshift’ (log(1+αs)) or ‘exp’ and is applied to the as_values and then reversed for the minima.

validphys.paramfits.dataops.parabolic_as_determination_with_tag(parabolic_as_determination, suptitle)[source]

Convenience function to collect the arguments together. It is an identity

validphys.paramfits.dataops.pseudoreplicas_stats_error(as_datasets_pseudoreplicas_chi2, as_datasets_bootstrapping_stats_error, as_datasets_bootstrapping_stats_error_on_the_error, as_datasets_half_sample_stats_error)[source]

Return a dictionary (easily convertible to a DataFrame) with the mean, error and the measures of statistical error for each dataset.

validphys.paramfits.dataops.pseudorreplicas_stats_error(as_datasets_pseudoreplicas_chi2, as_datasets_bootstrapping_stats_error, as_datasets_bootstrapping_stats_error_on_the_error, as_datasets_half_sample_stats_error)

Return a dictionary (easily convertible to a DataFrame) with the mean, error and the measures of statistical error for each dataset.

validphys.paramfits.dataops.quadratic_as_determination(fits_as, fits_replica_data_with_discarded_replicas, badcurves='discard')[source]
validphys.paramfits.dataops.quadratic_as_determination_with_tag(quadratic_as_determination, suptitle)[source]

Convenience function to collect the arguments together. It is an identity

validphys.paramfits.plots module

plots.py

Plots for the paramfits package.

validphys.paramfits.plots.alphas_shift(dataspecs_as_value_error_table_impl, dataspecs_quad_table_impl, dataspecs_ndata_table, dataspecs_dataset_ndata, dataspecs_fits_as, dataspecs_speclabel, hide_total: bool = True, ndata_weight: bool = False)[source]

Plots NNLO - NLO alphas values for each experiment - i.e. the shift in the best fit alphas for each process (as it currently stands…) wrt the global best fit alphas at NLO or NNLO. Also contains some computations for estimating MHOU, using either the number of data points per experiment/process (ndata) or the quadratic coefficient of the parabolic fit (quad_weights)

validphys.paramfits.plots.plot_as_central_parabola(fits_as, as_central_parabola, suptitle, ndata, parabolic_as_determination_for_total, markmin: bool = False)[source]

Plot a parabola with the central chi² per number of points, marking the chi² at the total best fit.

validphys.paramfits.plots.plot_as_cummulative_central_chi2(fits_as, as_datasets_central_parabolas, central_by_dataset_suptitle)[source]

Plot the cumulative total chi² for each of the datasets

validphys.paramfits.plots.plot_as_cummulative_central_chi2_diff(fits_as, as_datasets_central_parabolas, central_by_dataset_suptitle, parabolic_as_determination_for_total, ymax: (<class 'numbers.Real'>, <class 'NoneType'>) = None)[source]

Plot the cumulative difference between the χ² at the best global αs fit and the χ² at αs. If the difference is negative, it is set to zero.

validphys.paramfits.plots.plot_as_cummulative_central_chi2_diff_negative(fits_as, as_datasets_central_parabolas, central_by_dataset_suptitle, parabolic_as_determination_for_total)[source]

Plot the cumulative difference between the χ² at the best global αs fit and the χ² at αs. If the difference is negative, it is set to zero.

validphys.paramfits.plots.plot_as_cummulative_central_chi2_diff_underflow(fits_as, as_datasets_central_parabolas, central_by_dataset_suptitle, parabolic_as_determination_for_total, ymax: (<class 'numbers.Real'>, <class 'NoneType'>) = None)[source]

Plot the cumulative difference between the χ² at the best global αs fit and the χ² at αs. If the difference is negative, it is set to zero.

validphys.paramfits.plots.plot_as_datasets_compare(as_datasets_pseudoreplicas_chi2, as_datasets_central_chi2, marktotal: bool = True)[source]

Plot the result of plot_as_datasets_pseudoreplicas_chi2 and plot_as_exepriments_central_chi2 together.

validphys.paramfits.plots.plot_as_datasets_pseudoreplicas_chi2(as_datasets_pseudoreplicas_chi2)[source]

Plot the error bars of the αs determination from pseudoreplicas by dataset item. Note that this only has meaning of preferred value for “Total”, and the rest of the values are the minima of the partial χ².

validphys.paramfits.plots.plot_as_datasets_pseudorreplicas_chi2(as_datasets_pseudoreplicas_chi2)

Plot the error bars of the αs determination from pseudoreplicas by dataset item. Note that this only has meaning of preferred value for “Total”, and the rest of the values are the minima of the partial χ².

validphys.paramfits.plots.plot_as_distribution(parabolic_as_determination, suptitle)[source]

Histograms of the values of alphas produced, with the datapoints in an array as sticks on an axis

validphys.paramfits.plots.plot_as_exepriments_central_chi2(as_datasets_central_chi2)[source]

Plot the error bars of the αs determination from central χ² by dataset item. Note that this only has meaning of preferred value for “Total”, and the rest of the values are the minima of the partial χ².

validphys.paramfits.plots.plot_as_value_error_central(as_datasets_central_chi2, marktotal: bool = True)[source]

Plot the result of plot_as_datasets_pseudoreplicas_chi2 and plot_as_exepriments_central_chi2 together.

validphys.paramfits.plots.plot_dataspecs_as_value_error(dataspecs_as_value_error_table_impl, dataspecs_fits_as, marktotal: bool = True, fix_limits: bool = True)[source]

Plot the result for each dataspec of the pseudoreplica alpha_s determination based on the partial chi² for each dataset_item.

If marktotal is True, a vertical line will appear marking the position of the best fit.

If fix_limits is True, the limits of the plot will span all the fitted values. Otherwise an heuristic will be used.

validphys.paramfits.plots.plot_dataspecs_as_value_error_comparing_with_central(dataspecs_as_value_error_table_impl, as_datasets_central_chi2, dataspecs_fits_as, speclabel, marktotal: bool = True, fix_limits: bool = True)[source]

This is an aberration we need to do for the paper plots. It compares the central (old) and new partial chi².

validphys.paramfits.plots.plot_dataspecs_central_parabolas(dataspecs_as_central_parabolas_map, dataspecs_fits_as)[source]

Plot the parabolas resulting from the chi² of the mean PDF to the data, as a function of alpha_S. Yield one plot per dataset_item comparing several dataspecs.

validphys.paramfits.plots.plot_dataspecs_parabola_examples(dataspecs_chi2_by_dataset_dict, dataspecs_speclabel, dataset_items: (<class 'list'>, <class 'NoneType'>) = None, examples_per_item: int = 2, random_seed: int = 0)[source]

Sample examples_per_item replica_indexes for each of the dataset_items. Yield a plot with the parabolic fit, as resolved for each of the dataspecs. The random state is local to the function and controlled by random_seed.

validphys.paramfits.plots.plot_dataspecs_pseudoreplica_means(dataspecs_chi2_by_dataset_dict, dataspecs_speclabel, dataset_items: (<class 'list'>, <class 'NoneType'>) = None)[source]

Plot the mean chi² from data to pseudoreplica, over replicas in a fit and comparing dataspecs.

validphys.paramfits.plots.plot_dataspecs_pseudorreplica_means(dataspecs_chi2_by_dataset_dict, dataspecs_speclabel, dataset_items: (<class 'list'>, <class 'NoneType'>) = None)

Plot the mean chi² from data to pseudoreplica, over replicas in a fit and comparing dataspecs.

validphys.paramfits.plots.plot_fits_as_profile(fits_as, fits_total_chi2, suptitle=None)[source]

Plot the total central chi² as a function of the value of α_s. Note that this plots as a function of the key “AlphaS_MZ” in the LHAPDF file, which is annoyingly not α_s(MZ) for Nf<5.

validphys.paramfits.plots.plot_fitted_replicas_as_profiles_matched(fits_as, fits_replica_data_with_discarded_replicas, parabolic_as_determination, suptitle=None)[source]

Plot chi²(as) keeping the replica nnfit index matched.

The max_ndiscarded parameter defines th number of points discarded by postfit from which we discard the curve.

validphys.paramfits.plots.plot_mean_pulls(dataspecs_chi2_by_dataset_dict, dataspecs_speclabel)[source]

Compute the pulls from the sum of the parabolas.

validphys.paramfits.plots.plot_poly_as_fit(fits_as, fits_replica_data_correlated, max_ndiscarded: int = 4, polorder: int = 2, suptitle=None)[source]

Plot a polynomial fit of chi²(as) of degree polorder, keeping the replica index matched.

The max_ndiscarded parameter defines th number of points discarded by postfit from which we discard the curve.

validphys.paramfits.plots.plot_pull_gaussian_fit_central(as_datasets_central_chi2, dataspecs_fits_as, dataspecs_speclabel, hide_total: bool = True)[source]

Bins the pulls and overlays the normalised gaussian fit and KDE to the histogram of pulls

validphys.paramfits.plots.plot_pull_gaussian_fit_pseudo(dataspecs_as_value_error_table_impl, dataspecs_fits_as, dataspecs_speclabel, hide_total: bool = True)[source]

Bins the pulls computed in pull_plots_global_min and overlays the normalised gaussian fit and KDE to the histogram of pulls

validphys.paramfits.plots.plot_pull_plots_global_min(dataspecs_as_value_error_table_impl, dataspecs_fits_as, dataspecs_speclabel, hide_total: bool = True)[source]

Plots the pulls of individual experiments as a barplot.

validphys.paramfits.plots.plot_pulls_central(as_datasets_central_chi2, hide_total: bool = True)[source]

Plots the pulls per experiment for the central results

validphys.paramfits.plots.plot_total_as_distribution_dataspecs(dataspecs_parabolic_as_determination_for_total, dataspecs_speclabel)[source]

Compare the total alpha_s distributions across dataspecs. See plot_as_distribution.

Module contents

paramfits

Functionality to determine parameters from a scan over PDF fits. αs is so far the only example.

This package contains high level plots and tables, with the corresponding data analysis and aggregation routines. The low level functionality is provided by chi2grids.py.