Apply common reduction operations to properties in the DataCollection
Apply one of the following reduction operations to a selected property. If the property as multiple components, e.g. position, the reduction operation is applied for each component.
Operations:
- Mean
- Median
- Standard Deviation
- Variance
- Minimum
- Maximum
- Sum
- Non-zero
input_container
:ovito.data.DataObject.Ref
/ "Container": Container from which a property is selcted.input_property
:str
/ "Property": Property to which the reduction operation will be applied.operation
:str
/ "Operation": Reduction operation to apply to the selected property.only_selected
:bool
/ "Reduce only selected elements": Apply reduction operation only to selected entries in the property array. Requires the "Selection" property to be present in the container.
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/ReduceProperty
The
--user
option 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 (utt@ovito.org)