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: (mandatory)

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

accepted type: float

Optional arguments

parameter: (optional)

Parameter name on which the transform works on

accepted type: str

component: (optional)

Component name on which the transform works on

accepted type: str

orig_parameter_plg: (optional)

Plugin object on which the transform works on

accepted type: Plugin

orig_component_plg: (optional)

Corresponding component object on which the transform works on

accepted type: Plugin

successor: (optional)

Name of the successor transform

accepted type: str

precursor: (optional)

Name of the precursor transform

accepted type: str

grid_to_surface: (optional): False

Scale grid values to area values

accepted type: bool

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