measurements class#
- class pycif.utils.classes.measurements.Measurement(plg_orig=None, orig_name='', **kwargs)[source]#
Bases:
PluginPlugin type for observation measurement parsers.
Reads and parses observation data into a pyCIF datastore for a given simulation period, iterating over tracers as needed.
Concrete implementations live in
pycif/plugins/measurements/.- initiate_template()[source]#
Initialise the Measurement plugin template.
Loads the registered measurement module and attaches
parse_tracersas a bound method 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
- ini_data(**kwargs)[source]#
Load measurement data for the simulation period.
Calls
parse_tracers()to read all tracers for the period[self.datei, self.datef]and stores the result inself.datastore.- Parameters:
**kwargs – Forwarded to
parse_tracers().
- parse_tracers(*args, **kwargs)[source]#
Parse observation tracers for a given time window.
Must be overridden by each concrete measurement plugin. Should return a pyCIF datastore (
pd.DataFrame) containing all observations for the requested period.- Raises:
PluginError – Always, in this default implementation.