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) → peak_detector_fb_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(peak_detector_fb_sptr self) → int
peak_detector_fb_sptr.alpha(peak_detector_fb_sptr self) → float

Get the alpha value of the running average.

peak_detector_fb_sptr.declare_sample_delay(peak_detector_fb_sptr self, int which, int delay)

declare_sample_delay(peak_detector_fb_sptr self, unsigned int delay)

peak_detector_fb_sptr.look_ahead(peak_detector_fb_sptr self) → int

Get the look-ahead factor value.

peak_detector_fb_sptr.message_subscribers(peak_detector_fb_sptr self, swig_int_ptr which_port) → swig_int_ptr
peak_detector_fb_sptr.min_noutput_items(peak_detector_fb_sptr self) → int
peak_detector_fb_sptr.pc_input_buffers_full_avg(peak_detector_fb_sptr self, int which) → float

pc_input_buffers_full_avg(peak_detector_fb_sptr self) -> pmt_vector_float

peak_detector_fb_sptr.pc_noutput_items_avg(peak_detector_fb_sptr self) → float
peak_detector_fb_sptr.pc_nproduced_avg(peak_detector_fb_sptr self) → float
peak_detector_fb_sptr.pc_output_buffers_full_avg(peak_detector_fb_sptr self, int which) → float

pc_output_buffers_full_avg(peak_detector_fb_sptr self) -> pmt_vector_float

peak_detector_fb_sptr.pc_throughput_avg(peak_detector_fb_sptr self) → float
peak_detector_fb_sptr.pc_work_time_avg(peak_detector_fb_sptr self) → float
peak_detector_fb_sptr.pc_work_time_total(peak_detector_fb_sptr self) → float
peak_detector_fb_sptr.sample_delay(peak_detector_fb_sptr self, int which) → unsigned int
peak_detector_fb_sptr.set_alpha(peak_detector_fb_sptr self, float alpha)

Set the running average alpha.

peak_detector_fb_sptr.set_look_ahead(peak_detector_fb_sptr self, int look)

Set the look-ahead factor.

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

Set the threshold factor value for the fall time.

peak_detector_fb_sptr.set_threshold_factor_rise(peak_detector_fb_sptr self, float thr)

Set the threshold factor value for the rise time.

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

Get the threshold factor value for the fall time.

peak_detector_fb_sptr.threshold_factor_rise(peak_detector_fb_sptr 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) → peak_detector_ib_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(peak_detector_ib_sptr self) → int
peak_detector_ib_sptr.alpha(peak_detector_ib_sptr self) → float

Get the alpha value of the running average.

peak_detector_ib_sptr.declare_sample_delay(peak_detector_ib_sptr self, int which, int delay)

declare_sample_delay(peak_detector_ib_sptr self, unsigned int delay)

peak_detector_ib_sptr.look_ahead(peak_detector_ib_sptr self) → int

Get the look-ahead factor value.

peak_detector_ib_sptr.message_subscribers(peak_detector_ib_sptr self, swig_int_ptr which_port) → swig_int_ptr
peak_detector_ib_sptr.min_noutput_items(peak_detector_ib_sptr self) → int
peak_detector_ib_sptr.pc_input_buffers_full_avg(peak_detector_ib_sptr self, int which) → float

pc_input_buffers_full_avg(peak_detector_ib_sptr self) -> pmt_vector_float

peak_detector_ib_sptr.pc_noutput_items_avg(peak_detector_ib_sptr self) → float
peak_detector_ib_sptr.pc_nproduced_avg(peak_detector_ib_sptr self) → float
peak_detector_ib_sptr.pc_output_buffers_full_avg(peak_detector_ib_sptr self, int which) → float

pc_output_buffers_full_avg(peak_detector_ib_sptr self) -> pmt_vector_float

peak_detector_ib_sptr.pc_throughput_avg(peak_detector_ib_sptr self) → float
peak_detector_ib_sptr.pc_work_time_avg(peak_detector_ib_sptr self) → float
peak_detector_ib_sptr.pc_work_time_total(peak_detector_ib_sptr self) → float
peak_detector_ib_sptr.sample_delay(peak_detector_ib_sptr self, int which) → unsigned int
peak_detector_ib_sptr.set_alpha(peak_detector_ib_sptr self, float alpha)

Set the running average alpha.

peak_detector_ib_sptr.set_look_ahead(peak_detector_ib_sptr self, int look)

Set the look-ahead factor.

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

Set the threshold factor value for the fall time.

peak_detector_ib_sptr.set_threshold_factor_rise(peak_detector_ib_sptr self, float thr)

Set the threshold factor value for the rise time.

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

Get the threshold factor value for the fall time.

peak_detector_ib_sptr.threshold_factor_rise(peak_detector_ib_sptr 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) → peak_detector_sb_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(peak_detector_sb_sptr self) → int
peak_detector_sb_sptr.alpha(peak_detector_sb_sptr self) → float

Get the alpha value of the running average.

peak_detector_sb_sptr.declare_sample_delay(peak_detector_sb_sptr self, int which, int delay)

declare_sample_delay(peak_detector_sb_sptr self, unsigned int delay)

peak_detector_sb_sptr.look_ahead(peak_detector_sb_sptr self) → int

Get the look-ahead factor value.

peak_detector_sb_sptr.message_subscribers(peak_detector_sb_sptr self, swig_int_ptr which_port) → swig_int_ptr
peak_detector_sb_sptr.min_noutput_items(peak_detector_sb_sptr self) → int
peak_detector_sb_sptr.pc_input_buffers_full_avg(peak_detector_sb_sptr self, int which) → float

pc_input_buffers_full_avg(peak_detector_sb_sptr self) -> pmt_vector_float

peak_detector_sb_sptr.pc_noutput_items_avg(peak_detector_sb_sptr self) → float
peak_detector_sb_sptr.pc_nproduced_avg(peak_detector_sb_sptr self) → float
peak_detector_sb_sptr.pc_output_buffers_full_avg(peak_detector_sb_sptr self, int which) → float

pc_output_buffers_full_avg(peak_detector_sb_sptr self) -> pmt_vector_float

peak_detector_sb_sptr.pc_throughput_avg(peak_detector_sb_sptr self) → float
peak_detector_sb_sptr.pc_work_time_avg(peak_detector_sb_sptr self) → float
peak_detector_sb_sptr.pc_work_time_total(peak_detector_sb_sptr self) → float
peak_detector_sb_sptr.sample_delay(peak_detector_sb_sptr self, int which) → unsigned int
peak_detector_sb_sptr.set_alpha(peak_detector_sb_sptr self, float alpha)

Set the running average alpha.

peak_detector_sb_sptr.set_look_ahead(peak_detector_sb_sptr self, int look)

Set the look-ahead factor.

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

Set the threshold factor value for the fall time.

peak_detector_sb_sptr.set_threshold_factor_rise(peak_detector_sb_sptr self, float thr)

Set the threshold factor value for the rise time.

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

Get the threshold factor value for the fall time.

peak_detector_sb_sptr.threshold_factor_rise(peak_detector_sb_sptr self) → float

Get the threshold factor value for the rise time.

gnuradio.blocks.burst_tagger(size_t itemsize) → burst_tagger_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(burst_tagger_sptr self) → int
burst_tagger_sptr.declare_sample_delay(burst_tagger_sptr self, int which, int delay)

declare_sample_delay(burst_tagger_sptr self, unsigned int delay)

burst_tagger_sptr.message_subscribers(burst_tagger_sptr self, swig_int_ptr which_port) → swig_int_ptr
burst_tagger_sptr.min_noutput_items(burst_tagger_sptr self) → int
burst_tagger_sptr.pc_input_buffers_full_avg(burst_tagger_sptr self, int which) → float

pc_input_buffers_full_avg(burst_tagger_sptr self) -> pmt_vector_float

burst_tagger_sptr.pc_noutput_items_avg(burst_tagger_sptr self) → float
burst_tagger_sptr.pc_nproduced_avg(burst_tagger_sptr self) → float
burst_tagger_sptr.pc_output_buffers_full_avg(burst_tagger_sptr self, int which) → float

pc_output_buffers_full_avg(burst_tagger_sptr self) -> pmt_vector_float

burst_tagger_sptr.pc_throughput_avg(burst_tagger_sptr self) → float
burst_tagger_sptr.pc_work_time_avg(burst_tagger_sptr self) → float
burst_tagger_sptr.pc_work_time_total(burst_tagger_sptr self) → float
burst_tagger_sptr.sample_delay(burst_tagger_sptr self, int which) → unsigned int
burst_tagger_sptr.set_false_tag(burst_tagger_sptr self, std::string const & key, bool value)

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

burst_tagger_sptr.set_min_noutput_items(burst_tagger_sptr self, int m)
burst_tagger_sptr.set_thread_priority(burst_tagger_sptr self, int priority) → int
burst_tagger_sptr.set_true_tag(burst_tagger_sptr self, std::string const & key, bool value)

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

burst_tagger_sptr.thread_priority(burst_tagger_sptr self) → int
gnuradio.blocks.peak_detector2_fb(float threshold_factor_rise=7, int look_ahead=1000, float alpha=0.001) → peak_detector2_fb_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(peak_detector2_fb_sptr self) → int
peak_detector2_fb_sptr.alpha(peak_detector2_fb_sptr self) → float

Get the alpha value of the running average.

peak_detector2_fb_sptr.declare_sample_delay(peak_detector2_fb_sptr self, int which, int delay)

declare_sample_delay(peak_detector2_fb_sptr self, unsigned int delay)

peak_detector2_fb_sptr.look_ahead(peak_detector2_fb_sptr self) → int

Get the look-ahead factor value.

peak_detector2_fb_sptr.message_subscribers(peak_detector2_fb_sptr self, swig_int_ptr which_port) → swig_int_ptr
peak_detector2_fb_sptr.min_noutput_items(peak_detector2_fb_sptr self) → int
peak_detector2_fb_sptr.pc_input_buffers_full_avg(peak_detector2_fb_sptr self, int which) → float

pc_input_buffers_full_avg(peak_detector2_fb_sptr self) -> pmt_vector_float

peak_detector2_fb_sptr.pc_noutput_items_avg(peak_detector2_fb_sptr self) → float
peak_detector2_fb_sptr.pc_nproduced_avg(peak_detector2_fb_sptr self) → float
peak_detector2_fb_sptr.pc_output_buffers_full_avg(peak_detector2_fb_sptr self, int which) → float

pc_output_buffers_full_avg(peak_detector2_fb_sptr self) -> pmt_vector_float

peak_detector2_fb_sptr.pc_throughput_avg(peak_detector2_fb_sptr self) → float
peak_detector2_fb_sptr.pc_work_time_avg(peak_detector2_fb_sptr self) → float
peak_detector2_fb_sptr.pc_work_time_total(peak_detector2_fb_sptr self) → float
peak_detector2_fb_sptr.sample_delay(peak_detector2_fb_sptr self, int which) → unsigned int
peak_detector2_fb_sptr.set_alpha(peak_detector2_fb_sptr self, float alpha)

Set the running average alpha.

peak_detector2_fb_sptr.set_look_ahead(peak_detector2_fb_sptr self, int look)

Set the look-ahead factor.

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

Set the threshold factor value for the rise time.

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

Get the threshold factor value for the rise time.

gnuradio.blocks.plateau_detector_fb(int max_len, float threshold=0.9) → plateau_detector_fb_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(plateau_detector_fb_sptr self) → int
plateau_detector_fb_sptr.declare_sample_delay(plateau_detector_fb_sptr self, int which, int delay)

declare_sample_delay(plateau_detector_fb_sptr self, unsigned int delay)

plateau_detector_fb_sptr.message_subscribers(plateau_detector_fb_sptr self, swig_int_ptr which_port) → swig_int_ptr
plateau_detector_fb_sptr.min_noutput_items(plateau_detector_fb_sptr self) → int
plateau_detector_fb_sptr.pc_input_buffers_full_avg(plateau_detector_fb_sptr self, int which) → float

pc_input_buffers_full_avg(plateau_detector_fb_sptr self) -> pmt_vector_float

plateau_detector_fb_sptr.pc_noutput_items_avg(plateau_detector_fb_sptr self) → float
plateau_detector_fb_sptr.pc_nproduced_avg(plateau_detector_fb_sptr self) → float
plateau_detector_fb_sptr.pc_output_buffers_full_avg(plateau_detector_fb_sptr self, int which) → float

pc_output_buffers_full_avg(plateau_detector_fb_sptr self) -> pmt_vector_float

plateau_detector_fb_sptr.pc_throughput_avg(plateau_detector_fb_sptr self) → float
plateau_detector_fb_sptr.pc_work_time_avg(plateau_detector_fb_sptr self) → float
plateau_detector_fb_sptr.pc_work_time_total(plateau_detector_fb_sptr self) → float
plateau_detector_fb_sptr.sample_delay(plateau_detector_fb_sptr self, int which) → unsigned int
plateau_detector_fb_sptr.set_min_noutput_items(plateau_detector_fb_sptr self, int m)
plateau_detector_fb_sptr.set_thread_priority(plateau_detector_fb_sptr self, int priority) → int
plateau_detector_fb_sptr.thread_priority(plateau_detector_fb_sptr self) → int

Previous topic

gnuradio.blocks: Boolean Operators

Next topic

gnuradio.blocks: Byte Operators

This Page