LIRADeconvolverResult#

class pylira.LIRADeconvolverResult(config, posterior_mean=None, posterior_std=None, parameter_trace=None, image_trace=None, wcs=None)[source]#

Bases: object

LIRA deconvolution result object.

Parameters:
configdict

Configuration from the LIRADeconvolver

posterior_meanndarray

Posterior mean

posterior_stdndarray

Posterior standard deviation

parameter_traceTable or dict

Parameter trace. If a dict is provided it triggers the lazy loading. The dict must contain the argument to read_parameter_trace_file.

image_traceTable or dict

Image trace. If a dict is provided it triggers the lazy loading. The dict must contain the argument to read_image_trace_file.

wcsWCS

World coordinate transform object

Attributes Summary

config

Configuration data (dict)

config_table

Configuration data as table (Table)

image_trace

Image trace (ndarray)

n_burn_in

Number of burn in iterations

n_iter_max

Number of max.

parameter_trace

Parameter trace (Table)

posterior_mean

Posterior mean (ndarray)

posterior_mean_from_trace

Posterior mean computed from trace(ndarray)

posterior_std

Posterior standard deviation (ndarray)

posterior_std_from_trace

Posterior std computed from trace(ndarray)

wcs

Optional wcs

Methods Summary

plot_image_trace_animation([ax, interval, ...])

Plot image trace animation

plot_image_trace_interactive(**kwargs)

Plot image trace interactively

plot_parameter_distributions(**kwargs)

Plot parameter distributions

plot_parameter_traces(**kwargs)

Plot parameter traces

plot_pixel_trace([center_pix])

Plot pixel trace at a given position.

plot_pixel_trace_neighbours([center_pix, ...])

Plot pixel traces in a given region.

plot_pixel_traces_region(center_pix[, ...])

Plot pixel traces in a given region.

plot_posterior_mean([from_image_trace])

Plot posteriror mean

read(filename[, format])

Write result fo file

reduce_to_mean_std()

Reduce to mean and std

write(filename[, overwrite, format])

Write result fo file

Attributes Documentation

config#

Configuration data (dict)

config_table#

Configuration data as table (Table)

image_trace#

Image trace (ndarray)

n_burn_in#

Number of burn in iterations

n_iter_max#

Number of max. iterations

parameter_trace#

Parameter trace (Table)

posterior_mean#

Posterior mean (ndarray)

posterior_mean_from_trace#

Posterior mean computed from trace(ndarray)

posterior_std#

Posterior standard deviation (ndarray)

posterior_std_from_trace#

Posterior std computed from trace(ndarray)

wcs#

Optional wcs

Methods Documentation

plot_image_trace_animation(ax=None, interval=20, repeat=True, n_frames=None, cumulative=False, label_dxy=(20, 10), **kwargs)[source]#

Plot image trace animation

Parameters:
axAxes

Plot axes

intervalint

Interval im ms.

repeatbool

Repeat animation

n_framesint

Number of frames

cumulativebool

Cumulated mean of the samples.

label_dxytuple of int

Shift of the frame label.

Returns:
animFuncAnimation

Func animation object.

plot_image_trace_interactive(**kwargs)[source]#

Plot image trace interactively

Parameters:
**kwargsdict

Keyword arguments forwarded to imshow

plot_parameter_distributions(**kwargs)[source]#

Plot parameter distributions

Parameters:
**kwargsdict

Keyword arguments forwarded to plot_parameter_distributions

plot_parameter_traces(**kwargs)[source]#

Plot parameter traces

Parameters:
**kwargsdict

Keyword arguments forwarded to plot_parameter_traces

plot_pixel_trace(center_pix=None, **kwargs)[source]#

Plot pixel trace at a given position.

Parameters:
center_pixtuple of int

Pixel indices, order is (x, y). By default the trace at the center is plotted.

**kwargsdict

Keyword arguments forwarded to plot_pixel_trace

plot_pixel_trace_neighbours(center_pix=None, radius_pix=0, **kwargs)[source]#

Plot pixel traces in a given region.

Parameters:
center_pixtuple of int

Pixel indices, order is (x, y). By default the trace at the center is plotted.

radius_pixfloat

Radius in which the traces are plotted.

**kwargsdict

Keyword arguments forwarded to plot

plot_pixel_traces_region(center_pix, radius_pix=0, figsize=(16, 6), **kwargs)[source]#

Plot pixel traces in a given region.

Parameters:
center_pixtuple of int

Pixel indices, order is (x, y). By default the trace at the center is plotted.

radius_pixfloat

Radius in which the traces are plotted.

figsizetuple of float

Figure size

plot_posterior_mean(from_image_trace=False, **kwargs)[source]#

Plot posteriror mean

Parameters:
from_image_tracebool

Recompute posterior from image trace.

**kwargsdict

Keyword arguments forwarded to imshow

classmethod read(filename, format='fits')[source]#

Write result fo file

Parameters:
filenamestr or Path

Output filename

format{“fits”}

Format to use.

Returns:
resultLIRADeconvolverResult

Result object

reduce_to_mean_std()[source]#

Reduce to mean and std

Returns:
resultLIRADeconvolverResult

Reduced result object

write(filename, overwrite=False, format='fits')[source]#

Write result fo file

Parameters:
filenamestr or Path

Output filename

overwritebool

Overwrite file.

format{“fits”}

Format to use.