bounds.indexing
This module contains functions that wrap out-of-bound indices back in-bounds, according to some boundary condition.
| FUNCTION | DESCRIPTION |
|---|---|
replicate |
|
dft |
|
dct1 |
Apply DCT-I boundary conditions to an index.
Alias: |
dct2 |
Apply DCT-II boundary conditions to an index.
Aliases:
|
dst1 |
Apply DST-I boundary conditions to an index.
Alias: |
dst2 |
Apply DST-II boundary conditions to an index.
Aliases:
|
nocheck |
Do not wrap indices (assume they are inbounds) |
nocheck
replicate
Apply replicate (nearest/border) boundary conditions to an index
| PARAMETER | DESCRIPTION |
|---|---|
i |
Index
TYPE:
|
n |
Length of the field of view
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
i
|
Index that falls inside the field of view [0, n-1]
TYPE:
|
s
|
Sign of the transformation (always 1 for replicate)
TYPE:
|
Source code in bounds/indexing.py
dft
Apply DFT (circulant/wrap) boundary conditions to an index
| PARAMETER | DESCRIPTION |
|---|---|
i |
Index
TYPE:
|
n |
Length of the field of view
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
i
|
Index that falls inside the field of view [0, n-1]
TYPE:
|
s
|
Sign of the transformation (always 1 for dft)
TYPE:
|
Source code in bounds/indexing.py
dct2
Apply DCT-II (reflect) boundary conditions to an index
| PARAMETER | DESCRIPTION |
|---|---|
i |
Index
TYPE:
|
n |
Length of the field of view
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
i
|
Index that falls inside the field of view [0, n-1]
TYPE:
|
s
|
Sign of the transformation (always 1 for dct2)
TYPE:
|
Source code in bounds/indexing.py
dct1
Apply DCT-I (mirror) boundary conditions to an index
Aliases
| PARAMETER | DESCRIPTION |
|---|---|
i |
Index
TYPE:
|
n |
Length of the field of view
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
i
|
Index that falls inside the field of view [0, n-1]
TYPE:
|
s
|
Sign of the transformation (always 1 for dct1)
TYPE:
|
Source code in bounds/indexing.py
dst1
Apply DST-I (antimirror) boundary conditions to an index
Aliases
| PARAMETER | DESCRIPTION |
|---|---|
i |
Index
TYPE:
|
n |
Length of the field of view
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
i
|
Index that falls inside the field of view [0, n-1]
TYPE:
|
s
|
Sign of the transformation
TYPE:
|
Source code in bounds/indexing.py
dst2
Apply DST-II (antireflect) boundary conditions to an index
Aliases
| PARAMETER | DESCRIPTION |
|---|---|
i |
Index
TYPE:
|
n |
Length of the field of view
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
i
|
Index that falls inside the field of view [0, n-1]
TYPE:
|
s
|
Sign of the transformation (always 1 for dct1)
TYPE:
|