gnuradio.blocks: Peak Detectors

gnuradio.blocks.peak_detector_fb(float threshold_factor_rise = 0.25, float threshold_factor_fall = 0.40, int look_ahead = 10, float alpha = 0.001) → sptr

Detect the peak of a signal.

If a peak is detected, this block outputs a 1, or it outputs 0’s.

Constructor Specific Documentation:

Make a peak detector block.

Parameters:
  • threshold_factor_rise – The threshold factor determins when a peak has started. An average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we start looking for a peak.
  • threshold_factor_fall – The threshold factor determins when a peak has ended. An average of the signal is calculated and when the value of the signal goes bellow threshold_factor_fall*average, we stop looking for a peak.
  • look_ahead – The look-ahead value is used when the threshold is found to look if there another peak within this step range. If there is a larger value, we set that as the peak and look ahead again. This is continued until the highest point is found with This look-ahead range.
  • alpha – The gain value of a moving average filter
peak_detector_fb_sptr.active_thread_priority(self) → int
peak_detector_fb_sptr.alpha(self) → float

Get the alpha value of the running average.

peak_detector_fb_sptr.look_ahead(self) → int

Get the look-ahead factor value.

peak_detector_fb_sptr.set_alpha(self, int alpha)

Set the running average alpha.

peak_detector_fb_sptr.set_look_ahead(self, int look)

Set the look-ahead factor.

peak_detector_fb_sptr.set_thread_priority(self, int priority) → int
peak_detector_fb_sptr.set_threshold_factor_fall(self, float thr)

Set the threshold factor value for the fall time.

peak_detector_fb_sptr.set_threshold_factor_rise(self, float thr)

Set the threshold factor value for the rise time.

peak_detector_fb_sptr.thread_priority(self) → int
peak_detector_fb_sptr.threshold_factor_fall(self) → float

Get the threshold factor value for the fall time.

peak_detector_fb_sptr.threshold_factor_rise(self) → float

Get the threshold factor value for the rise time.

gnuradio.blocks.peak_detector_ib(float threshold_factor_rise = 0.25, float threshold_factor_fall = 0.40, int look_ahead = 10, float alpha = 0.001) → sptr

Detect the peak of a signal.

If a peak is detected, this block outputs a 1, or it outputs 0’s.

Constructor Specific Documentation:

Make a peak detector block.

Parameters:
  • threshold_factor_rise – The threshold factor determins when a peak has started. An average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we start looking for a peak.
  • threshold_factor_fall – The threshold factor determins when a peak has ended. An average of the signal is calculated and when the value of the signal goes bellow threshold_factor_fall*average, we stop looking for a peak.
  • look_ahead – The look-ahead value is used when the threshold is found to look if there another peak within this step range. If there is a larger value, we set that as the peak and look ahead again. This is continued until the highest point is found with This look-ahead range.
  • alpha – The gain value of a moving average filter
peak_detector_ib_sptr.active_thread_priority(self) → int
peak_detector_ib_sptr.alpha(self) → float

Get the alpha value of the running average.

peak_detector_ib_sptr.look_ahead(self) → int

Get the look-ahead factor value.

peak_detector_ib_sptr.set_alpha(self, int alpha)

Set the running average alpha.

peak_detector_ib_sptr.set_look_ahead(self, int look)

Set the look-ahead factor.

peak_detector_ib_sptr.set_thread_priority(self, int priority) → int
peak_detector_ib_sptr.set_threshold_factor_fall(self, float thr)

Set the threshold factor value for the fall time.

peak_detector_ib_sptr.set_threshold_factor_rise(self, float thr)

Set the threshold factor value for the rise time.

peak_detector_ib_sptr.thread_priority(self) → int
peak_detector_ib_sptr.threshold_factor_fall(self) → float

Get the threshold factor value for the fall time.

peak_detector_ib_sptr.threshold_factor_rise(self) → float

Get the threshold factor value for the rise time.

gnuradio.blocks.peak_detector_sb(float threshold_factor_rise = 0.25, float threshold_factor_fall = 0.40, int look_ahead = 10, float alpha = 0.001) → sptr

Detect the peak of a signal.

If a peak is detected, this block outputs a 1, or it outputs 0’s.

Constructor Specific Documentation:

Make a peak detector block.

Parameters:
  • threshold_factor_rise – The threshold factor determins when a peak has started. An average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we start looking for a peak.
  • threshold_factor_fall – The threshold factor determins when a peak has ended. An average of the signal is calculated and when the value of the signal goes bellow threshold_factor_fall*average, we stop looking for a peak.
  • look_ahead – The look-ahead value is used when the threshold is found to look if there another peak within this step range. If there is a larger value, we set that as the peak and look ahead again. This is continued until the highest point is found with This look-ahead range.
  • alpha – The gain value of a moving average filter
peak_detector_sb_sptr.active_thread_priority(self) → int
peak_detector_sb_sptr.alpha(self) → float

Get the alpha value of the running average.

peak_detector_sb_sptr.look_ahead(self) → int

Get the look-ahead factor value.

peak_detector_sb_sptr.set_alpha(self, int alpha)

Set the running average alpha.

peak_detector_sb_sptr.set_look_ahead(self, int look)

Set the look-ahead factor.

peak_detector_sb_sptr.set_thread_priority(self, int priority) → int
peak_detector_sb_sptr.set_threshold_factor_fall(self, float thr)

Set the threshold factor value for the fall time.

peak_detector_sb_sptr.set_threshold_factor_rise(self, float thr)

Set the threshold factor value for the rise time.

peak_detector_sb_sptr.thread_priority(self) → int
peak_detector_sb_sptr.threshold_factor_fall(self) → float

Get the threshold factor value for the fall time.

peak_detector_sb_sptr.threshold_factor_rise(self) → float

Get the threshold factor value for the rise time.

gnuradio.blocks.burst_tagger(size_t itemsize) → sptr

Sets a burst on/off tag based on the value of the trigger input.

This block takes two inputs, a signal stream on the input stream 0 and a trigger stream of shorts on input stream 1. If the trigger stream goes above 0, a tag with the key “burst” will be transmitted as a pmt::PMT_T. When the trigger signal falls below 0, the “burst” tag will be transmitted as pmt::PMT_F.

The signal on stream 0 is retransmitted to output stream 0.

Constructor Specific Documentation:

Build a burst tagger gnuradio/blocks.

Parameters:itemsize – itemsize of the signal stream on input 0.
burst_tagger_sptr.active_thread_priority(self) → int
burst_tagger_sptr.set_false_tag(self, string key, bool value)

For the false burst tag, change the key name to and a new value of .

burst_tagger_sptr.set_thread_priority(self, int priority) → int
burst_tagger_sptr.set_true_tag(self, string key, bool value)

For the true burst tag, change the key name to and a new value of .

burst_tagger_sptr.thread_priority(self) → int
gnuradio.blocks.peak_detector2_fb(float threshold_factor_rise = 7, int look_ahead = 1000, float alpha = 0.001) → sptr

Detect the peak of a signal.

If a peak is detected, this block outputs a 1, or it outputs 0’s. A separate debug output may be connected, to view the internal EWMA described below.

Constructor Specific Documentation:

Build a peak detector block with float in, byte out.

Parameters:
  • threshold_factor_rise – The threshold factor determins when a peak is present. An EWMA average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we call the peak.
  • look_ahead – The look-ahead value is used when the threshold is found to locate the peak within this range.
  • alpha – The gain value of a single-pole moving average filter.
peak_detector2_fb_sptr.active_thread_priority(self) → int
peak_detector2_fb_sptr.alpha(self) → float

Get the alpha value of the running average.

peak_detector2_fb_sptr.look_ahead(self) → int

Get the look-ahead factor value.

peak_detector2_fb_sptr.set_alpha(self, int alpha)

Set the running average alpha.

peak_detector2_fb_sptr.set_look_ahead(self, int look)

Set the look-ahead factor.

peak_detector2_fb_sptr.set_thread_priority(self, int priority) → int
peak_detector2_fb_sptr.set_threshold_factor_rise(self, float thr)

Set the threshold factor value for the rise time.

peak_detector2_fb_sptr.thread_priority(self) → int
peak_detector2_fb_sptr.threshold_factor_rise(self) → float

Get the threshold factor value for the rise time.

gnuradio.blocks.plateau_detector_fb(int max_len, float threshold = 0.9) → sptr

Detects a plateau and marks the middle.

Detect a plateau of a-priori known height. Input is a stream of floats, the output is a stream of bytes. Whenever a plateau is detected, the middle of that plateau is marked with a ‘1’ on the output stream (all other samples are left at zero).

You can use this in a Schmidl & Cox synchronisation algorithm to interpret the output of the normalized correlator. Just pass the length of the cyclic prefix (in samples) as the max_len parameter).

Unlike the peak detectors, you must the now the absolute height of the plateau. Whenever the amplitude exceeds the given threshold, it starts assuming the presence of a plateau.

An implicit hysteresis is provided by the fact that after detecting one plateau, it waits at least max_len samples before the next plateau can be detected.

Constructor Specific Documentation:

Parameters:
  • max_len – Maximum length of the plateau
  • threshold – Anything above this value is considered a plateau
plateau_detector_fb_sptr.active_thread_priority(self) → int
plateau_detector_fb_sptr.set_thread_priority(self, int priority) → int
plateau_detector_fb_sptr.thread_priority(self) → int

Previous topic

gnuradio.blocks: Boolean Operators

Next topic

gnuradio.blocks: Byte Operators

This Page