Images

rascil.processing_components.image.deconvolution Module

Image deconvolution functions

The standard deconvolution algorithms are provided:

hogbom: Hogbom CLEAN See: Hogbom CLEAN A&A Suppl, 15, 417, (1974)

msclean: MultiScale CLEAN See: Cornwell, T.J., Multiscale CLEAN (IEEE Journal of Selected Topics in Sig Proc, 2008 vol. 2 pp. 793-801)

mfsmsclean: MultiScale Multi-Frequency See: U. Rau and T. J. Cornwell, “A multi-scale multi-frequency deconvolution algorithm for synthesis imaging in radio interferometry,” A&A 532, A71 (2011).

For example to make dirty image and PSF, deconvolve, and then restore:

model = create_image_from_visibility(vt, cellsize=0.001, npixel=256)
dirty, sumwt = invert_visibility(vt, model, context="2d")
psf, sumwt = invert_visibility(vt, model, context="2d", dopsf=True)

comp, residual = deconvolve_cube(dirty, psf, niter=1000, threshold=0.001, fracthresh=0.01, window_shape='quarter',
                             gain=0.7, algorithm='msclean', scales=[0, 3, 10, 30])

restored = restore_cube(comp, psf, residual)

All functions return an image holding clean components and residual image

Functions

deconvolve_list(dirty_list, psf_list[, ...])

Clean using a variety of algorithms

restore_list(model_list[, psf_list, ...])

Restore the model image to the residuals

deconvolve_cube(dirty, psf[, sensitivity, ...])

Clean using a variety of algorithms

restore_cube(model[, psf, residual, clean_beam])

Restore the model image to the residuals

fit_psf(psf, **kwargs)

Fit a two dimensional Gaussian to a PSF using astropy.modeling

rascil.processing_components.image.gather_scatter Module

Functions that perform gather/scatter operations on Images.

Functions

image_gather_channels(image_list[, im, ...])

Gather a list of subimages back into an image

image_scatter_channels(im[, subimages])

Scatter an image into a list of subimages using the channels

image_gather_facets(image_list, im[, ...])

Gather a list of subimages back into an image using the image_raster_iterator

image_scatter_facets(im[, facets, overlap, ...])

Scatter an image into a list of subimages using the image_raster_iterator

rascil.processing_components.image.gradients Module

Image operations visible to the Execution Framework as Components

Functions

image_gradients(im)

Calculate image first order gradients numerically

rascil.processing_components.image.iterators Module

Functions that define and manipulate images. Images are just data and a World Coordinate System.

Functions

image_channel_iter(im[, subimages])

Create a image_channel_iter generator, returning images

image_null_iter(im[, facets, overlap])

One time iterator

image_raster_iter(im[, facets, overlap, ...])

Create an image_raster_iter generator, returning a list of subimages, optionally with overlaps

rascil.processing_components.image.operations Module

Image operations visible to the Execution Framework as Components

Functions

add_image(im1, im2)

Add two images

average_image_over_frequency(im)

Integrate image across frequency

convert_polimage_to_stokes(im[, complex_image])

Convert a polarisation image to stokes IQUV (complex)

convert_stokes_to_polimage(im, ...)

Convert a stokes image in IQUV to polarisation_frame

create_empty_image_like(im)

Create an empty image like another in shape and wcs

create_image([npixel, cellsize, ...])

Create an empty image consistent with the inputs.

create_image_from_array(data, wcs, ...[, ...])

Create an image from an array and optional wcs

create_w_term_like(im, w[, phasecentre, ...])

Create an image with a w term phase term in it:

create_window(template, window_type, **kwargs)

Create a window image using one of a number of methods

export_image_to_fits(im[, fitsfile])

Write an image to fits

fft_image_to_griddata(im)

WCS-aware FFT of a canonical image

image_add_ra_dec_grid(im)

Add ra, dec coordinates

image_is_canonical(im)

Is this Image canonical format?

import_image_from_fits(fitsfile[, fixpol])

Read an Image from fits

pad_image(im, shape)

Pad an image to desired shape, adding equally to all edges

sub_image(im, shape)

Subsection an image to desired shape, cutting equally from all edges

polarisation_frame_from_wcs(wcs, shape)

Convert wcs to polarisation_frame

qa_image(im[, context])

Assess the quality of an image

remove_continuum_image(im[, degree, mask])

Fit and remove continuum visibility in place

reproject_image(im, newwcs[, shape])

Re-project an image to a new coordinate system

show_components(im, comps[, npixels, fig, ...])

Show components against an image

show_image(im[, fig, title, pol, chan, cm, ...])

Show an Image with coordinates using matplotlib, optionally with components

smooth_image(model[, width, normalise])

Smooth an image with a 2D Gaussian kernel

scale_and_rotate_image(im[, angle, scale, order])

Scale and then rotate and image in x, y axes

apply_voltage_pattern_to_image(im, vp[, ...])

Apply a voltage pattern to an image