fields.mixins.components.FieldComponentCoreMixin.to_value#

FieldComponentCoreMixin.to_value(units: str | Unit, equivalence: str | None = None, **kwargs) ndarray[source]#

Return the buffer contents in the specified units, stripped of unit tags.

This is useful for exporting to numerical formats or plotting libraries that do not understand units.

Parameters:
  • units (str or unyt.Unit) – Target units to convert to.

  • equivalence (str, optional) – Unit conversion equivalence.

  • **kwargs – Forwarded to the unit conversion logic.

Returns:

The plain numerical array in the target units.

Return type:

numpy.ndarray