From ec340f8b8c63c01d046744d5c92f8c96ef64637b Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Tue, 23 Apr 2024 15:40:30 +0000 Subject: [PATCH] build based on a8bdc58 --- dev/distance/index.html | 20 ++++++++++---------- dev/index.html | 10 +++++----- dev/misc/index.html | 16 ++++++++-------- dev/search/index.html | 2 +- dev/window/index.html | 24 ++++++++++++------------ 5 files changed, 36 insertions(+), 36 deletions(-) diff --git a/dev/distance/index.html b/dev/distance/index.html index 28dba75..2806d19 100644 --- a/dev/distance/index.html +++ b/dev/distance/index.html @@ -1,5 +1,5 @@ -Distance Functions · IndexFunArrays.jl

Concrete IndexFunArrays

Scaling Types

Needed to change the scaling:

IndexFunArrays.ScaType
Sca

Abstract type to indicate a scaling from which several other types subtype.

Possible subtypes

  • ScaUnit: No scaling of the indices
  • ScaNorm: Total length along each dimension is normalized to 1
  • ScaMid: Reaches 1.0 at the borders, if used in combination with CtrMid. Useful for keeping real-space symmetry.
  • ScaFT: Reciprocal Fourier coordinates compared to Nyquist sampling
  • ScaFTEdge: Such that the edge (in FFT sense) of the pixel is 1.0
source

Offset Types

Needed to change the reference offset:

IndexFunArrays.CtrType
Ctr

Abstract type to specify the reference position from which several other types subtype.

Possible subtypes

  • CtrCorner: Set the reference pixel in the corner
  • CtrFFT: Set the reference pixel to the FFT center.
  • CtrFT: Set the reference pixel to the FT center. FT means that the zero frequency is at the FFT convention center (size ÷ 2 + 1).
  • CtrRFFT: Set the reference pixel to the RFFT center. Same as CtrFFT but the first dimension has center at 1.
  • CtrRFT: Set the reference pixel to the RFT center. FT means that the zero frequency is at the FFT convention center (size ÷ 2 + 1). Same as CtrFT but the first dimension has center at 1.
  • CtrMid: Set the reference pixel to real mid. For uneven arrays it is the center pixel, for even arrays it is the centered around a half pixel.
  • CtrEnd Set the reference to the end corner (last pixel)
source

Distance Functions

Some concrete arrays:

IndexFunArrays.rr2Function
rr2([T=Float64], size::NTuple{N, Int};
+Distance Functions · IndexFunArrays.jl

Concrete IndexFunArrays

Scaling Types

Needed to change the scaling:

IndexFunArrays.ScaType
Sca

Abstract type to indicate a scaling from which several other types subtype.

Possible subtypes

  • ScaUnit: No scaling of the indices
  • ScaNorm: Total length along each dimension is normalized to 1
  • ScaMid: Reaches 1.0 at the borders, if used in combination with CtrMid. Useful for keeping real-space symmetry.
  • ScaFT: Reciprocal Fourier coordinates compared to Nyquist sampling
  • ScaFTEdge: Such that the edge (in FFT sense) of the pixel is 1.0
source

Offset Types

Needed to change the reference offset:

IndexFunArrays.CtrType
Ctr

Abstract type to specify the reference position from which several other types subtype.

Possible subtypes

  • CtrCorner: Set the reference pixel in the corner
  • CtrFFT: Set the reference pixel to the FFT center.
  • CtrFT: Set the reference pixel to the FT center. FT means that the zero frequency is at the FFT convention center (size ÷ 2 + 1).
  • CtrRFFT: Set the reference pixel to the RFFT center. Same as CtrFFT but the first dimension has center at 1.
  • CtrRFT: Set the reference pixel to the RFT center. FT means that the zero frequency is at the FFT convention center (size ÷ 2 + 1). Same as CtrFT but the first dimension has center at 1.
  • CtrMid: Set the reference pixel to real mid. For uneven arrays it is the center pixel, for even arrays it is the centered around a half pixel.
  • CtrEnd Set the reference to the end corner (last pixel)
source

Distance Functions

Some concrete arrays:

IndexFunArrays.rr2Function
rr2([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit,
@@ -82,7 +82,7 @@
   9.0  4.0  1.0  0.0  1.0  4.0
  10.0  5.0  2.0  1.0  2.0  5.0
  13.0  8.0  5.0  4.0  5.0  8.0

Similarly you can also use dimensions 2 and 3 yielding an array of size(y) == (1,6,5). Note that the necessary modification to the Base.size function is currently provided by this package.

Using List-Mode Arguments

The code below generates 160 Voronoi cells at random positions. The accumulator was set to mimimum yielding in each pixel the square distance to the closest Voronoi center. See gaussian for another example of using list-mode arguments.

julia> y = rr2((1000,1000),offset = (1000.0,1000.0) .* rand(2,160), accumulator=minimum);
-

rr2(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for rr2(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.rrFunction
rr([T=Float64], size::NTuple{N, Int};
+

rr2(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for rr2(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.rrFunction
rr([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit,
@@ -97,7 +97,7 @@
 3×3 IndexFunArray{Float64, 2, IndexFunArrays.var"#9#10"{Float64, Tuple{Float64, Float64}, Tuple{Int64, Int64}}}:
  0.0  1.0      2.0
  1.0  1.41421  2.23607
- 2.0  2.23607  2.82843

rr(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for rr(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.xxFunction
xx([T=Float64], size::NTuple{N, Int};
+ 2.0  2.23607  2.82843

rr(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for rr(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.xxFunction
xx([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit,
@@ -107,7 +107,7 @@
  -2.0  -2.0  -2.0  -2.0
  -1.0  -1.0  -1.0  -1.0
   0.0   0.0   0.0   0.0
-  1.0   1.0   1.0   1.0

xx(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for xx(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.yyFunction
yy([T=Float64], size::NTuple{N, Int};
+  1.0   1.0   1.0   1.0

xx(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for xx(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.yyFunction
yy([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit,
@@ -117,7 +117,7 @@
  -2.0  -1.0  0.0  1.0
  -2.0  -1.0  0.0  1.0
  -2.0  -1.0  0.0  1.0
- -2.0  -1.0  0.0  1.0

yy(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for yy(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.zzFunction
zz([T=Float64], size::NTuple{N, Int};
+ -2.0  -1.0  0.0  1.0

yy(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for yy(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.zzFunction
zz([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit,
@@ -134,7 +134,7 @@
  0.0
 
 [:, :, 4] =
- 1.0

zz(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for zz(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.phiphiFunction
phiphi([T=Float64], size::NTuple{N, Int};
+ 1.0

zz(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for zz(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.phiphiFunction
phiphi([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit,
@@ -145,7 +145,7 @@
  -2.03444   -2.35619   3.14159  2.35619   2.03444
  -1.5708    -1.5708    0.0      1.5708    1.5708
  -1.10715   -0.785398  0.0      0.785398  1.10715
- -0.785398  -0.463648  0.0      0.463648  0.785398

phiphi(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for phiphi(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.ttFunction
tt([T=Float64], size::NTuple{N, Int};
+ -0.785398  -0.463648  0.0      0.463648  0.785398

phiphi(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for phiphi(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.ttFunction
tt([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit,
@@ -162,7 +162,7 @@
  0.0
 
 [:, :, 1, 1, 4] =
- 1.0

tt(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for tt(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.eeFunction
ee([T=Float64], size::NTuple{N, Int};
+ 1.0

tt(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for tt(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.eeFunction
ee([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit,
@@ -179,7 +179,7 @@
  0.0
 
 [:, :, 1, 4] =
- 1.0

ee(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for ee(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.rampFunction
ramp(::Type{T}, dim::Int, dim_size::Int;
+ 1.0

ee(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for ee(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.rampFunction
ramp(::Type{T}, dim::Int, dim_size::Int;
     offset=CtrFT, scale=ScaUnit,
     weight=1,
     accumulator=sum) where {T}

Generates a dim-dimensional ramp of size dim_size to be used for broadcasting through multidimensional expressions. dim highest dimension of the oriented array to be generated. This is also the ramp direction. dim_size size along this dimension.

For details about offset and scale and dims see rr2.

julia> ramp(Float32, 1, 7; offset=(2,))
@@ -190,4 +190,4 @@
   2
   3
   4
-  5

ramp(dim::Int, dim_size::Int; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for ramp(Float64, dim::Int, dim_size::Int; offset=CtrFt, scaling=ScaUnit).

source
+ 5

ramp(dim::Int, dim_size::Int; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for ramp(Float64, dim::Int, dim_size::Int; offset=CtrFt, scaling=ScaUnit).

source
diff --git a/dev/index.html b/dev/index.html index a05aece..5d0c188 100644 --- a/dev/index.html +++ b/dev/index.html @@ -15,7 +15,7 @@ 3×3 IndexFunArray{Tuple{Int64, Int64, String}, 2, var"#18#19"}: (1, 1, "Julia") (1, 2, "Julia") (1, 3, "Julia") (2, 1, "Julia") (2, 2, "Julia") (2, 3, "Julia") - (3, 1, "Julia") (3, 2, "Julia") (3, 3, "Julia")source

Indices with certain type

IndexFunArrays.idxFunction
idx([T=Float64], size::NTuple{N, Int};
+ (3, 1, "Julia")  (3, 2, "Julia")  (3, 3, "Julia")
source

Indices with certain type

IndexFunArrays.idxFunction
idx([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit)

See rr2 for a description of all options.

Returns basically the CartesianIndices but as a tuple and accounting for optional scale, offset and data type. Note that T is enforced element-wise for the return tuple elements.

julia> idx(Int, (3,3), offset=CtrCorner)
@@ -34,7 +34,7 @@
 3×3 IndexFunArray{Tuple{Float32, Float32}, 2, IndexFunArrays.var"#39#40"{Float32, Tuple{Int64, Int64}, Tuple{Int64, Int64}}}:
  (1.0, 1.0)  (1.0, 2.0)  (1.0, 3.0)
  (2.0, 1.0)  (2.0, 2.0)  (2.0, 3.0)
- (3.0, 1.0)  (3.0, 2.0)  (3.0, 3.0)
source
IndexFunArrays.cpxFunction
cpx([T=Float64], size::NTuple{N, Int};
+ (3.0, 1.0)  (3.0, 2.0)  (3.0, 3.0)
source
IndexFunArrays.cpxFunction
cpx([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit)

See rr2 for a description of all options.

Returns an IndexFunArray where each positon corresponds to a complex value according to its position. The parameters offset and scale can be used accordingly (see rr2). Note that T is enforced element-wise for the return tuple elements.

julia> cpx(Int, (3,3), offset=CtrCorner)
@@ -53,7 +53,7 @@
 3×3 Matrix{ComplexF64}:
  1.0+1.0im  1.0+2.0im  1.0+3.0im
  2.0+1.0im  2.0+2.0im  2.0+3.0im
- 3.0+1.0im  3.0+2.0im  3.0+3.0im
source

Helpful Array Functions

In addition to normal size one can imagine a selectsizes which returns the sizes of several dimensions simultaneously.

IndexFunArrays.selectsizesFunction
selectsizes(x::AbstractArray, dim; keep_dims=true)

Additional size method to access the size at several dimensions in one call. keep_dims allows to return the other dimensions as singletons.

Examples

julia> x = ones((2,4,6,8, 10));
+ 3.0+1.0im  3.0+2.0im  3.0+3.0im
source

Helpful Array Functions

In addition to normal size one can imagine a selectsizes which returns the sizes of several dimensions simultaneously.

IndexFunArrays.selectsizesFunction
selectsizes(x::AbstractArray, dim; keep_dims=true)

Additional size method to access the size at several dimensions in one call. keep_dims allows to return the other dimensions as singletons.

Examples

julia> x = ones((2,4,6,8, 10));
 
 julia> selectsizes(x, (2,3))
 (1, 4, 6, 1, 1)
@@ -68,11 +68,11 @@
 (4, 6, 8)
 
 julia> selectsizes(x, (4,3,2), keep_dims=false)
-(8, 6, 4)
source
IndexFunArrays.single_dim_sizeFunction
single_dim_size(dim::Int,dim_size::Int)

Returns a tuple (length dim) of singleton sizes except at the final position dim, which contains dim_size

Example

julia> IndexFunArrays.single_dim_size(4, 3)
+(8, 6, 4)
source
IndexFunArrays.single_dim_sizeFunction
single_dim_size(dim::Int,dim_size::Int)

Returns a tuple (length dim) of singleton sizes except at the final position dim, which contains dim_size

Example

julia> IndexFunArrays.single_dim_size(4, 3)
 (1, 1, 1, 3)
 
 julia> IndexFunArrays.single_dim_size(4, 5)
 (1, 1, 1, 5)
 
 julia> IndexFunArrays.single_dim_size(2, 5)
-(1, 5)
source
+(1, 5)source diff --git a/dev/misc/index.html b/dev/misc/index.html index ad078b8..8f790c2 100644 --- a/dev/misc/index.html +++ b/dev/misc/index.html @@ -19,7 +19,7 @@ 1.000000010701151 julia> sum(normal((55,55), sigma=(5.0,2.0))) -0.9999999639340563

normal(arr::AbstractArray; offset=CtrFt, sigma=1.0, scaling=ScaUnit)

This is a wrapper for normal(eltype(arr), size(arr), sigma=sigma, scaling=scaling, offset=offset).

source
IndexFunArrays.gaussianFunction
gaussian([T=Float64], size::NTuple{N, Int};
+0.9999999639340563

normal(arr::AbstractArray; offset=CtrFt, sigma=1.0, scaling=ScaUnit)

This is a wrapper for normal(eltype(arr), size(arr), sigma=sigma, scaling=scaling, offset=offset).

source
IndexFunArrays.gaussianFunction
gaussian([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     sigma=1.0,
     dims=ntuple(+, N),
@@ -51,7 +51,7 @@
    0.000335463  0.000203468  4.53999f-5  3.72665f-6  1.12535f-7
 
 julia> y = gaussian((100,100),offset = (100,100) .* rand(2,60), weight=rand(60), sigma=2.0 .*(0.3 .+rand(2,60)));
-

gaussian(arr::AbstractArray; offset=CtrFt, sigma=1.0, scaling=ScaUnit)

This is a wrapper for gaussian(eltype(arr), size(arr), sigma=sigma, scaling=scaling, offset=offset).

source
IndexFunArrays.discFunction
disc([::Type{T}], size::NTuple, disc_radius; offset=CtrFT, scale=ScaFTEdge, dims=ntuple(+, N))

A multidimensional disc (i.e. a disk in 2D and a filled sphere in 3D), being one inside and zero outside. disc_radius defines the radius of the disc. The default result datatype is Float64. An alternative to generating a disc would be the edge-window.

julia> disc((10,10),(3,5))
+

gaussian(arr::AbstractArray; offset=CtrFt, sigma=1.0, scaling=ScaUnit)

This is a wrapper for gaussian(eltype(arr), size(arr), sigma=sigma, scaling=scaling, offset=offset).

source
IndexFunArrays.discFunction
disc([::Type{T}], size::NTuple, disc_radius; offset=CtrFT, scale=ScaFTEdge, dims=ntuple(+, N))

A multidimensional disc (i.e. a disk in 2D and a filled sphere in 3D), being one inside and zero outside. disc_radius defines the radius of the disc. The default result datatype is Float64. An alternative to generating a disc would be the edge-window.

julia> disc((10,10),(3,5))
 10×10 IndexFunArray{Float64, 2, IndexFunArrays.var"#g#194"{Float64, Tuple{Int64, Int64}, Tuple{Float64, Float64}, Int64}}:
  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
@@ -76,13 +76,13 @@
  0.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
  0.0  1.0  1.0  1.0  1.0  1.0  1.0  1.0
  0.0  0.0  1.0  1.0  1.0  1.0  1.0  0.0
- 0.0  0.0  0.0  1.0  1.0  1.0  0.0  0.0

disc(arr::AbstractArray, disc_radius; offset=CtrFT, scale=ScaUnit, dims=ntuple(+, N))

This is a wrapper for disc(eltype(arr), size(arr), disc_radius; scaling=scaling, offset=offset).

source
IndexFunArrays.idx_maxFunction

idx_max([T=Float64], size::NTuple{N, Int}; offset=CtrFT, dims=ntuple(+, N), scale=ScaUnit, weight=1, accumulator=sum)

returns the maximum of the absolute value of all index dimensions, after offset and scaling was applied. In combination with a comparison operation a box-shaped aperture is easily obtained. See below. See rr2 for a description of all options.

julia> idx_max((5,5)) .< 2
+ 0.0  0.0  0.0  1.0  1.0  1.0  0.0  0.0

disc(arr::AbstractArray, disc_radius; offset=CtrFT, scale=ScaUnit, dims=ntuple(+, N))

This is a wrapper for disc(eltype(arr), size(arr), disc_radius; scaling=scaling, offset=offset).

source
IndexFunArrays.idx_maxFunction

idx_max([T=Float64], size::NTuple{N, Int}; offset=CtrFT, dims=ntuple(+, N), scale=ScaUnit, weight=1, accumulator=sum)

returns the maximum of the absolute value of all index dimensions, after offset and scaling was applied. In combination with a comparison operation a box-shaped aperture is easily obtained. See below. See rr2 for a description of all options.

julia> idx_max((5,5)) .< 2
 5×5 BitMatrix:
  0  0  0  0  0
  0  1  1  1  0
  0  1  1  1  0
  0  1  1  1  0
- 0  0  0  0  0

idx_max(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for idx_max(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.boxFunction
box([::Type{T}], size::NTuple, boxsize=size./2; offset=CtrFT, scale=ScaFTEdge, dims=ntuple(+, N))

A multidimensional box, being one inside and zero outside. boxsize defines the outer dimensions of the box. To obtain box sizes for integer pixels that correspond to the Fourier-space centers both for the array and the box, an additional offset of 0.25 pixels is automatically applied and box pixels are one if less or equal to half the boxsize along this dimension.

julia> box((10,10),(3,6))
+ 0  0  0  0  0

idx_max(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for idx_max(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.boxFunction
box([::Type{T}], size::NTuple, boxsize=size./2; offset=CtrFT, scale=ScaFTEdge, dims=ntuple(+, N))

A multidimensional box, being one inside and zero outside. boxsize defines the outer dimensions of the box. To obtain box sizes for integer pixels that correspond to the Fourier-space centers both for the array and the box, an additional offset of 0.25 pixels is automatically applied and box pixels are one if less or equal to half the boxsize along this dimension.

julia> box((10,10),(3,6))
 10×10 IndexFunArray{Float64, 2, IndexFunArrays.var"#g#182"{Float64, Tuple{Float64, Float64}, Tuple{Float64, Float64}, Int64}}:
  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
@@ -103,7 +103,7 @@
   0.0  0.0  1.0  1.0  1.0  1.0  0.0  0.0
   0.0  0.0  1.0  1.0  1.0  1.0  0.0  0.0
   0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
-  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0

box(arr::AbstractArray, boxsize; offset=CtrFT, scale=ScaUnit, dims=ntuple(+, N))

This is a wrapper for box(eltype(arr), size(arr), boxsize; scaling=scaling, offset=offset).

source
IndexFunArrays.exp_ikxFunction
exp_ikx([T=Float64], size::NTuple{N, Int};
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0

box(arr::AbstractArray, boxsize; offset=CtrFT, scale=ScaUnit, dims=ntuple(+, N))

This is a wrapper for box(eltype(arr), size(arr), boxsize; scaling=scaling, offset=offset).

source
IndexFunArrays.exp_ikxFunction
exp_ikx([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     shift_by=size.÷2
     dims=ntuple(+, N),
@@ -124,13 +124,13 @@
  2.23607   1.0          1.41421
 
  julia> using FourierTools; y = real(ift(exp_ikx((101,101),weight=rand(60), shift_by=101.0 .*rand(2,60))));
-

exp_ikx(arr::AbstractArray; offset=CtrFt, shift_by==size(arr).÷2, scaling=ScaUnit)

This is a wrapper for exp_ikx(eltype(arr), size(arr), shift_by=shift_by, scaling=scaling, offset=offset).

source
IndexFunArrays.idx_minFunction

idx_min([T=Float64], size::NTuple{N, Int}; offset=CtrFT, dims=ntuple(+, N), scale=ScaUnit, weight=1, accumulator=sum)

returns the minimum of the absolute value of all index dimensions, after offset and scaling was applied. In combination with a comparison operation a cross-shaped aperture is easily obtained. See below. See rr2 for a description of all options.

julia> idx_min((5,5)) .< 1
+

exp_ikx(arr::AbstractArray; offset=CtrFt, shift_by==size(arr).÷2, scaling=ScaUnit)

This is a wrapper for exp_ikx(eltype(arr), size(arr), shift_by=shift_by, scaling=scaling, offset=offset).

source
IndexFunArrays.idx_minFunction

idx_min([T=Float64], size::NTuple{N, Int}; offset=CtrFT, dims=ntuple(+, N), scale=ScaUnit, weight=1, accumulator=sum)

returns the minimum of the absolute value of all index dimensions, after offset and scaling was applied. In combination with a comparison operation a cross-shaped aperture is easily obtained. See below. See rr2 for a description of all options.

julia> idx_min((5,5)) .< 1
 5×5 BitMatrix:
  0  0  1  0  0
  0  0  1  0  0
  1  1  1  1  1
  0  0  1  0  0
- 0  0  1  0  0

idx_min(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for idx_min(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.deltaFunction
delta([T=Float64], size::NTuple{N, Int};
+ 0  0  1  0  0

idx_min(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for idx_min(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
IndexFunArrays.deltaFunction
delta([T=Float64], size::NTuple{N, Int};
     offset=CtrFT,
     dims=ntuple(+, N),
     scale=ScaUnit,
@@ -159,4 +159,4 @@
   0.0  0.0  0.0  0.0  0.0
   0.0  0.0  0.0  0.0  0.0
   0.0  0.0  0.0  0.0  0.0
-  

delta(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for delta(eltype(arr), size(arr), scaling=scaling, offset=offset).

source
+
delta(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit)

This is a wrapper for delta(eltype(arr), size(arr), scaling=scaling, offset=offset).

source diff --git a/dev/search/index.html b/dev/search/index.html index b83b860..465955e 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · IndexFunArrays.jl

Loading search...

    +Search · IndexFunArrays.jl

    Loading search...

      diff --git a/dev/window/index.html b/dev/window/index.html index abf0b47..8a01c9b 100644 --- a/dev/window/index.html +++ b/dev/window/index.html @@ -6,23 +6,23 @@ 0.0 0.292893 0.5 0.292893 0.0 0.0 0.5 1.0 0.5 0.0 0.0 0.292893 0.5 0.292893 0.0
      window_radial_linear(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit,
      -                     border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_linear(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_hanningFunction
      window_hanning([T=Float64], size::NTuple; 
      +                     border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_linear(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_hanningFunction
      window_hanning([T=Float64], size::NTuple; 
                          offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional (separable) window with a von Hann transition between the borders (border_out) to one (border_in). See ?window_linear for more details on the arguments.


      window_hanning(arr::AbstractArray;
      -                   offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_hanning(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_hammingFunction
      window_radial_hamming([T=Float64], size::NTuple; 
      +                   offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_hanning(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_hammingFunction
      window_radial_hamming([T=Float64], size::NTuple; 
                             offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional radial window with a Hamming transition between the borders (border_out) to one (border_in). Note that border_in and border_out need to be scalar values for radial type windows. The elypticity can be adjusted via the scale parameter. See ?window_radial_linear for more details on the arguments.


      window_radial_hamming(arr::AbstractArray;
      -                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_hamming(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_hammingFunction
      window_hamming([T=Float64], size::NTuple; 
      +                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_hamming(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_hammingFunction
      window_hamming([T=Float64], size::NTuple; 
                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional (separable) window with a Hamming transition between the borders (border_out) to one (border_in). See ?window_linear for more details on the arguments.


      window_hamming(arr::AbstractArray;
      -               offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_hamming(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_hanningFunction
      window_radial_hanning([T=Float64], size::NTuple; 
      +               offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_hamming(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_hanningFunction
      window_radial_hanning([T=Float64], size::NTuple; 
                          offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional radial window with a von Hann transition between the borders (border_out) to one (border_in). Note that border_in and border_out need to be scalar values for radial type windows. The elypticity can be adjusted via the scale parameter. See ?window_radial_linear for more details on the arguments.


      window_radial_hanning(arr::AbstractArray;
      -                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_hanning(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_edgeFunction
      window_edge([T=Float64], size::NTuple; 
      +                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_hanning(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_edgeFunction
      window_edge([T=Float64], size::NTuple; 
                   offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional (separable) window with a sudden transition half way between the borders (border_out) to one (border_in). See ?window_linear for more details on the arguments.


      window_edge(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit,
      -                                  border_in=0.8, border_out=1.0)

      This is a wrapper for window_edge(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_blackman_harrisFunction
      window_radial_blackman_harris([T=Float64], size::NTuple; 
      +                                  border_in=0.8, border_out=1.0)

      This is a wrapper for window_edge(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_blackman_harrisFunction
      window_radial_blackman_harris([T=Float64], size::NTuple; 
                             offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional radial window with a Hamming transition according to Blackman/Harris between the borders (border_out) to one (border_in). Note that border_in and border_out need to be scalar values for radial type windows. The elypticity can be adjusted via the scale parameter. See ?window_radial_linear for more details on the arguments.


      window_radial_blackman_harris(arr::AbstractArray;
      -                              offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_blackman_harris(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_blackman_harrisFunction
      window_blackman_harris([T=Float64], size::NTuple; 
      +                              offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_blackman_harris(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_blackman_harrisFunction
      window_blackman_harris([T=Float64], size::NTuple; 
                             offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional (separable) window with a transition according to Blackman/Harris between the borders (border_out) to one (border_in). See ?window_linear for more details on the arguments.


      window_blackman_harris(arr::AbstractArray;
      -                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_blackman_harris(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_edgeFunction
      window_radial_edge([T=Float64], size::NTuple; 
      +                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_blackman_harris(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_edgeFunction
      window_radial_edge([T=Float64], size::NTuple; 
                   offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional radial window (disk) with a sudden transition half way between the borders (border_out) to one (border_in). Note that border_in and border_out need to be scalar values for radial type windows. The elypticity can be adjusted via the scale parameter. See ?window_radial_linear for more details on the arguments.


      window_radial_edge(arr::AbstractArray; 
      -                   offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_edge(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_linearFunction
      window_linear([T=Float64], size::NTuple; 
      +                   offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_radial_edge(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_linearFunction
      window_linear([T=Float64], size::NTuple; 
                   offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional (separable) window with a linear transition from zero at the borders (border_out) to one (border_in).

      julia> window_linear((8,9),border_in=0.0)
       8×9 IndexFunArray{Float64, 2, IndexFunArrays.var"#34#35"{Float64, Tuple{Float64, Float64}, Tuple{Float64, Float64}, Float64, Float64}}:
        0.0  0.0     0.0    0.0     0.0   0.0     0.0    0.0     0.0
      @@ -33,8 +33,8 @@
        0.0  0.1875  0.375  0.5625  0.75  0.5625  0.375  0.1875  0.0
        0.0  0.125   0.25   0.375   0.5   0.375   0.25   0.125   0.0
        0.0  0.0625  0.125  0.1875  0.25  0.1875  0.125  0.0625  0.0

      window_linear(arr::AbstractArray; offset=CtrFt, scaling=ScaUnit,
      -                                  border_in=0.8, border_out=1.0)

      This is a wrapper for window_linear(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_gaussianFunction
      window_radial_gaussian([T=Float64], size::NTuple; 
      -                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional radial window with a Gaussian transition between the borders (border_out) to one (border_in). By default the standard deviation sigma of the Gaussian is adjusted such that the 2 sigma level is reached at border_out. However, this window is not clipped at the outer border, thus allowing the sigma to be adjusted by placing border_out closer to border_in. Note that border_in and border_out are scalar values for radial type windows. The elypticity can be adjusted via the scale parameter. See ?window_radial_linear for more details on the arguments.


      windowradialgaussian(arr::AbstractArray; offset=CtrFT, scale=ScaFTEdge, borderin=0.8, borderout=1.0, dims=ntuple(+, N)) This is a wrapper for window_radial_gaussian(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_gaussianFunction
      window_gaussian([T=Float64], size::NTuple; 
      +                                  border_in=0.8, border_out=1.0)

      This is a wrapper for window_linear(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_radial_gaussianFunction
      window_radial_gaussian([T=Float64], size::NTuple; 
      +                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional radial window with a Gaussian transition between the borders (border_out) to one (border_in). By default the standard deviation sigma of the Gaussian is adjusted such that the 2 sigma level is reached at border_out. However, this window is not clipped at the outer border, thus allowing the sigma to be adjusted by placing border_out closer to border_in. Note that border_in and border_out are scalar values for radial type windows. The elypticity can be adjusted via the scale parameter. See ?window_radial_linear for more details on the arguments.


      windowradialgaussian(arr::AbstractArray; offset=CtrFT, scale=ScaFTEdge, borderin=0.8, borderout=1.0, dims=ntuple(+, N)) This is a wrapper for window_radial_gaussian(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      IndexFunArrays.window_gaussianFunction
      window_gaussian([T=Float64], size::NTuple; 
                             offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      A multidimensional (separable) window with a transition according to a decaying Gaussian between the borders (border_out) to one (border_in). By default the standard deviation sigma of the Gaussian is adjusted such that the 2 sigma level is reached at border_out. However, this window is not clipped at the outer border, thus allowing the sigma to be adjusted by placing border_out closer to border_in. See ?window_linear for more details on the arguments.

      julia> w1 = window_gaussian((9,9), border_in=(0.3,0.3), border_out=(0.6,1))
       9×9 IndexFunArray{Float64, 2, IndexFunArrays.var"#286#288"{Float64, Tuple{Float64, Float64}, Tuple{Float64, Float64}, Tuple{Float64, Float64}, Tuple{Float64, Int64}}}:
        0.000109245  0.000259904  0.000413188  0.000449917  0.000449917  0.000449917  0.000413188  0.000259904  0.000109245
      @@ -46,4 +46,4 @@
        0.152725     0.363345     0.577637     0.628984     0.628984     0.628984     0.577637     0.363345     0.152725
        0.012239     0.0291178    0.0462907    0.0504055    0.0504055    0.0504055    0.0462907    0.0291178    0.012239
        0.000109245  0.000259904  0.000413188  0.000449917  0.000449917  0.000449917  0.000413188  0.000259904  0.000109245

      window_gaussian(arr::AbstractArray;
      -                      offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_gaussian(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source
      + offset=CtrFT, scale=ScaFTEdge, border_in=0.8, border_out=1.0, dims=ntuple(+, N))

      This is a wrapper for window_gaussian(eltype(arr), size(arr), scaling=scaling, offset=offset, border_in=border_in, border_out=border_out).

      source