Acoular 24.03 documentation

Trigger

«  MaskedTimeInOut   ::   tprocess   ::   AngleTracker  »

Trigger

class acoular.tprocess.Trigger

Bases: TimeInOut

Class for identifying trigger signals. Gets samples from source and stores the trigger samples in trigger_data().

The algorithm searches for peaks which are above/below a signed threshold. A estimate for approximative length of one revolution is found via the greatest number of samples between the adjacent peaks. The algorithm then defines hunks as percentages of the estimated length of one revolution. If there are multiple peaks within one hunk, the algorithm just takes one of them into account (e.g. the first peak, the peak with extremum value, …). In the end, the algorithm checks if the found peak locations result in rpm that don’t vary too much.

source = Instance(SamplesGenerator)

Data source; SamplesGenerator or derived object.

threshold = Float(None)

Threshold of trigger. Has different meanings for different trigger_type. The sign is relevant. If a sample of the signal is above/below the positive/negative threshold, it is assumed to be a peak. Default is None, in which case a first estimate is used: The threshold is assumed to be 75% of the max/min difference between all extremums and the mean value of the trigger signal. E.g: the mean value is 0 and there are positive extremums at 400 and negative extremums at -800. Then the estimated threshold would be 0.75 * -800 = -600.

max_variation_of_duration = Float(0.02)

Maximum allowable variation of length of each revolution duration. Default is 2%. A warning is thrown, if any revolution length surpasses this value: abs(durationEachRev - meanDuration) > 0.02 * meanDuration

hunk_length = Float(0.1)

Defines the length of hunks via lenHunk = hunk_length * maxOncePerRevDuration. If there are multiple peaks within lenHunk, then the algorithm will cancel all but one out (see multiple_peaks_in_hunk). Default is to 0.1.

trigger_type = Trait('dirac', 'rect')

Type of trigger.

‘dirac’: a single puls is assumed (sign of trigger_type is important). Sample will trigger if its value is above/below the pos/neg threshold.

‘rect’ : repeating rectangular functions. Only every second edge is assumed to be a trigger. The sign of trigger_type gives information on which edge should be used (+ for rising edge, - for falling edge). Sample will trigger if the difference between its value and its predecessors value is above/below the pos/neg threshold.

Default is ‘dirac’.

multiple_peaks_in_hunk = Trait('extremum', 'first')

Identifier which peak to consider, if there are multiple peaks in one hunk (see hunk_length). Default is to ‘extremum’, in which case the extremal peak (maximum if threshold > 0, minimum if threshold < 0) is considered.

trigger_data = Property(depends_on=['source.digest', 'threshold', 'max_variation_of_duration',\

Tuple consisting of 3 entries:

1.: -Vector with the sample indices of the 1/Rev trigger samples

2.: -maximum of number of samples between adjacent trigger samples

3.: -minimum of number of samples between adjacent trigger samples

«  MaskedTimeInOut   ::   tprocess   ::   AngleTracker  »