# Time averaging pro

This modifier can compute the mean value of one or more input quantities, averaged over the frames of the loaded simulation trajectory. The following kinds of input quantities are currently supported:

Attributes

  Global attributes are scalar variables associated with the dataset, which may vary with time. The modifier will compute the global mean value of the selected input attribute and output it as a new attribute, which does not change with time.

Data tables

  The modifier can compute the time-averaged versions of data tables. Data tables typically contain dynamically computed structural or statistical information such as a radial distribution function or histograms of some particle property. With the help of the time averaging modifier you can average such time-varying tables over the entire trajectory.

Properties

  The modifier also supports computing time averages of element-wise properties (e.g. particle or voxel grid properties). For the computation to work, the number of data elements (e.g. particles) must not change with time. Thus, you should place the time averaging modifier in the data pipeline before any filter operations that remove a variable number of particles from the system.

  Attention

  If you time-average the `Position` properties of particles in a system with periodic boundary conditions, make sure the particles are not wrapped back into the simulation box during the trajectory, i.e., the time averaging modifier requires unwrapped coordinates as input. You can use the Unwrap trajectories modifier to unwrap the particle coordinates first.

Simulation cell

  The modifier allows computing the time average of the cell shape (cell matrix elements).

Note that the modifier has to step through all frames of the simulation trajectory to compute the time average of the selected quantity. This can be a lengthy process depending on the extent of the trajectory and the dataset size. However, the averaging will happen in the background, and you can continue working with the program while the modifier is performing the calculation. Once the averaging calculation is completed, you can press the Show in data inspector button to reveal the computed average quantity in the data inspector of OVITO.

The averaged values are output as new quantities by default, with the suffix “Average” appended, to keep the original and averaged values separate. You can change that by selecting the option Replace original values, which lets the modifier overwrite the current time-dependent values with the static averaged values.

Caution

When averaging integer particle properties (e.g. particle types, coordination number, etc.) the result will be rounded to the nearest integer value if the Replace original values option is selected. This can lead to a loss of precision in the averaged values. If Create new values is selected, the averaged values will always be stored as floating-point properties with full precision.

See also

`ovito.modifiers.TimeAveragingModifier` (Python API)