CartesianGrid
- class hcipy.field.CartesianGrid(coords, weights=None)
Bases:
Grid
A grid representing a N-dimensional Cartesian coordinate system.
Attributes Summary
The w-coordinate (dimension 3).
The x-coordinate (dimension 0).
The y-coordinate (dimension 1).
The z-coordinate (dimension 2).
Methods Summary
rotate
(angle[, axis])Rotate the grid in-place.
rotated
(angle[, axis])A rotated copy of this grid.
scale
(scale)Scale the grid in-place.
shift
(shift)Shift the grid in-place.
Attributes Documentation
- w
The w-coordinate (dimension 3).
- x
The x-coordinate (dimension 0).
- y
The y-coordinate (dimension 1).
- z
The z-coordinate (dimension 2).
Methods Documentation
- rotate(angle, axis=None)
Rotate the grid in-place.
Caution
All structure in the coordinates will be destroyed.
- Parameters:
- anglescalar
The angle in radians.
- axisndarray or None
The axis of rotation. For two-dimensional grids, it is ignored. For three-dimensional grids it is required.
- Returns:
- Grid
Itself to allow for chaining these transformations.
- rotated(angle, axis=None)
A rotated copy of this grid.
- Parameters:
- anglescalar
The angle in radians.
- axisndarray or None
The axis of rotation. For two-dimensional grids, it is ignored. For three-dimensional grids it is required.
- Returns:
- Grid
The rotated grid.
- scale(scale)
Scale the grid in-place.
- Parameters:
- scalearray_like or scalar
The factor with which to scale the grid.
- Returns:
- Grid
Itself to allow for chaining these transformations.
- shift(shift)
Shift the grid in-place.
- Parameters:
- shiftarray_like
The amount with which to shift the grid.
- Returns:
- Grid
Itself to allow for chaining these transformations.