obsoperators class#
- class pycif.utils.classes.obsoperators.ObsOperator(plg_orig=None, orig_name='', **kwargs)[source]#
Bases:
Plugin
- initiate_template()[source]#
Initializes a Plugin template, with methods from the corresponding module.
- Args:
self: the plugin to initialize plg_type: the type of the plugin to initialize default_functions (dict[str, bool]):
functions to load from the module and to attach to the plugin. Each key names the function and each value is a boolean to determine whether the corresponding function is a class method (with a reflective self as argument) or a classical static function
- obsoper(inputs, mode, run_id=0, datei=datetime.datetime(1979, 1, 1, 0, 0), datef=datetime.datetime(2100, 1, 1, 0, 0), workdir='./', **kwargs)[source]#
The observation operator. This function maps information from the control space to the observation space and conversely depending on the running mode.
- Args:
self (ObsOperator): the ObsOperator plugin inputs (Controlvect or Obsvect): the inputs of the fwd or adj mode mode (str): the running mode run_id (int): the ID of the current run (determines the sub-directory name datei (datetime.datetime): beginning of the simulation window datef (datetime.datetime): end of the simulation window workdir (str): path to the parent directory
- classmethod register_plugin(name, version, module, subtype='', **kwargs)[source]#
Register a module for a plugin and version with possibly options
- Args:
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