perun.io.util ============= .. py:module:: perun.io.util .. autoapi-nested-parse:: IO Util. Functions --------- .. autoapisummary:: perun.io.util.getTFactorMag perun.io.util.value2ValueUnitStr perun.io.util.value2MeanStdStr Module Contents --------------- .. py:function:: getTFactorMag(value: perun.data_model.measurement_type.Number, metric_md: perun.data_model.measurement_type.MetricMetaData) -> Tuple[float, perun.data_model.measurement_type.Magnitude] Get transformation factor and magnitude to improve string formating. :param value: Reference value :type value: Number :param metric_md: Value description :type metric_md: MetricMetaData :returns: Scaling factor and Magnitude Enum :rtype: Tuple[float, Magnitude] .. py:function:: value2ValueUnitStr(value: perun.data_model.measurement_type.Number, metric_md: perun.data_model.measurement_type.MetricMetaData) -> str Return a printable representation as [Value:.3f][mag][unit] (e.g. 3.05mV) of the value based on its metric metadata. :param value: Value to apply formating to. :type value: Number :param metric_md: Value metadata. :type metric_md: MetricMetaData :returns: String represenation :rtype: str .. py:function:: value2MeanStdStr(stats: perun.data_model.data.Stats) -> str Return a printable representation as [Value:.3f]±[std:.3f][mag][unit] (e.g. 3.05±0.1mV) of the value based on its metric metadata. :param stats: Stats to apply formating to. :type stats: Stats obj :param metric_md: Value metadata. :type metric_md: MetricMetaData :returns: String represenation :rtype: str