Skip to content

Adding LTTB downsampling and PVXS for Normative Types PVs

Joao Paulo Martins requested to merge ntpv into main

This contribution presents a initial version of a down-sampling feature using LTTB (Largest Triangle Three Buckets). It is way to reduce the size of arrays while keeping its visual aspect and is intended only for display (OPIs) purposes.

The implementation is done using an aSub record that reads the input array/waveform, processes the data using the LTTB algorithm and publishes the result in a Normative Types PV of NTScalarArray type. This PV has additional fields for the X axis, the sampling rate, the original size and the reduced size, all packed in one NT structure. The result waveform can easily be plotted in Phoebus with the X-axis representing the time domain.

Merge request reports