SCALE THE Y-VALUES BASED ON CONDITIONS OF THE X VALUE¶
Scales the y-values of a curve selectively, applying a multiplicative scale factor only to points where the x-value satisfies a specified condition (lt, lte, eq, gte, gt) against a target x-value. Use this worker when you need to modify a subset of curve y-values based on an x-domain condition rather than scaling the entire curve uniformly.
When to use¶
Classification: process.
Tagged: conditional, curve, filter, scale, transform, x-condition, y-scale.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Curve To Be Scaled | curvetobescaled | vector | — | Input curve (x/y vector pair) whose y-values will be conditionally scaled; accepts any unitless or engineering-unit curve. | |
| Y Scale Value | y_scalevalue | scalar | 1 | Multiplicative scale factor applied to y-values at points that satisfy the x condition; dimensionless scalar, default 1 (no scaling). | |
| Condition For X | conditionfor_x | scalar | eq | Comparison operator used to test each x-value against the target: ‘lt’ (<), ‘lte’ (≤), ‘eq’ (=), ‘gte’ (≥), or ‘gt’ (>); default is ‘eq’. | |
| Target Value For X | target_valuefor_x | scalar | 0 | Reference x-value against which the condition is evaluated; y-values at matching x-points are scaled by y_scalevalue; default is 0. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| curve_scaley_by_conditionx_output_1 | curve_scaley_by_conditionx_output_1 | vector | Output curve identical to the input except that y-values at x-points satisfying the condition have been multiplied by the specified scale factor. |
Disciplines¶
- data.curve.transform
Runnable example¶
A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=curve_scaley_by_conditionx
Auto-generated from transformation schema. Worker id: curve_scaley_by_conditionx. Schema hash: a59af75fb507. Hand-curated docs in workerexamples/ override this page when present.