Skip to main content

Documentation for ScryLab v0.7.1

Changelogs

Statistics

Average of Signals

Combines several signals into one mean curve over their common x-range – the average across runs or repeats. Signals are aligned to the densest grid; XY plots are resampled and sorted first. Outliers show up as runs that deviate from the mean.

Creates one new signal from any number of signals.

More under Advanced: NaN handling.

Cross-Correlation

Correlation coefficient (−1 … 1) of two signals over their time shift. The peak position is the delay of B relative to A – CAN vs. analog sensor, sound travel time, dead time. The same signal twice gives the autocorrelation and reveals periodicity in noise.

Creates a new signal from: Signal A, Signal B. Needs a time axis.

SettingDescriptionDefault
Max lagShow lags only within ± this value. Empty = all possible lags.–

Reading the result

The x-axis is the time shift in seconds, the y-axis the correlation coefficient. The delay between the signals is the position of the highest peak. A positive shift means that signal B lags behind signal A.

With the same signal in both inputs you get the autocorrelation. The first side peak is the period of a repeating pattern, even when it is buried in noise.

Good to know

Both signals are brought onto one evenly spaced grid over the time they share, and their mean is removed. Gaps are not bridged and contribute nothing.

Curve Metric

One value from a curve y(x), e.g. a frequency response: y at an x (phase at 1 Hz), where y crosses a level (bandwidth at −3 dB), or the maximum and where it lies (natural frequency). Valid where restricts it to the reliable part of the curve.

Creates a new signal from: Curve, Valid where (optional), Over (optional).

SettingDescriptionDefault
Metricy_at_x: y at the x-value ‘At’ (phase at 1 Hz). x_at_y: first x (from low x) where y crosses ‘At’ (bandwidth at −3 dB). first_valid: y at the lowest valid x (steady-state gain). peak_ratio: maximum divided by first_valid (resonance overshoot). line_offset: y of the fitted line at the x-value ‘At’ (torque the ramp’s line points to at 0 m/s²). The others as in the Metrics panel – e.g. slope (gradient), max, peak_x (where the peak lies: natural frequency).y_at_x · x_at_y · first_valid · peak_ratio · line_offset · count · dominant_frequency · energy_bandwidth · integral · max · max_x · mean · median · min · min_x · peak · peak_to_peak · peak_x · rms · slope · spectral_centroid · std · thd
Aty_at_x / line_offset: the x-value, x_at_y: the y-value to read at. Not used by the other metrics.1
x fromOptional: only the part of the curve from this x-value – e.g. a gradient between 0.5 and 4 m/s². Empty = from the start.–
x toOptional: only up to this x-value. Empty = to the end.–
Valid fromLower limit for ‘Valid where’ – e.g. coherence 0.8.0.8

What can be read

Besides the read-offs listed under Metric, every metric from the Metrics section of the right sidebar is available: slope for a gradient, peak_x for the natural frequency, max, rms and so on.

  • x from and x to limit the part of the curve that is used, for example a gradient between 0.5 and 4 m/s².
  • Valid where together with Valid from uses only the samples where a second signal reaches a threshold. The typical case is the coherence of a Transfer Function with a threshold of 0.8, so that nothing is read where the estimate is not reliable.

Comparing measurements

The result is a single point. Without Over it lies at the x where it was read. With Over, for example the vehicle or shaft speed, it lies over the mean of that signal. That is what you need to summarize the same value from several measurements with Average per Signal.

Hysteresis Metric

One value per oscillation, or one for the whole loop, of a hysteresis loop y over x: width, height, center gradient or a read-off. Typical use: friction and stiffness from torque over angle. With Over (e.g. speed) each value is placed over that signal.

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

SettingDescriptionDefault
Metricwidth: x-distance of the two branches at the y-value ‘Level’ (HB). height: y-distance of the branches at the x-value ‘Level’ (HH). center_gradient: slope of y over x around the center (CG). y_at_x: y at the x-value ‘Level’ (YV). x_at_y: x at the y-value ‘Level’ (XV) – both on the chosen Branch.width · height · center_gradient · y_at_x · x_at_y
LevelThe y-value (width, x_at_y) or x-value (height, y_at_x) where the metric is read – e.g. 0 Nm or 1 m/s². Not used by center_gradient.0
Branchy_at_x / x_at_y: rising = while x increases (the upper branch of a friction loop, e.g. pressing a pedal), falling = while x decreases, both = mean of the two (the characteristic without friction).both · rising · falling
Peroscillation: one value per oscillation (repeated loops, e.g. weave). whole_signal: one value for the whole loop – e.g. a single ramp up and down on a test bench; a gap (Cycles) starts a new loop.oscillation · whole_signal
Center range (%)center_gradient: the slope is fitted within ± this share of the oscillation’s x-amplitude around the center.20

More under Advanced: Center.

Reading the result

  • width and height are positive when y is higher while x increases, as in a friction loop. A loop that runs the other way gives negative values.
  • With Per set to oscillation, a new oscillation starts each time x passes upwards through the center (0 unless you change Center, for example 50 for an actuator that runs from 0 to 100 %). If a Cycles signal is connected, its gap-free sections define the oscillations instead.
  • Lowpass both signals before, otherwise noise widens the loop.

Comparing measurements

Without Over the values lie over time, which shows a drift during a run. With Over, for example the speed, each value lies over the mean of that signal in its oscillation. That is what you need to summarize several measurements with Average per Signal.

Segment Metric

One value per segment (cycle, lap) of a segment signal, e.g. from Counter from Trigger: mean, min, max, peak-to-peak, RMS, slope, duration or a formula. hold keeps the value over each segment on the time axis, points gives one point per segment.

Creates a new signal from: Signals, Segment Signal.

SettingDescriptionDefault
MetricValue computed per segment from the first signal. slope = least-squares slope over x (one signal) or of the second signal over the first (two). duration = segment length in x-units. expression = evaluate the formula below per segment.count · dominant_frequency · energy_bandwidth · integral · max · max_x · mean · median · min · min_x · peak · peak_to_peak · peak_x · rms · slope · spectral_centroid · std · thd · duration · expression
FormulaOnly with metric ‘expression’: a formula over the samples of ONE segment that reduces to a single number. Variables s1, s2, … (y), s1_x, … (x), index; functions as in Formula (Expression).–
Outputhold: the value is held over each segment on the original x-axis (for criteria and masks). points: one point per segment at its center (for XY plots and statistics over segments).hold · points

More under Advanced: Skip first and last segment.

The segment signal

A segment signal is a staircase: every run of equal values is one segment, NaN means no segment. Counter from Trigger builds one from an oscillating signal (threshold 0, rising edge: one segment per oscillation), Segments from GPS from a lap, Create Mask from a condition.

Good to know

  • Missing samples are ignored. A signal that was masked before contributes only the samples that were kept.
  • slope with one signal is its gradient over x. With two signals it is the slope of the second over the first, for example a gain from two channels.
  • hold is meant for criteria: compare the held value with a limit in a Formula (Expression) and use the result as a mask.
  • points is meant for statistics over cycles: plot two per-segment values against each other with XY Plot (Y over X), or summarize them with Binned Average.
  • Skip first and last segment drops the two incomplete cycles at the edges of a counter.