Unit conversion unit_conversion/std

Unit conversion unit_conversion/std#

Description#

The transform unit_conversion scales data depending on their unit or by simply giving a scaling factor.

Warning

At the moment, the automatic conversion of units is not implemented yet. Only scaling by a fixed factor is available.

YAML arguments#

The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:

Mandatory arguments#

scale : float, mandatory

Scale factor used to convert the original data onto the output unit.

Optional arguments#

parameter : str, optional

Parameter name on which the transform works on

component : str, optional

Component name on which the transform works on

orig_parameter_plg : Plugin, optional

Plugin object on which the transform works on

orig_component_plg : Plugin, optional

Corresponding component object on which the transform works on

successor : str, optional

Name of the successor transform

precursor : str, optional

Name of the precursor transform

grid_to_surface : bool, optional, default False

Scale grid values to area values

YAML template#

Please find below a template for a YAML configuration:

 1transform:
 2  plugin:
 3    name: unit_conversion
 4    version: std
 5    type: transform
 6
 7  # Mandatory arguments
 8  scale: XXXXX  # float
 9
10  # Optional arguments
11  parameter: XXXXX  # str
12  component: XXXXX  # str
13  orig_parameter_plg: XXXXX  # Plugin
14  orig_component_plg: XXXXX  # Plugin
15  successor: XXXXX  # str
16  precursor: XXXXX  # str
17  grid_to_surface: XXXXX  # bool