Skip to content

VLBISkyRegularizers API

Index

Regularizers

# VLBISkyRegularizers.AbstractRegularizerType.
julia
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 space

  • evaluation_domain::AbstractDomain: the domain on which the regularizer is to be evaluated

  • grid: grid on which image is defined

source


# VLBISkyRegularizers.AddRegularizerType.
julia
AddRegularizer{R1<:AbstractRegularizer, R2<:AbstractRegularizer} <: AbstractRegularizer

Structure for adding two regularizers.

The two regularizers must have the same grid and image domain.

source


# VLBISkyRegularizers.L1Type.
julia
L1 <: AbstractRegularizer

Regularizer using the L1 norm.

fields

  • hyperparameter::Number: the hyperparameter of the regularization function.

  • image_domain::AbstractDomain: the domain of the image space

  • evaluation_domain::AbstractDomain: the domain on which the regularizer is to be evaluated

  • grid: grid on which image is defined

source


# VLBISkyRegularizers.TSVType.
julia
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 space

  • evaluation_domain::AbstractDomain: the domain on which the regularizer is to be evaluated

  • grid: grid on which image is defined

source


# VLBISkyRegularizers.TVType.
julia
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 space

  • evaluation_domain::AbstractDomain: the domain on which the regularizer is to be evaluated

  • grid: grid on which image is defined

source


# VLBISkyRegularizers.WaveletL1Type.
julia
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 space

  • evaluation_domain::AbstractDomain: the domain on which the regularizer is to be evaluated

  • wavelet::WVType: wavelet type

  • grid: grid on which image is defined

source


# VLBISkyRegularizers.WeightRegularizerType.
julia
WeightRegularizer{R<:AbstractRegularizer, W<:Number} <: AbstractRegularizer

Structure for weighting a regularizer by a scalar.

source


# VLBISkyRegularizers.WVTypeType.
julia
WVType

Wavelet type used for Wavelet Transform L1 Regularizer. By default, this is the full Daubechies 2 wavelet.

source


# VLBISkyRegularizers.KLEType.
julia
KLEntropy <: AbstractRegularizer

Regularizer using the Kullback-Leibler divergence (or a relative entropy)

fields

  • hyperparameter::Number: the hyperparameter of the regularizer

  • prior: the prior image

  • domain::AbstractRegularizerDomain: the image domain where the regularization funciton will be computed. KLEntropy can be computed only in LinearDomain().

source


Domains

# VLBISkyRegularizers.AbstractDomainType.
julia
AbstractDomain

Used to define the image and evaluation domains.

See subtypes(AbstractDomain) for a list of possible domains.

source


# VLBISkyRegularizers.ALRDomainType.
julia
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.

source


# VLBISkyRegularizers.CLRDomainType.
julia
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).

source


# VLBISkyRegularizers.LinearDomainType.
julia
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.

source


# VLBISkyRegularizers.LogDomainType.
julia
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).

source


# VLBISkyRegularizers.ParameterDomainType.
julia
ParameterDomain

Can only be used as an evaluation domain.

Sets the evaluation domain equal to the image domain.

source


Functions

# VLBISkyRegularizers.evaluateFunction.
julia
evaluate(::AbstractRegularizer, ::AbstractArray)

Compute the value of the given regularization function on the input image. By default, return 0.

source

julia
evaluate(reg::L1, x::AbstractArray)

Evaluate the L1 norm regularizer at an image.

Arguments

  • reg::L1: L1 norm regularizer

  • x::AbstractArray: the image

source

julia
evaluate(reg::TV, x::AbstractArray)

Evaluate the TV regularizer at an image.

Arguments

  • reg::TV: TV regularizer

  • x::AbstractArray: the image

source

julia
evaluate(reg::TSV, x::AbstractArray)

Evaluate the TSV regularizer at an image.

Arguments

  • reg::TSV: TSV regularizer

  • x::AbstractArray: the image

source


# VLBISkyRegularizers.evaluation_domainFunction.
julia
evaluation_domain(reg::AbstractRegularizer)

Return the evaluation domain of the given regularizer.

source


# VLBISkyRegularizers.gridFunction.
julia
grid(reg::AbstractRegularizer)

Return the grid on which an image to be regularized is defined.

source


# VLBISkyRegularizers.image_domainFunction.
julia
image_domain(reg::AbstractRegularizer)

Return the image domain of the given regularizer.

source


# VLBISkyRegularizers.regularizersFunction.
julia
regularizers(::AbstractRegularizer)

List regularizers used.

source


# VLBISkyRegularizers.solve_optFunction.
julia
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.

source


# VLBISkyRegularizers.transform_domainFunction.
julia
transform_domain(ImageDomain::AbstractDomain, EvaluationDomain::AbstractDomain, x::AbstractArray)

Transform an array from the image domain to the evaluation domain.

source


# VLBISkyRegularizers.transform_imageFunction.
julia
transform_image(::AbstractDomain, x::AbstractArray)

Transform an array to the normalized, non-negative image simplex domain.

source


# VLBISkyRegularizers.transform_linearFunction.
julia
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.

source


# Distributions._logpdfFunction.
julia
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

source


# Distributions._rand!Function.
julia
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 functions

  • x::AbstractMatrix: input matrix

source


# VLBISkyRegularizers.l1_baseFunction.
julia
l1_base(x::AbstractArray)

Base function of the L1 norm.

Arguments

  • x::AbstractArray: the image

source

julia
l1_base(x::AbstractArray, w::Number)

Base function of the L1 norm.

Arguments

  • x::AbstractArray: the image

  • 'w::Number' : the regularization weight

source


# VLBISkyRegularizers.tv_baseFunction.
julia
tv_base(x::AbstractArray)

Base function of the isotropic total variation.

Arguments

  • x::AbstractArray: the image

source

julia
tv_base(x::AbstractArray, w::Number)

Base function of the isotropic total variation.

Arguments

  • x::AbstractArray: the image

  • 'w::Number' : the regularization weight

source


# VLBISkyRegularizers.wavelet_transformFunction.
julia
wavelet_l1_base(x::AbstractArray, wv::WaveletL1)

Base function of the Wavelet L1 norm.

Arguments

  • x::AbstractArray: the image

  • wv::WVType : the wavelet transform type

source


# VLBISkyRegularizers.tsv_baseFunction.
julia
tsv_base(x::AbstractArray)

Base function of the isotropic total squared variation.

Arguments

  • x::AbstractArray: the image

source

julia
tsv_base(x::AbstractArray, w::Number)

Base function of the isotropic total squared variation.

Arguments

  • x::AbstractArray: the image

  • 'w::Number' : the regularization weight

source


# VLBISkyRegularizers.klentropy_baseFunction.
julia
klentropy_base(x::AbstractArray, p::AbstractArray)

Base function of the KL-Entropy norm.

Arguments

  • I::IntensityMap: the image

  • p::IntensityMap: the prior image

source