Apply common reduction operations to properties in the DataCollection
Apply one of the following reduction operations to a selected property. If the property has multiple components, e.g. position, the reduction operation is applied for each component.
Operations:
- Mean
- Median
- Standard Deviation
- Variance
- Minimum
- Maximum
- Sum
- Non-zero
| GUI name | Python name | Description | Default Value |
|---|---|---|---|
| Container | input_container |
Container from which a property is selected. | |
| Property | input_property |
Property to which the reduction operation will be applied. | |
| Operation | operation |
Reduction operation to apply to the selected property. | "Mean" |
| Reduce only selected elements | only_selected |
Apply reduction operation only to selected entries in the property array. Requires the "Selection" property to be present in the container. | False |
The output is stored in a global attribute under the <container>_<property>_<operation> key.
# Reduce Property:
pipeline.modifiers.append(
ReduceProperty(
input_container=DataObject.Ref(Particles, "particles"),
input_property="Velocity",
)
)-
OVITO Pro integrated Python interpreter:
ovitos -m pip install --user git+https://github.com/ovito-org/ReducePropertyThe
--useroption is recommended and installs the package in the user's site directory. -
Other Python interpreters or Conda environments:
pip install git+https://github.com/ovito-org/ReduceProperty
- Tested on OVITO version 3.11.0
- Daniel Utt ([email protected])
