ExponentialPrior#

class jolideco.priors.ExponentialPrior(alpha=10, cycle_spin_subpix=False, generator=None)[source]#

Bases: Prior

Sparse prior for point sources

Defined by a product of exponential distributions.

To reproduce:

from sympy import Symbol, Indexed, exp, Product, log
from jolideco.utils.sympy import concrete_expand_log

alpha = Symbol("alpha")

N = Symbol("N", integer=True, positive=True)
i = Symbol("i", integer=True, positive=True)

x = Indexed('x', i)

exponential = alpha * exp(-x * alpha)

like = Product(exponential, (i, 1, N))

log_like = log(like)

concrete_expand_log(log_like)
alpha#

Alpha parameter

Type:

float

cycle_spin_subpix#

Subpixel cycle spin.

Type:

bool

generator#

Random number generator

Type:

~torch.Generator

Initialize internal Module state, shared by both nn.Module and ScriptModule.

Attributes Summary

log_constant_term

Log constant term

mean

Mean of the distribution

mode

Mode of the distribution

Methods Summary

__call__(flux)

Evaluate the prior

to_dict()

Convert deconvolver configuration to dict, with simple data types.

Attributes Documentation

log_constant_term#

Log constant term

mean#

Mean of the distribution

mode#

Mode of the distribution

Methods Documentation

__call__(flux)[source]#

Evaluate the prior

Parameters:

flux (~pytorch.Tensor) – Reconstructed point source flux

Returns:

Log prior value.

Return type:

log_prior ; ~torch.tensor

to_dict()[source]#

Convert deconvolver configuration to dict, with simple data types.

Returns:

data – Parameter dict.

Return type:

dict