Tapered Arrays

A TaperedArray is a light wrapper on a parent::AbstractArray that applies a windowing functions to the arrays edges to taper them down progressively.

TransferFunctions.TaperedArrayType
TaperedArray{T,N,AA,IA,A} <: AbstractArray{T,N}

An N-dimensional array with data of type T that has edges of the width .edges tapered with an ApodizationFunction.

It is a lazy light wrapper that only computes the tapering when indexed.

It should be constructed using taperedges.

source

A TaperedArray is useful for reducing the boundary effects in of the Fourier images of an array. It is desirable for making calculations in the Fourier domain to determine some value or a parameter.

Tip

When you want to pad the array for the purpose of filtering a BorderArray is relevant to you.

A_tapered_inner = taperedges(A, 30) # edges of size 30 are tapered
@assert size(A_tapered_inner) == size(A) # edges are not extended
A_tapered_padded = taperedges(A, 30, :replicate)
@assert size(A_tapered_padded) == size(A) .+ (60,60) # edges are extended at both sides

You can also select an apodization function to use for the tapering.

using TransferFunctions: Apodization as Apo
A_tapered_hann = taperedges(Apo.Hann(), A, 30)