autolens.ArrayIrregular#
- class ArrayIrregular[source]#
Bases:
Structure
A collection of values which are structured as follows:
[value0, value1, value3]
The values object does not store the values as a list of floats, but instead a 1D NumPy array of shape [total_values]. This array can be mapped to the list of floats structure above. They are stored as a NumPy array so the values can be used efficiently for calculations.
The values input to this function can have any of the following forms:
[value0, value1]
In all cases, they will be converted to a list of floats followed by a 1D NumPy array.
Print methods are overridden so a user always “sees” the values as the list structure.
In contrast to a Array2D structure, ArrayIrregular do not lie on a uniform grid or correspond to values that originate from a uniform grid. Therefore, when handling irregular data-sets ArrayIrregular should be used.
- Parameters:
values ([float] or equivalent) – A collection of values.
Methods
all
astype
copy
flip_hdu_for_ds9
instance_flatten
Flatten an instance of an autoarray class into a tuple of its attributes (i.e.. a pytree).
instance_unflatten
Unflatten a tuple of attributes (i.e. a pytree) into an instance of an autoarray class.
invert
max
min
output_to_fits
Output the grid to a .fits file.
reshape
sqrt
sum
trimmed_after_convolution_from
with_new_array
Copy this object but give it a new array.
Attributes
array
derive_grid
derive_indexes
derive_mask
dtype
geometry
hdu_for_output
imag
Return the values in a list.
Returns the data structure in its native format which contains all unmaksed values to the native dimensions.
ndim
origin
pixel_area
pixel_scale
pixel_scale_header
pixel_scales
real
shape
shape_native
shape_slim
size
The ArrayIrregular in their slim representation, a 1D ndarray of shape [total_values].
total_area
total_pixels
unmasked_grid
values
- property slim: ArrayIrregular#
The ArrayIrregular in their slim representation, a 1D ndarray of shape [total_values].
- property native: Structure#
Returns the data structure in its native format which contains all unmaksed values to the native dimensions.