AngleTracker#
- class acoular.tprocess.AngleTracker(*args, **kwargs)
Bases:
MaskedTimeOutCompute the rotational angle and RPM per sample from a trigger signal in the time domain.
Deprecated since version :class:`AngleTracker`: is deprecated and will be removed in version 27.01.
This class retrieves samples from the specified
triggersignal and interpolates angular position and rotational speed. The results are stored in the propertiesangleandrpm.The algorithm assumes a periodic trigger signal marking rotational events (e.g., a tachometer pulse or an encoder signal) and interpolates the angle and RPM using cubic splines. It is capable of handling different rotational directions and numbers of triggers per revolution.
- trigger
Trigger data source, expected to be an instance of
Trigger.
- digest
A unique identifier for the tracker, based on its properties. (read-only)
- trigger_per_revo
Number of trigger signals per revolution. This allows tracking scenarios where multiple trigger pulses occur per rotation. Default is
1, meaning a single trigger per revolution.
- rot_direction
Rotation direction flag:
1: counter-clockwise rotation.-1: clockwise rotation.
Default is
-1.
- interp_points
Number of points used for spline interpolation. Default is
4.
- start_angle
Initial rotation angle (in radians) corresponding to the first trigger event. This allows defining a custom starting reference angle. Default is
0.
- rpm
Revolutions per minute (RPM) computed for each sample. It is based on the trigger data. (read-only)
- average_rpm
Average revolutions per minute over the entire dataset. It is computed based on the trigger intervals. (read-only)
- angle
Computed rotation angle (in radians) for each sample. It is interpolated from the trigger data. (read-only)
- result(num)
Generate blocks of processed data, selecting only valid samples and channels.
This method fetches data from the
sourceobject, applies the definedstartandstopconstraints on time samples, and filters outinvalid_channels. The data is then yielded in block-wise fashion to facilitate efficient streaming.- Parameters:
- num
int Number of samples per block.
- num
- Yields:
numpy.ndarrayAn array of shape (
num,MaskedTimeOut.num_channels), contatining blocks of a filtered time-domain signal. The last block may contain fewer samples if the total number of samples is not a multiple ofnum. MaskedTimeOut.num_channels is not inherited directly and may be smaller than thesourceβs number of channels.
- Raises:
- source
The input data source. It must be an instance of a
SamplesGenerator-derived class. This object provides the raw time-domain signals that will be filtered based on thestart,stop, andinvalid_channelsattributes.
- start
The index of the first valid sample. Default is
0.
- stop
The index of the last valid sample (exclusive). If set to
None, the selection continues until the end of the available data.
- invalid_channels
List of channel indices to be excluded from processing.
- channels
A mask or index array representing valid channels. (automatically updated)
- num_channels_total
Total number of input channels, including invalid channels, as given by
source. (read-only).
- num_samples_total
Total number of input channels, including invalid channels. (read-only).
- num_channels
Number of valid input channels after excluding
invalid_channels. (read-only)
- basename
The name of the cache file (without extension). It serves as an internal reference for data caching and tracking processed files. (automatically generated)
- sample_freq
Sampling frequency of output signal, as given by
source.