VLBISkyRegularizers API
Index
VLBISkyRegularizers.ALRDomainVLBISkyRegularizers.AbstractDomainVLBISkyRegularizers.AbstractRegularizerVLBISkyRegularizers.AddRegularizerVLBISkyRegularizers.CLRDomainVLBISkyRegularizers.KLEVLBISkyRegularizers.L1VLBISkyRegularizers.LinearDomainVLBISkyRegularizers.LogDomainVLBISkyRegularizers.ParameterDomainVLBISkyRegularizers.TSVVLBISkyRegularizers.TVVLBISkyRegularizers.WVTypeVLBISkyRegularizers.WaveletL1VLBISkyRegularizers.WeightRegularizerDistributions._logpdfDistributions._rand!VLBISkyRegularizers.evaluateVLBISkyRegularizers.evaluation_domainVLBISkyRegularizers.gridVLBISkyRegularizers.image_domainVLBISkyRegularizers.klentropy_baseVLBISkyRegularizers.l1_baseVLBISkyRegularizers.regularizersVLBISkyRegularizers.solve_optVLBISkyRegularizers.transform_domainVLBISkyRegularizers.transform_imageVLBISkyRegularizers.transform_linearVLBISkyRegularizers.tsv_baseVLBISkyRegularizers.tv_baseVLBISkyRegularizers.wavelet_transform
Regularizers
AbstractRegularizerUsed 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} <: AbstractRegularizerStructure for adding two regularizers.
The two regularizers must have the same grid and image domain.
L1 <: AbstractRegularizerRegularizer 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 <: AbstractRegularizerRegularizer 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 <: AbstractRegularizerRegularizer 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 <: AbstractRegularizerRegularizer 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} <: AbstractRegularizerStructure for weighting a regularizer by a scalar.
WVTypeWavelet type used for Wavelet Transform L1 Regularizer. By default, this is the full Daubechies 2 wavelet.
KLEntropy <: AbstractRegularizerRegularizer 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
AbstractDomainUsed to define the image and evaluation domains.
See subtypes(AbstractDomain) for a list of possible domains.
ALRDomainAdditive 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.
CLRDomainCentered 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).
LinearDomainCan be used as an image and evaluation domain.
No transformation in evaluation. Image simplex transformation normalizes the image by the sum and absolute value.
LogDomainCan 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).
ParameterDomainCan 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