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:
- config
dict
Configuration from the
LIRADeconvolver
- posterior_mean
ndarray
Posterior mean
- posterior_std
ndarray
Posterior standard deviation
- parameter_trace
Table
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_trace
Table
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
.- wcs
WCS
World coordinate transform object
- config
Attributes Summary
Configuration data (
dict
)Configuration data as table (
Table
)Image trace (
ndarray
)Number of burn in iterations
Number of max.
Parameter trace (
Table
)Posterior mean (
ndarray
)Posterior mean computed from trace(
ndarray
)Posterior standard deviation (
ndarray
)Posterior std computed from trace(
ndarray
)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 and std
write
(filename[, overwrite, format])Write result fo file
Attributes Documentation
- n_burn_in#
Number of burn in iterations
- n_iter_max#
Number of max. iterations
- 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:
- ax
Axes
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.
- ax
- Returns:
- anim
FuncAnimation
Func animation object.
- anim
- 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.
- filenamestr or
- Returns:
- result
LIRADeconvolverResult
Result object
- result
- reduce_to_mean_std()[source]#
Reduce to mean and std
- Returns:
- result
LIRADeconvolverResult
Reduced result object
- result