SeparatedCoords
- class hcipy.field.SeparatedCoords(separated_coords)
Bases:
Coords
A list of points that are separable along each dimension.
The actual points are given by the iterated tensor product of the separated_coords.
- Parameters
- separated_coordslist or tuple
A tuple of a list of coordinates along each dimension.
- Attributes
- separated_coords
A tuple of a list of coordinates along each dimension.
Attributes Summary
The number of points along each dimension.
The shape of an
numpy.ndarray
with the right dimensions.The number of points.
Methods Summary
from_dict
(tree)Make an SeparatedCoords 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
- dims
The number of points along each dimension.
- shape
The shape of an
numpy.ndarray
with the right dimensions.
- size
The number of points.
Methods Documentation
- classmethod from_dict(tree)
Make an SeparatedCoords from a dictionary, previously created by to_dict().
- Parameters
- treedictionary
The dictionary from which to make a new SeparatedCoords object.
- Returns
- SeparatedCoords
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.