autolens.Visibilities#

class Visibilities[source]#

A collection of (real, imag) visibilities which are used to represent the data in an Interferometer dataset.

The (real, imag) visibilities are stored as a 1D complex NumPy array of shape [total_visibilities]. These can be mapped to a 2D real NumPy array of shape [total_visibilities, 2] and a Grid2DIrregular data structure which is used for plotting the visibilities in 2D in the complex plane.

Calculations should use the NumPy array structure wherever possible for efficient calculations.

The vectors input to this function can have any of the following forms (they will be converted to the 1D complex NumPy array structure and can be converted back using the object’s properties):

[1.0+1.0j, 2.0+2.0j] [[1.0, 1.0], [2.0, 2.0]]

Parameters:

visibilities (Union[ndarray, List[complex]]) – The (real, imag) visibilities values.

__init__(visibilities)#

A collection of (real, imag) visibilities which are used to represent the data in an Interferometer dataset.

The (real, imag) visibilities are stored as a 1D complex NumPy array of shape [total_visibilities]. These can be mapped to a 2D real NumPy array of shape [total_visibilities, 2] and a Grid2DIrregular data structure which is used for plotting the visibilities in 2D in the complex plane.

Calculations should use the NumPy array structure wherever possible for efficient calculations.

The vectors input to this function can have any of the following forms (they will be converted to the 1D complex NumPy array structure and can be converted back using the object’s properties):

[1.0+1.0j, 2.0+2.0j] [[1.0, 1.0], [2.0, 2.0]]

Parameters:

visibilities (Union[ndarray, List[complex]]) – The (real, imag) visibilities values.

Methods

__init__(visibilities)

A collection of (real, imag) visibilities which are used to represent the data in an Interferometer dataset.

all()

astype(*args, **kwargs)

rtype:

AbstractNDArray

copy()

flip_hdu_for_ds9(values)

from_fits(file_path, hdu)

Create Visibilities (see AbstractVisibilities.__new__) by loading the(real, imag) values from a .fits file.

full(fill_value, shape_slim)

Create Visibilities (see AbstractVisibilities.__new__) where all (real, imag) values are filled with an input fill value, analogous to the method numpy ndarray.full.

instance_flatten(instance)

Flatten an instance of an autoarray class into a tuple of its attributes (i.e.

instance_unflatten(aux_data, children)

Unflatten a tuple of attributes (i.e.

invert()

max(*args, **kwargs)

min(*args, **kwargs)

ones(shape_slim)

Create Visibilities (see AbstractVisibilities.__new__) where all (real, imag) values are filled with ones, analogous to the method np.ones().

output_to_fits(file_path[, overwrite])

Output the visibilities to a .fits file.

reshape(*args, **kwargs)

rtype:

AbstractNDArray

sqrt(*args, **kwargs)

rtype:

AbstractNDArray

structure_2d_from(result)

rtype:

Structure

structure_2d_list_from(result_list)

rtype:

List[Structure]

sum(*args, **kwargs)

trimmed_after_convolution_from(kernel_shape)

rtype:

Structure

with_new_array(array)

Copy this object but give it a new array.

zeros(shape_slim)

Create Visibilities (see AbstractVisibilities.__new__) where all (real, imag) values are filled with zeros, analogous to the method np.zeros().

Attributes

amplitudes

A property that is only computed once per instance and then replaces itself with an ordinary attribute.

array

derive_grid

rtype:

DeriveGrid2D

derive_indexes

rtype:

DeriveIndexes2D

derive_mask

rtype:

DeriveMask2D

dtype

geometry

hdu_for_output

The visibilities as an HDU object, which can be output to a .fits file.

imag

rtype:

AbstractNDArray

in_array

Returns the 1D complex NumPy array of values with shape [total_visibilities] as a NumPy float array of shape [total_visibilities, 2].

in_grid

Returns the 1D complex NumPy array of values as an irregular grid.

mask

native

Returns the data structure in its native format which contains all unmaksed values to the native dimensions.

ndim

origin

rtype:

Tuple[int, ...]

phases

A property that is only computed once per instance and then replaces itself with an ordinary attribute.

pixel_area

pixel_scale

rtype:

float

pixel_scale_header

rtype:

Dict

pixel_scales

rtype:

Tuple[float, ...]

real

rtype:

AbstractNDArray

scaled_maxima

The maximum values of the visibilities if they are treated as a 2D grid in the complex plane.

scaled_minima

The minimum values of the visibilities if they are treated as a 2D grid in the complex plane.

shape

shape_native

rtype:

Tuple[int, ...]

shape_slim

rtype:

int

size

slim

Returns the data structure in its slim format which flattens all unmasked values to a 1D array.

sub_shape_native

rtype:

Tuple[int, ...]

sub_shape_slim

rtype:

int

sub_size

rtype:

int

total_area

total_pixels

rtype:

int

unmasked_grid

rtype:

Union[Grid1D, Grid2D]

__new__(*args, **kwargs)#
__init__(visibilities)#

A collection of (real, imag) visibilities which are used to represent the data in an Interferometer dataset.

The (real, imag) visibilities are stored as a 1D complex NumPy array of shape [total_visibilities]. These can be mapped to a 2D real NumPy array of shape [total_visibilities, 2] and a Grid2DIrregular data structure which is used for plotting the visibilities in 2D in the complex plane.

Calculations should use the NumPy array structure wherever possible for efficient calculations.

The vectors input to this function can have any of the following forms (they will be converted to the 1D complex NumPy array structure and can be converted back using the object’s properties):

[1.0+1.0j, 2.0+2.0j] [[1.0, 1.0], [2.0, 2.0]]

Parameters:

visibilities (Union[ndarray, List[complex]]) – The (real, imag) visibilities values.