RegularCoords
- class hcipy.field.RegularCoords(delta, dims, zero=None)
Bases:
Coords
A list of points that have a regular spacing in all dimensions.
- Parameters:
- deltaarray_like
The spacing between the points.
- dimsarray_like
The number of points along each dimension.
- zeroarray_like
The coordinates for the first point.
- Attributes:
- delta
The spacing between the points.
- dims
The number of points along each dimension.
- zero
The coordinates for the first point.
Attributes Summary
The tuple (delta, dims, zero) of the regularly-spaced coordinates.
A tuple of a list of the values for each dimension.
The shape of an
numpy.ndarray
with the right dimensions.The number of points.
Methods Summary
from_dict
(tree)Make an RegularCoords from a dictionary, previously created by to_dict().
reverse
()Reverse the ordering of points in-place.
to_dict
()Convert the object to a dictionary for serialization.
Attributes Documentation
- regular_coords
The tuple (delta, dims, zero) of the regularly-spaced coordinates.
- separated_coords
A tuple of a list of the values for each dimension.
The actual points are the iterated tensor product of this tuple.
- shape
The shape of an
numpy.ndarray
with the right dimensions.
- size
The number of points.
Methods Documentation
- classmethod from_dict(tree)
Make an RegularCoords from a dictionary, previously created by to_dict().
- Parameters:
- treedictionary
The dictionary from which to make a new RegularCoords object.
- Returns:
- RegularCoords
The created object.
- Raises:
- ValueError
If the dictionary is not formatted correctly.
- reverse()
Reverse the ordering of points in-place.
- to_dict()
Convert the object to a dictionary for serialization.
- Returns:
- dictionary
The created dictionary.