Reference#

xrayvision.visibility Module#

Modules contains visibility related classes.

This contains classes to hold general visibilities and specialised classes hold visibilities from certain spacecraft or instruments

Classes#

Visibility(vis, *, u, v[, offset, center])

Hold a set of related visibilities and information.

Class Inheritance Diagram#

Inheritance diagram of xrayvision.visibility.Visibility

xrayvision.imaging Module#

Functions#

get_weights(vis[, natural, norm])

Return natural spatial frequency weight factor for each visibility.

validate_and_expand_kwarg(q[, name])

Expand a scalar or array of size one to size two by repeating.

vis_psf_image(vis, *[, shape, pixel_size, ...])

Create the point spread function for given u, v point of the visibilities.

vis_psf_map(vis, *[, shape, pixel_size, natural])

Create a map of the point spread function for given the visibilities.

vis_to_image(vis[, shape, pixel_size, natural])

Create an image by 'back projecting' the given visibilities onto the sky.

vis_to_map(vis[, shape, pixel_size, natural])

Create a map by performing a back projection of inverse transform on the visibilities.

generate_header(vis, *, shape, pixel_size)

Generate a map head given the visibilities, pixel size and shape

image_to_vis(image, *, u, v[, center, ...])

Return a Visibility created from the image and u, v sampling.

map_to_vis(amap, *, u, v)

Return a Visibility object created from the map and u, v sampling.

xrayvision.transform Module#

Discrete Fourier Transform (DFT) and Inverse Discrete Fourier Transform (IDFT) related functions.

There are two implementations one a standard DFT dft and IDFT idft in terms of pixel space, i.e. the input has no positional information other than an arbitrary 0 origin and a length. The second takes inputs which have positional information dft_map and the inverse idft_map

Functions#

dft_map(input_array, *, u, v[, center, ...])

Discrete Fourier transform in terms of coordinates returning 1-D array complex visibilities.

generate_uv(number_pixels[, center, pixel_size])

Generate the u or v coordinates given the number of pixels, center and pixel size.

generate_xy(number_pixels[, center, pixel_size])

Generate the x or y coordinates given the number of pixels, center and pixel size.

idft_map(input_vis, *, u, v, shape[, ...])

Inverse discrete Fourier transform in terms of coordinates returning a 2D real array or image.

xrayvision.clean Module#

CLEAN algorithms.

The CLEAN algorithm solves the deconvolution problem by assuming a model for the true sky intensity which is a collection of point sources or in the case of multiscale clean a collection of appropriate component shapes at different scales.

Functions#

clean(dirty_map, dirty_beam[, pixel, ...])

Clean the image using Hogbom's original method.

vis_clean(vis, shape, pixel[, ...])

Clean the visibilities using Hogbom's original method.

ms_clean(dirty_map, dirty_beam, pixel[, ...])

Clean the map using a multiscale clean algorithm.

vis_ms_clean(vis, shape, pixel[, scales, ...])

Clean the visibilities using a multiscale clean method.

xrayvision.mem Module#

Implementation of Maximum Entropy Method

Functions#

get_entropy(image, flux)

Return the entropy of an image.

get_fourier_matrix(vis[, shape, pixel_size])

Return the complex Fourier matrix used to compute the value of the visibilities.

estimate_flux(vis, shape, pixel[, maxiter, tol])

Estimate the total flux in the image by solving an optimisation problem.

get_mean_visibilities(vis, shape, pixel)

Return the mean visibilities sampling the same call in the discretisation of the (u,v) plane.

proximal_entropy(y, m, lamba, Lip[, tol])

This function computes the value of the proximity operator of the entropy function subject to positivity constraint, i.e. it solves the problem.

proximal_operator(z, f, m, lamb, Lip[, niter])

Computes the value of the proximity operator of the entropy function subject to positivity constraint and flux constraint by means of a Dykstra-like proximal algorithm (see Combettes, Pesquet, "Proximal Splitting Methods in Signal Processing", (2011)).

optimise_fb(Hv, Visib, Lip, flux, lambd, ...)

Solve the optimization problem using a forward-backward splitting algorithm

mem(vis[, percent_lambda, shape, pixel, ...])

Maximum Entropy Method for visibility based image reconstruction

xrayvision.utils Module#

Functions#

get_logger(name[, level])

Return a configured logger instance.