datavects class#

class pycif.utils.classes.datavects.DataVect(plg_orig=None, orig_name='', **kwargs)[source]#

Bases: Plugin

Plugin type for data vectors.

Initialises the hierarchical component/parameter data structure shared by the control vector and the observation vector. Each component groups related tracers (e.g. fluxes, concs, inicond) and each parameter within a component refers to a specific species or sector.

Concrete implementations live in pycif/plugins/datavects/.

initiate_template()[source]#

Initialise the DataVect plugin template.

Loads the registered data-vector module and attaches all standard methods (state2inputs, outputs2state, control2native, native2control, sqrtbprod, sqrtbprod_ad, dump, load) as bound methods on this instance.

classmethod register_plugin(name, version, module, subtype='', **kwargs)[source]#

Register a module for a plugin and version with possibly options

Parameters:
  • name (str) – name of the plugin

  • version (str) – version of the plugin

  • module (types.ModuleType) – module defining the interface between pyCIF and the plugin

  • plugin_type (str) – type of plugin

  • **kwargs (dictionary) – default options for module