VLBISkyRegularizers API
Index
VLBISkyRegularizers.ALRDomain
VLBISkyRegularizers.AbstractDomain
VLBISkyRegularizers.AbstractRegularizer
VLBISkyRegularizers.AddRegularizer
VLBISkyRegularizers.CLRDomain
VLBISkyRegularizers.KLE
VLBISkyRegularizers.L1
VLBISkyRegularizers.LinearDomain
VLBISkyRegularizers.LogDomain
VLBISkyRegularizers.ParameterDomain
VLBISkyRegularizers.TSV
VLBISkyRegularizers.TV
VLBISkyRegularizers.WVType
VLBISkyRegularizers.WaveletL1
VLBISkyRegularizers.WeightRegularizer
Distributions._logpdf
Distributions._rand!
VLBISkyRegularizers.evaluate
VLBISkyRegularizers.evaluation_domain
VLBISkyRegularizers.grid
VLBISkyRegularizers.image_domain
VLBISkyRegularizers.klentropy_base
VLBISkyRegularizers.l1_base
VLBISkyRegularizers.regularizers
VLBISkyRegularizers.solve_opt
VLBISkyRegularizers.transform_domain
VLBISkyRegularizers.transform_image
VLBISkyRegularizers.transform_linear
VLBISkyRegularizers.tsv_base
VLBISkyRegularizers.tv_base
VLBISkyRegularizers.wavelet_transform
Regularizers
AbstractRegularizer
Used to define the regularizer functions. See subtypes(AbstractRegularizer)
for a list of implemented regularizers.
Mandatory fields
hyperparameter::Number
: the hyperparameter of the regularization function.image_domain::AbstractDomain
: the domain of the image spaceevaluation_domain::AbstractDomain
: the domain on which the regularizer is to be evaluatedgrid
: grid on which image is defined
AddRegularizer{R1<:AbstractRegularizer, R2<:AbstractRegularizer} <: AbstractRegularizer
Structure for adding two regularizers.
The two regularizers must have the same grid and image domain.
L1 <: AbstractRegularizer
Regularizer using the L1 norm.
fields
hyperparameter::Number
: the hyperparameter of the regularization function.image_domain::AbstractDomain
: the domain of the image spaceevaluation_domain::AbstractDomain
: the domain on which the regularizer is to be evaluatedgrid
: grid on which image is defined
TSV <: AbstractRegularizer
Regularizer using the Isotropic Total Squared Variation.
fields
hyperparameter::Number
: the hyperparameter of the regularization function.image_domain::AbstractDomain
: the domain of the image spaceevaluation_domain::AbstractDomain
: the domain on which the regularizer is to be evaluatedgrid
: grid on which image is defined
TV <: AbstractRegularizer
Regularizer using the Isotropic Total Variation.
fields
hyperparameter::Number
: the hyperparameter of the regularization function.image_domain::AbstractDomain
: the domain of the image spaceevaluation_domain::AbstractDomain
: the domain on which the regularizer is to be evaluatedgrid
: grid on which image is defined
WaveletL1 <: AbstractRegularizer
Regularizer using the l1-norm with a wavelet transform
fields
hyperparameter::Number
: the hyperparameter of the regularization function.image_domain::AbstractDomain
: the domain of the image spaceevaluation_domain::AbstractDomain
: the domain on which the regularizer is to be evaluatedwavelet::WVType
: wavelet typegrid
: grid on which image is defined
WeightRegularizer{R<:AbstractRegularizer, W<:Number} <: AbstractRegularizer
Structure for weighting a regularizer by a scalar.
WVType
Wavelet type used for Wavelet Transform L1 Regularizer. By default, this is the full Daubechies 2 wavelet.
KLEntropy <: AbstractRegularizer
Regularizer using the Kullback-Leibler divergence (or a relative entropy)
fields
hyperparameter::Number
: the hyperparameter of the regularizerprior
: the prior imagedomain::AbstractRegularizerDomain
: the image domain where the regularization funciton will be computed. KLEntropy can be computed only inLinearDomain()
.
Domains
AbstractDomain
Used to define the image and evaluation domains.
See subtypes(AbstractDomain)
for a list of possible domains.
ALRDomain
Additive Log-Ratio transform. Can only be used as an image domain.
Image transformation is the inverse ALR function. Similar to softmax but treats one pixel (the last pixel) as special.
CLRDomain
Centered Log-Ratio transformation. Can only be used as an image domain.
Image transformation is the softmax function (applies the exponential function and normalizes by the sum).
LinearDomain
Can be used as an image and evaluation domain.
No transformation in evaluation. Image simplex transformation normalizes the image by the sum and absolute value.
LogDomain
Can be used as an image and evaluation domain.
Logarithmic transformation in evaluation. Image transformation is the softmax function (applies the exponential function and normalizes by the sum).
ParameterDomain
Can only be used as an evaluation domain.
Sets the evaluation domain equal to the image domain.
Functions
evaluate(::AbstractRegularizer, ::AbstractArray)
Compute the value of the given regularization function on the input image. By default, return 0.
evaluate(reg::L1, x::AbstractArray)
Evaluate the L1 norm regularizer at an image.
Arguments
reg::L1
: L1 norm regularizerx::AbstractArray
: the image
evaluate(reg::TV, x::AbstractArray)
Evaluate the TV regularizer at an image.
Arguments
reg::TV
: TV regularizerx::AbstractArray
: the image
evaluate(reg::TSV, x::AbstractArray)
Evaluate the TSV regularizer at an image.
Arguments
reg::TSV
: TSV regularizerx::AbstractArray
: the image
evaluation_domain(reg::AbstractRegularizer)
Return the evaluation domain of the given regularizer.
grid(reg::AbstractRegularizer)
Return the grid on which an image to be regularized is defined.
image_domain(reg::AbstractRegularizer)
Return the image domain of the given regularizer.
regularizers(::AbstractRegularizer)
List regularizers used.
solve_opt(post::VLBIPosterior, opttype=Optimisers.Adam(), adtype=Optimization.AutoEnzyme(); ntrials=5, maxiters=10_000, init_params=nothing, verbose=false, stride=1000)
Solve for the MAP of post
using the opttype
optimizer.
transform_domain(ImageDomain::AbstractDomain, EvaluationDomain::AbstractDomain, x::AbstractArray)
Transform an array from the image domain to the evaluation domain.
transform_image(::AbstractDomain, x::AbstractArray)
Transform an array to the normalized, non-negative image simplex domain.
transform_linear(::AbstractDomain, x::AbstractArray)
Transform an array to the linear domain.
Same as transform_image but does not necessarily impose non-negativity and normalization.
Distributions._logpdf(d::Regularizers, image::AbstractMatrix{<:Real})
The log density of the regularizers evaluated at the input image. .
Arguments
reg::Regularizers
: the regularizer functions.image::AbstractMatrix{<:Real}
: the model of the input image
Distributions._rand!(rng::Random.AbstractRNG, ::Regularizers, x::AbstractMatrix)
Return a random sample of shape equal to the shape of the input matrix
Arguments
rng::Random.AbstractRNG
: an RNG seed object::Regularizers
: any set of regularizer functionsx::AbstractMatrix
: input matrix
l1_base(x::AbstractArray)
Base function of the L1 norm.
Arguments
x::AbstractArray
: the image
l1_base(x::AbstractArray, w::Number)
Base function of the L1 norm.
Arguments
x::AbstractArray
: the image'w::Number' : the regularization weight
tv_base(x::AbstractArray)
Base function of the isotropic total variation.
Arguments
x::AbstractArray
: the image
tv_base(x::AbstractArray, w::Number)
Base function of the isotropic total variation.
Arguments
x::AbstractArray
: the image'w::Number' : the regularization weight
wavelet_l1_base(x::AbstractArray, wv::WaveletL1)
Base function of the Wavelet L1 norm.
Arguments
x::AbstractArray
: the imagewv::WVType
: the wavelet transform type
tsv_base(x::AbstractArray)
Base function of the isotropic total squared variation.
Arguments
x::AbstractArray
: the image
tsv_base(x::AbstractArray, w::Number)
Base function of the isotropic total squared variation.
Arguments
x::AbstractArray
: the image'w::Number' : the regularization weight
klentropy_base(x::AbstractArray, p::AbstractArray)
Base function of the KL-Entropy norm.
Arguments
I::IntensityMap
: the imagep::IntensityMap
: the prior image