Patch

class pyhf.patchset.Patch(spec)[source]

Bases: jsonpatch.JsonPatch

A way to store a patch definition as part of a patchset (PatchSet).

It contains metadata about the Patch itself:

  • a descriptive name

  • a list of the values for each dimension in the phase-space the associated PatchSet is defined for, see labels

In addition to the above metadata, the Patch object behaves like the underlying jsonpatch.JsonPatch.

Attributes

metadata

The metadata of the patch

name

The name of the patch

values

The values of the associated labels for the patch

Methods

__init__(spec)[source]

Construct a Patch.

Parameters

spec (jsonable) – The patch JSON specification

Returns

The Patch instance.

Return type

patch (Patch)