GammaGammaModelIndividual.load_from_idata#

classmethod GammaGammaModelIndividual.load_from_idata(idata, check=True)[source]#

Create a ModelBuilder instance from a DataTree object.

This class method has a few steps:

  • Construct a new instance of the model using the DataTree attrs

  • Build the model from the DataTree

  • Check if the model id matches the id in the DataTree loaded.

Parameters:
idataxr.DataTree

The DataTree object to load the model from.

checkbool, optional

Whether to check if the model id matches the id in the DataTree loaded. Defaults to True.

Returns:
ModelBuilder

An instance of the ModelBuilder class.

Raises:
DifferentModelError

If the model id in the DataTree does not match the model id built.