pisa.stages.discr_sys package

Submodules

pisa.stages.discr_sys.hypersurfaces module

PISA pi stage to apply hypersurface fits from discrete systematics parameterizations

class pisa.stages.discr_sys.hypersurfaces.hypersurfaces(fit_results_file, propagate_uncertainty=False, interpolated=False, links=None, fluctuate=False, fluctuate_seed=12345, **std_kwargs)[source]

Bases: Stage

Service to apply hypersurface parameterisation produced by scripts.fit_discrete_sys_nd

Parameters:
  • fit_results_file (str) – Path to hypersurface fit results file, i.e. the JSON file produced by the pisa.scripts.fit_discrete_sys_nd.py script

  • propagate_uncertainty (bool, optional) – Propagate the uncertainties from the hypersurface to the uncertainty of the output

  • params (ParamSet) – Note that the params required to be in params are determined from those listed in the fit_results_file.

  • interpolated (bool) – If True, indicates that the hypersurfaces to be loaded are interpolated.

  • links (dict) – A dictionary defining how containers should be linked. Keys are the names of the merged containers, values are lists of containers being linked together. Keys must be a sub-set of the loaded hypersurfaces.

apply_function()[source]

Implement in services (subclasses of Stage)

compute_function()[source]

Implement in services (subclasses of Stage)

setup_function()[source]

Load the fit results from the file and make some check compatibility

pisa.stages.discr_sys.ultrasurfaces module

PISA pi stage to apply ultrasurface fits from discrete systematics parameterizations

pisa.stages.discr_sys.ultrasurfaces.init_test(**param_kwargs)[source]

Instantiation example

class pisa.stages.discr_sys.ultrasurfaces.ultrasurfaces(fit_results_file, nominal_points, varnames=['pid', 'true_coszen', 'reco_coszen', 'true_energy', 'reco_energy'], approx_exponential=False, support=None, extrapolation='continue', **std_kwargs)[source]

Bases: Stage

Service to apply ultrasurface parameterisation stored in a feather file.

Parameters:
  • fit_results_file (str) – Path to .feather file containing all nominal events with gradients.

  • nominal_points (str or dict) – Dictionary (or str that can be evaluated thereto) of the form {‘parameter_name’: <nominal value>} containing the nominal value for each parameter that was used to fit the gradients with.

  • varnames (list of str) – List of variables to match the pisa events to the pre-fitted events.

  • approx_exponential (bool) – Approximate the exponential using exp(x) = 1 + x. This is appropriate when gradients have been fit with the purely linear hardmax activation function. (If you don’t know what that is, just leave it at False.)

  • support (str or dict) – Dictionary (or str that can be evaluated thereto) of the form {‘parameter_name’: (lower bound, upper bound)} containing the bounds of the parameter space inside which the gradients are valid. If a value outside of these bounds is requested, we have to extrapolate using the strategy defined in the extrapolation parameter.

  • extrapolation (str) – Strategy to use for extrapolating beyond the bounds set by the bounds option. Options are continue, linear and constant. If continue, polynomial features are simply extended at the risk of weights getting out of control. If linear, second order features are extrapolated using their derivative at the closest bound. If constant, the value at the closest boundary is returned.

  • params (ParamSet) – Note that the params required to be in params are determined from those listed in the systematics.

apply_function()[source]

Implement in services (subclasses of Stage)

compute_function()[source]

Implement in services (subclasses of Stage)

setup_function()[source]

Load the fit results from the file and make some compatibility checks

Module contents