.. _auto_math_scale: *SCALE A NUMBER* ================ Multiplies a scalar number by a scale factor and returns the formatted result. Scaling can be applied unconditionally or gated by a comparison operator against a target value, making it useful for unit conversion, normalization, or conditional value transforms inside a workflow. When to use ----------- Classification: **process**. Tagged: ``conditional``, ``format``, ``math``, ``multiply``, ``scalar``, ``scale``, ``transform``, ``unit_conversion``. Inputs ------ .. list-table:: :header-rows: 1 :widths: 20 20 20 20 20 20 * - Label - ID - Type - Default - Required - Description * - Number - datatobescaled - scalar - 1 - ✓ - The numeric input value to be scaled (dimensionless scalar, default 1); when set to exactly 10 the Scale Value field is hidden and no scaling is applied. * - Scale Value - scale - float - 1 - ✓ - Multiplicative scale factor applied to the input number (float, default 1); hidden when the input value equals 10. * - Operator - operator - scalar - always - - Conditional operator that gates whether scaling is performed (options: always, eq, gt, gte, lt, contains, not_contains, between; default 'always' applies scaling unconditionally). * - Target Value - target_value - scalar - 0 - - Reference value used with the selected operator to decide whether to apply scaling (scalar, default 0; for 'between' supply two values separated by a colon, e.g. '2:4'). * - Format - format - scalar - %20.4f - - C-style printf format string controlling the output representation of the scaled number (string, default '%20.4f'; e.g. '%.2f' for two decimal places). * - Trim Spaces - trim - scalar - no - - Trim the value by removing spaces before and after the scaled value Outputs ------- .. list-table:: :header-rows: 1 :widths: 20 20 20 20 * - Label - ID - Type - Description * - math_scale_output_1 - math_scale_output_1 - scalar - The scaled (and conditionally formatted) numeric value returned as a string according to the specified format pattern. Disciplines ----------- - data.curve.transform - data.units Runnable example ---------------- A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: `/api/workflow/example?id=math_scale `_ .. raw:: html

Auto-generated from transformation schema. Worker id: math_scale. Schema hash: 2d43cb0a7318. Hand-curated docs in workerexamples/ override this page when present.