Skip to content

Commit

Permalink
composites: rename option window_type to window in several blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
vsergeev committed Jul 2, 2016
1 parent 2ba0040 commit c49c3db
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions radio/composites/decimator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
-- @tparam int decimation Downsampling factor M
-- @tparam[opt={}] table options Additional options, specifying:
-- * `num_taps` (int, default 128)
-- * `window_type` (string, default "hamming")
-- * `window` (string, default "hamming")
--
-- @signature in:ComplexFloat32 > out:ComplexFloat32
-- @signature in:Float32 > out:Float32
Expand All @@ -31,7 +31,7 @@ function DecimatorBlock:instantiate(decimation, options)
assert(decimation, "Missing argument #1 (decimation)")
options = options or {}

local filter = blocks.LowpassFilterBlock(options.num_taps or 128, 1/decimation, 1.0, options.window_type)
local filter = blocks.LowpassFilterBlock(options.num_taps or 128, 1/decimation, 1.0, options.window)
local downsampler = blocks.DownsamplerBlock(decimation)
self:connect(filter, downsampler)

Expand Down
4 changes: 2 additions & 2 deletions radio/composites/interpolator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-- @tparam int interpolation Upsampling factor L
-- @tparam[opt={}] table options Additional options, specifying:
-- * `num_taps` (int, default 128)
-- * `window_type` (string, default "hamming")
-- * `window` (string, default "hamming")
--
-- @signature in:ComplexFloat32 > out:ComplexFloat32
-- @signature in:Float32 > out:Float32
Expand All @@ -34,7 +34,7 @@ function InterpolatorBlock:instantiate(interpolation, options)

local scaler = blocks.MultiplyConstantBlock(interpolation)
local upsampler = blocks.UpsamplerBlock(interpolation)
local filter = blocks.LowpassFilterBlock(options.num_taps or 128, 1/interpolation, 1.0, options.window_type)
local filter = blocks.LowpassFilterBlock(options.num_taps or 128, 1/interpolation, 1.0, options.window)
self:connect(scaler, upsampler, filter)

self:add_type_signature({block.Input("in", types.ComplexFloat32)}, {block.Output("out", types.ComplexFloat32)})
Expand Down
4 changes: 2 additions & 2 deletions radio/composites/rationalresampler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-- @tparam int decimation Downsampling factor M
-- @tparam[opt={}] table options Additional options, specifying:
-- * `num_taps` (int, default 128)
-- * `window_type` (string, default "hamming")
-- * `window` (string, default "hamming")
--
-- @signature in:ComplexFloat32 > out:ComplexFloat32
-- @signature in:Float32 > out:Float32
Expand All @@ -37,7 +37,7 @@ function RationalResamplerBlock:instantiate(interpolation, decimation, options)

local scaler = blocks.MultiplyConstantBlock(interpolation)
local upsampler = blocks.UpsamplerBlock(interpolation)
local filter = blocks.LowpassFilterBlock(options.num_taps or 128, cutoff, 1.0, options.window_type)
local filter = blocks.LowpassFilterBlock(options.num_taps or 128, cutoff, 1.0, options.window)
local downsampler = blocks.DownsamplerBlock(decimation)
self:connect(scaler, upsampler, filter, downsampler)

Expand Down
4 changes: 2 additions & 2 deletions radio/composites/tuner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-- @tparam int decimation Downsampling factor M
-- @tparam[opt={}] table options Additional options, specifying:
-- * `num_taps` (int, default 128)
-- * `window_type` (string, default "hamming")
-- * `window` (string, default "hamming")
--
-- @signature in:ComplexFloat32 > out:ComplexFloat32
--
Expand All @@ -38,7 +38,7 @@ function TunerBlock:instantiate(offset, bandwidth, decimation, options)
options = options or {}

local translator = blocks.FrequencyTranslatorBlock(offset)
local filter = blocks.LowpassFilterBlock(options.num_taps or 128, bandwidth/2, nil, options.window_type)
local filter = blocks.LowpassFilterBlock(options.num_taps or 128, bandwidth/2, nil, options.window)
local downsampler = blocks.DownsamplerBlock(decimation)
self:connect(translator, filter, downsampler)

Expand Down

0 comments on commit c49c3db

Please sign in to comment.