openghg_inversions.hbmcmc.components#

Classes and functions to making self-contained parts of the RHIME model.

openghg_inversions.hbmcmc.components.make_offset(site_indicator: ndarray, prior_args: dict, name: str = 'offset', output_dim: str = 'nmeasure', drop_first: bool = False) TensorVariable#

Create an offset inside a PyMC model.

Note: this must be called from inside a PyMC model context.

Parameters:
  • site_indicator – array with same length as obs, with integers to indicator which site an observation belongs to

  • prior_args – dict of prior args for offset prior

  • name – name for offset in PyMC model

  • output_dim – name of dimension for output

  • drop_first – if True, set first site’s offset to zero

Returns:

TensorVariable containing offset vector (to add to modelled observations).