Fast AutoCorrelation SinkfacsinkGraphical Sinksfrom baz import facsinkfrom gnuradio import gr#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
facsink.$(type.fcn)(
$(parent).GetWin(),
title=$title,
sample_rate=$samp_rate,
baseband_freq=$baseband_freq,
y_per_div=$y_per_div,
ref_level=$ref_level,
fac_size=$fac_size,
fac_rate=$fac_rate,
average=$average,
avg_alpha=$avg_alpha,
peak_hold=$peak_hold,
#if $win_size()
size=$win_size,
#end if
)
#if not $grid_pos()
$(parent).Add(self.$(id).win)
#else
$(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
#end ifset_y_per_div($y_per_div)set_ref_level($ref_level)set_average($average)set_peak_hold($peak_hold)set_avg_alpha($avg_alpha)set_baseband_freq($baseband_freq)set_sample_rate($samp_rate)TitletitleFast AutoCorrelationstringTypetypecomplexenumSample Ratesamp_ratesamp_raterealBaseband Freqbaseband_freq0realSizefac_size512intRatefac_ratefacsink.default_fac_rateintY per Divy_per_div10enumRef Level (dB)ref_level50realPeak Holdpeak_holdFalseenum#if $peak_hold() == 'True' then 'none' else 'part'#AverageaverageFalseenumpartAverage Alphaavg_alpha0real#if $average() == 'True' then 'none' else 'all'#Window Sizewin_sizeint_vector#if $win_size() then 'none' else 'part'#Grid Positiongrid_posgrid_posNotebooknotebooknotebooknot $win_size or len($win_size) == 2$fac_size > 0$fac_rate >= 0in$type
'Size' is the length of the FFT window, and therefore the duration of the auto-correlation window.
'Rate' is the refresh rate of the graph on the screen.
This block can be quite computationally expensive, so take care with the above parameters (otherwise your application may stop responding to GUI input).
Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.