Skip to main content

Documentation for ScryLab v0.7.1

Changelogs

Fit & Trend

You wantUse
a number from a known shape: mean, slope, coefficientsPolynomial Fit (Regression)
a smooth curve through scattered data, without assuming a shapeSmooth Trend (LOWESS)
the plain average per class of x, without smoothingBinned Average
a map of a value over two signalsBinned Average 2D
one point per measurement, connected into a curveAverage per Signal

Average per Signal

One point per signal: the mean (or median) of its x and y – e.g. the yaw gain of every oscillation at 60, 100 and 140 km/h becomes three points, connected into a curve. For a characteristic curve from one cloud over x use Binned Average.

Creates one new signal from any number of signals.

SettingDescriptionDefault
Statisticmean: average per signal. median: middle value per signal – robust against outliers.mean · median
Outputpoints: all points of all signals as one cloud. curve: one point per signal, connected over x. lower_bound / upper_bound: the limits of its band (see Band).points · curve · lower_bound · upper_bound

More under Advanced: Band, Band level (%).

When to use it

Use it when every measurement holds many values at one test point: a value per cycle at several loads, or a gain per oscillation at several speeds. Each signal becomes one point at the mean of its x and y, and the points are connected in the order of x. There are no classes to choose, and uneven test points are fine.

  • Several short measurements of the same test point each give their own point. Join them first if they belong together.
  • If x changes within a measurement, as in a ramp or a run-up, use Binned Average instead.

The band

lower_bound and upper_bound are the limits of a band around the curve. Band selects its meaning: confidence is where the true mean lies, prediction is where a single new point would land.

Binned Average

Splits the x-range into equally wide classes and returns the mean (or median) y per class – a characteristic curve from scattered data, or block means over time. Nothing is fitted or smoothed. Empty classes stay a gap or are left out.

Added as a step to the workflow of the signal it is applied to.

SettingDescriptionDefault
ClassesNumber of equally wide x-classes over the data range. Ignored when a class width is set.20 (1–100000)
Class widthWidth of each x-class in x-units (e.g. 100 for 100-rpm classes). Classes then start at multiples of the width. Empty = use ‘Classes’.–
Statisticmean: average per class. median: middle value per class – robust against outliers.mean · median
Outputcurve: the mean (or median) per class. lower_bound / upper_bound: the limits of its band (see Band) – plot them next to the curve.curve · lower_bound · upper_bound

More under Advanced: Class center, Empty classes, Band, Band level (%).

Choosing the classes

Give either the number of Classes over the data range, or a Class width in units of the x-axis. With a width, the classes start at multiples of it. Class center shifts them so that a class sits around a given value: width 40 and center 60 gives classes around 60, 100 and 140, which fits test speeds.

Empty classes decides what happens to a class without data. gap is right when data is missing. drop is right for test points such as speeds, where an empty class only means that this speed was not driven; the curve then connects the classes that have data.

The band

The outputs lower_bound and upper_bound give the limits of a band around the curve. Band selects its meaning: confidence is where the true mean of the class lies, prediction is where a single new point would land. Plot the limits next to the curve.

Good to know

  • The x-values may repeat, as in a cloud of torque over speed. The result is one value per class and has no time axis any more.
  • For a smooth trend use Smooth Trend (LOWESS), for the distribution of the values Histogram.

Binned Average 2D

A map of a value over two signals: the mean (or median) per cell of an x-y grid – e.g. efficiency over motor speed and torque – or count, how many samples lie in each cell. Shown as a color image; cells without data stay empty.

Creates a new signal from: X, Y, Value (optional).

SettingDescriptionDefault
Statisticmean / median of the value per cell, or count: how many samples lie in each cell (where the data really is).mean · median · count
X classesNumber of equally wide classes along x. Ignored when an x class width is set.20 (1–2000)
Y classesNumber of equally wide classes along y. Ignored when a y class width is set.20 (1–2000)
X class widthWidth of each x-class (e.g. 500 for 500-rpm classes). Empty = use ‘X classes’.–
Y class widthWidth of each y-class (e.g. 10 for 10-Nm classes). Empty = use ‘Y classes’.–

More under Advanced: Min. samples per cell.

Reading the result

The result is a map: classes of the first signal on x, classes of the second on y, and the mean or median of the value signal as color. A typical case is an efficiency map: the efficiency from a Formula (Expression) as value over speed and torque.

With the statistic count no value signal is needed. The map then shows how many samples fall into each cell, which is the distribution of the operating points.

Good to know

Cells without data stay empty, and so do cells with fewer samples than Min. samples per cell. Nothing is interpolated between cells.

Polynomial Fit (Regression)

Fits a polynomial through the data: degree 0 is the mean line, degree 1 a linear regression, higher degrees a polynomial – the result is a few coefficients, e.g. the slope. Use it when you want a number from a known shape, not a curve that follows the data.

Added as a step to the workflow of the signal it is applied to.

SettingDescriptionDefault
Polynomial Degree0 = horizontal mean line, 1 = linear regression, 2+ = polynomial fit.1 (0–20)
Outputcurve: the fitted polynomial. lower_bound / upper_bound: the limits of its band (see Band) – plot them next to the curve.curve · lower_bound · upper_bound

More under Advanced: Band, Band level (%).

Good to know

  • The fit uses the valid samples only and is then drawn over the whole x-axis. The result is a model of the data.
  • Keep the degree low. A high degree follows the noise and swings at the ends. Never read the curve outside the range of the data.
  • It is one fit over the whole signal. For a trend that bends along x use Smooth Trend (LOWESS).
  • lower_bound and upper_bound are the limits of a band around the fit. Band selects its meaning: confidence is where the true curve lies, prediction is where a single new point would land.

Smooth Trend (LOWESS)

Fits a smooth trend curve through scattered or noisy data without assuming a shape. Smoothing sets how much of the data each local fit uses. It yields a curve, not coefficients; for the gradient of a characteristic curve, apply Derivative to the result.

Added as a step to the workflow of the signal it is applied to.

SettingDescriptionDefault
SmoothingShare of the data each local fit uses (0.3 = the nearest 30 %). Larger → smoother, smaller → follows local shape more closely.0.3 (0.01–1)

More under Advanced: Points.

Choosing the smoothing

SmoothingEffect
0.1 to 0.2follows the local shape
0.3a trend (default)
0.6 and morevery smooth

Good to know

  • The curve is evaluated at evenly spaced x-positions (Points). At each one a line is fitted through the nearest samples, with more weight on the close ones. That keeps the curve unbiased at the ends and where the data is unevenly dense.
  • The x-values may repeat, as in a cloud of torque over speed. The result has no time axis any more.
  • For the gradient of a characteristic curve, apply Derivative to the result. A small smoothing window there removes the remaining ripple.
  • For one trend with coefficients use Polynomial Fit (Regression). To smooth a signal over time, Lowpass Filter is the right tool.