Unit conversion (unit_conversion / std)


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


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: <class ‘float’>

Optional arguments

grid_to_surface: (optional): False

Scale grid values to area values

accepted type: <class ‘bool’>

Yaml template

Please find below a template for a Yaml configuration:

 2  plugin:
 3    name: unit_conversion
 4    version: std
 5    type: transform
 7  # Mandatory arguments
 8  scale: XXXXX
10  # Optional arguments
11  grid_to_surface: XXXXX